@causw/core 0.0.9 → 0.0.10
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.d.mts +145 -3
- package/dist/index.d.ts +145 -3
- package/dist/index.js +575 -3
- package/dist/index.mjs +565 -4
- package/package.json +5 -3
- package/src/styles/global.css +139 -107
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ var colorClasses = {
|
|
|
21
21
|
"gray-700": "text-gray-700",
|
|
22
22
|
"gray-800": "text-gray-800",
|
|
23
23
|
"gray-900": "text-gray-900",
|
|
24
|
-
"blue-
|
|
24
|
+
"blue-100": "text-blue-100",
|
|
25
25
|
"blue-500": "text-blue-500",
|
|
26
26
|
"blue-700": "text-blue-700",
|
|
27
27
|
"red-100": "text-red-100",
|
|
@@ -76,11 +76,11 @@ function textStyles({
|
|
|
76
76
|
textColor,
|
|
77
77
|
align
|
|
78
78
|
}) {
|
|
79
|
-
const
|
|
79
|
+
const baseStyles4 = "font-sans";
|
|
80
80
|
const colorClass = colorClasses[textColor];
|
|
81
81
|
const typographyClass = typographyStyles[typography];
|
|
82
82
|
const alignClass = align ? alignClasses[align] : "";
|
|
83
|
-
return mergeStyles([
|
|
83
|
+
return mergeStyles([baseStyles4, colorClass, typographyClass, alignClass]);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// src/components/Text/Text.tsx
|
|
@@ -656,4 +656,565 @@ var Checkbox = Object.assign(CheckboxRoot, {
|
|
|
656
656
|
Label: CheckboxLabel
|
|
657
657
|
});
|
|
658
658
|
|
|
659
|
-
|
|
659
|
+
// src/components/Button/Button.styles.ts
|
|
660
|
+
var baseStyles = "inline-flex items-center justify-center gap-[0.375rem] whitespace-nowrap rounded-[0.5rem] transition-colors duration-150 disabled:opacity-50 disabled:pointer-events-none";
|
|
661
|
+
var sizeStyles = {
|
|
662
|
+
sm: "min-w-[3rem] h-[1.875rem] px-[0.5rem] typo-body2-sm-point",
|
|
663
|
+
md: "h-[2.375rem] px-[0.75rem] typo-body2-sm-point"
|
|
664
|
+
};
|
|
665
|
+
var colorStyles = {
|
|
666
|
+
// base와 active에 대한 설정이 아직 정해지지 않음
|
|
667
|
+
white: {
|
|
668
|
+
base: "bg-white text-gray-400",
|
|
669
|
+
active: "bg-white text-gray-400"
|
|
670
|
+
},
|
|
671
|
+
gray: {
|
|
672
|
+
base: "bg-gray-100 text-gray-400",
|
|
673
|
+
active: "bg-gray-100 text-gray-400"
|
|
674
|
+
},
|
|
675
|
+
red: {
|
|
676
|
+
base: "bg-red-100 text-red-400",
|
|
677
|
+
active: "bg-red-100 text-red-400"
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
function buttonStyles({
|
|
681
|
+
size,
|
|
682
|
+
color,
|
|
683
|
+
active = false,
|
|
684
|
+
disabled = false,
|
|
685
|
+
fullWidth = false
|
|
686
|
+
}) {
|
|
687
|
+
return mergeStyles(
|
|
688
|
+
baseStyles,
|
|
689
|
+
disabled ? "cursor-not-allowed pointer-events-none" : "cursor-pointer",
|
|
690
|
+
sizeStyles[size],
|
|
691
|
+
active ? colorStyles[color].active : colorStyles[color].base,
|
|
692
|
+
fullWidth && "w-full"
|
|
693
|
+
);
|
|
694
|
+
}
|
|
695
|
+
function Button({
|
|
696
|
+
size = "md",
|
|
697
|
+
color = "gray",
|
|
698
|
+
active = false,
|
|
699
|
+
fullWidth = false,
|
|
700
|
+
disabled = false,
|
|
701
|
+
children,
|
|
702
|
+
...props
|
|
703
|
+
}) {
|
|
704
|
+
return /* @__PURE__ */ jsx(
|
|
705
|
+
"button",
|
|
706
|
+
{
|
|
707
|
+
className: buttonStyles({
|
|
708
|
+
size,
|
|
709
|
+
color,
|
|
710
|
+
active,
|
|
711
|
+
disabled,
|
|
712
|
+
fullWidth
|
|
713
|
+
}),
|
|
714
|
+
disabled,
|
|
715
|
+
...props,
|
|
716
|
+
children
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// src/components/CTAButton/CTAButton.styles.ts
|
|
722
|
+
var baseStyles2 = "inline-flex items-center justify-center h-[3.375rem] px-[0.5rem] rounded-[0.75rem] typo-fixed-15 whitespace-nowrap select-none transition-colors";
|
|
723
|
+
var widthStyles = {
|
|
724
|
+
default: "w-[18rem]",
|
|
725
|
+
full: "w-full"
|
|
726
|
+
};
|
|
727
|
+
var colorStyles2 = {
|
|
728
|
+
blue: "bg-blue-100 text-blue-700",
|
|
729
|
+
red: "bg-red-400 text-white",
|
|
730
|
+
dark: "bg-gray-700 text-white",
|
|
731
|
+
light: "bg-gray-100 text-gray-500",
|
|
732
|
+
white: "bg-white text-gray-500",
|
|
733
|
+
disabled: "bg-gray-200 text-gray-300"
|
|
734
|
+
};
|
|
735
|
+
function ctaButtonStyles({
|
|
736
|
+
color,
|
|
737
|
+
fullWidth = false,
|
|
738
|
+
disabled = false
|
|
739
|
+
}) {
|
|
740
|
+
return mergeStyles(
|
|
741
|
+
baseStyles2,
|
|
742
|
+
fullWidth ? widthStyles.full : widthStyles.default,
|
|
743
|
+
colorStyles2[disabled ? "disabled" : color],
|
|
744
|
+
disabled ? "pointer-events-none" : "cursor-pointer"
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
function CTAButton({
|
|
748
|
+
color = "light",
|
|
749
|
+
fullWidth = false,
|
|
750
|
+
disabled = false,
|
|
751
|
+
asChild = false,
|
|
752
|
+
className,
|
|
753
|
+
children,
|
|
754
|
+
...props
|
|
755
|
+
}) {
|
|
756
|
+
const Component = asChild ? Slot : "button";
|
|
757
|
+
return /* @__PURE__ */ jsx(
|
|
758
|
+
Component,
|
|
759
|
+
{
|
|
760
|
+
type: asChild ? void 0 : "button",
|
|
761
|
+
disabled,
|
|
762
|
+
className: mergeStyles(
|
|
763
|
+
ctaButtonStyles({ color, fullWidth, disabled }),
|
|
764
|
+
className
|
|
765
|
+
),
|
|
766
|
+
...props,
|
|
767
|
+
children
|
|
768
|
+
}
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// src/components/FloatingActionButton/FloatingActionButton.styles.ts
|
|
773
|
+
var baseStyles3 = "inline-flex items-center justify-center bg-gray-100 border border-gray-200 text-gray-500 typo-body-sm-point h-[2.875rem] rounded-[6.1875rem] select-none whitespace-nowrap transition-colors";
|
|
774
|
+
var paddingStyles = "px-[1rem] py-[0.625rem]";
|
|
775
|
+
var iconGapStyles = {
|
|
776
|
+
left: "gap-[0.25rem]",
|
|
777
|
+
right: "gap-[0.625rem]",
|
|
778
|
+
none: ""
|
|
779
|
+
};
|
|
780
|
+
function floatingActionButtonStyles({
|
|
781
|
+
iconPosition = "none",
|
|
782
|
+
disabled = false
|
|
783
|
+
}) {
|
|
784
|
+
return mergeStyles(
|
|
785
|
+
baseStyles3,
|
|
786
|
+
paddingStyles,
|
|
787
|
+
iconGapStyles[iconPosition],
|
|
788
|
+
disabled ? "opacity-50 pointer-events-none" : "cursor-pointer"
|
|
789
|
+
);
|
|
790
|
+
}
|
|
791
|
+
function FloatingActionButton({
|
|
792
|
+
leftIcon,
|
|
793
|
+
rightIcon,
|
|
794
|
+
disabled = false,
|
|
795
|
+
asChild = false,
|
|
796
|
+
children,
|
|
797
|
+
className,
|
|
798
|
+
...props
|
|
799
|
+
}) {
|
|
800
|
+
const iconPosition = leftIcon ? "left" : rightIcon ? "right" : "none";
|
|
801
|
+
const Component = asChild ? Slot : "button";
|
|
802
|
+
return /* @__PURE__ */ jsxs(
|
|
803
|
+
Component,
|
|
804
|
+
{
|
|
805
|
+
type: asChild ? void 0 : "button",
|
|
806
|
+
disabled,
|
|
807
|
+
className: mergeStyles(
|
|
808
|
+
floatingActionButtonStyles({ iconPosition, disabled }),
|
|
809
|
+
className
|
|
810
|
+
),
|
|
811
|
+
...props,
|
|
812
|
+
children: [
|
|
813
|
+
leftIcon && /* @__PURE__ */ jsx("span", { className: "flex items-center", children: leftIcon }),
|
|
814
|
+
children && /* @__PURE__ */ jsx("span", { children }),
|
|
815
|
+
rightIcon && /* @__PURE__ */ jsx("span", { className: "flex items-center", children: rightIcon })
|
|
816
|
+
]
|
|
817
|
+
}
|
|
818
|
+
);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// src/components/Box/Box.styles.ts
|
|
822
|
+
var paddingClasses = {
|
|
823
|
+
none: "p-0",
|
|
824
|
+
xs: "p-1",
|
|
825
|
+
// 4px
|
|
826
|
+
sm: "p-2",
|
|
827
|
+
// 8px
|
|
828
|
+
md: "p-4",
|
|
829
|
+
// 16px
|
|
830
|
+
lg: "p-6"
|
|
831
|
+
// 24px
|
|
832
|
+
};
|
|
833
|
+
var radiusClasses = {
|
|
834
|
+
none: "rounded-none",
|
|
835
|
+
xs: "rounded-sm",
|
|
836
|
+
sm: "rounded",
|
|
837
|
+
md: "rounded-md",
|
|
838
|
+
lg: "rounded-lg",
|
|
839
|
+
xl: "rounded-xl",
|
|
840
|
+
"2xl": "rounded-2xl",
|
|
841
|
+
"3xl": "rounded-3xl"
|
|
842
|
+
};
|
|
843
|
+
var displayClasses = {
|
|
844
|
+
block: "block",
|
|
845
|
+
flex: "flex",
|
|
846
|
+
grid: "grid",
|
|
847
|
+
"inline-block": "inline-block",
|
|
848
|
+
"inline-flex": "inline-flex",
|
|
849
|
+
none: "hidden"
|
|
850
|
+
};
|
|
851
|
+
var backgroundClasses = {
|
|
852
|
+
default: "",
|
|
853
|
+
subtle: "bg-gray-50",
|
|
854
|
+
inverse: "bg-gray-900 text-white",
|
|
855
|
+
transparent: "bg-transparent"
|
|
856
|
+
};
|
|
857
|
+
function boxStyles({
|
|
858
|
+
padding = "none",
|
|
859
|
+
radius = "none",
|
|
860
|
+
display = "block",
|
|
861
|
+
background = "default"
|
|
862
|
+
}) {
|
|
863
|
+
return mergeStyles([
|
|
864
|
+
paddingClasses[padding],
|
|
865
|
+
radiusClasses[radius],
|
|
866
|
+
displayClasses[display],
|
|
867
|
+
backgroundClasses[background]
|
|
868
|
+
]);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
// src/components/Box/Box.tsx
|
|
872
|
+
var Box = ({
|
|
873
|
+
as,
|
|
874
|
+
padding,
|
|
875
|
+
radius,
|
|
876
|
+
display,
|
|
877
|
+
background,
|
|
878
|
+
className = "",
|
|
879
|
+
children,
|
|
880
|
+
...props
|
|
881
|
+
}) => {
|
|
882
|
+
const Component = as || "div";
|
|
883
|
+
const classes = boxStyles({ padding, radius, display, background });
|
|
884
|
+
return React4.createElement(
|
|
885
|
+
Component,
|
|
886
|
+
{
|
|
887
|
+
className: mergeStyles(classes, className),
|
|
888
|
+
...props
|
|
889
|
+
},
|
|
890
|
+
children
|
|
891
|
+
);
|
|
892
|
+
};
|
|
893
|
+
Box.displayName = "Box";
|
|
894
|
+
|
|
895
|
+
// src/components/Stack/Stack.styles.ts
|
|
896
|
+
var directionClasses = {
|
|
897
|
+
horizontal: "flex-row",
|
|
898
|
+
vertical: "flex-col"
|
|
899
|
+
};
|
|
900
|
+
var gapClasses = {
|
|
901
|
+
none: "gap-0",
|
|
902
|
+
xs: "gap-1",
|
|
903
|
+
// 4px
|
|
904
|
+
sm: "gap-2",
|
|
905
|
+
// 8px
|
|
906
|
+
md: "gap-4",
|
|
907
|
+
// 16px
|
|
908
|
+
lg: "gap-6",
|
|
909
|
+
// 24px
|
|
910
|
+
xl: "gap-8"
|
|
911
|
+
// 32px
|
|
912
|
+
};
|
|
913
|
+
var alignClasses2 = {
|
|
914
|
+
start: "items-start",
|
|
915
|
+
center: "items-center",
|
|
916
|
+
end: "items-end",
|
|
917
|
+
stretch: "items-stretch"
|
|
918
|
+
};
|
|
919
|
+
var justifyClasses = {
|
|
920
|
+
start: "justify-start",
|
|
921
|
+
center: "justify-center",
|
|
922
|
+
end: "justify-end",
|
|
923
|
+
between: "justify-between"
|
|
924
|
+
};
|
|
925
|
+
function stackStyles({
|
|
926
|
+
direction = "vertical",
|
|
927
|
+
gap = "md",
|
|
928
|
+
align = "stretch",
|
|
929
|
+
justify = "start"
|
|
930
|
+
}) {
|
|
931
|
+
return mergeStyles([
|
|
932
|
+
"flex",
|
|
933
|
+
// Base style
|
|
934
|
+
directionClasses[direction],
|
|
935
|
+
gapClasses[gap],
|
|
936
|
+
alignClasses2[align],
|
|
937
|
+
justifyClasses[justify]
|
|
938
|
+
]);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// src/components/Stack/Stack.tsx
|
|
942
|
+
var Stack = ({
|
|
943
|
+
as,
|
|
944
|
+
direction,
|
|
945
|
+
gap,
|
|
946
|
+
align,
|
|
947
|
+
justify,
|
|
948
|
+
className = "",
|
|
949
|
+
children,
|
|
950
|
+
...props
|
|
951
|
+
}) => {
|
|
952
|
+
const Component = as || "div";
|
|
953
|
+
const classes = stackStyles({ direction, gap, align, justify });
|
|
954
|
+
return React4.createElement(
|
|
955
|
+
Component,
|
|
956
|
+
{
|
|
957
|
+
className: mergeStyles(classes, className),
|
|
958
|
+
...props
|
|
959
|
+
},
|
|
960
|
+
children
|
|
961
|
+
);
|
|
962
|
+
};
|
|
963
|
+
Stack.displayName = "Stack";
|
|
964
|
+
var VStack = ({
|
|
965
|
+
...props
|
|
966
|
+
}) => {
|
|
967
|
+
return /* @__PURE__ */ jsx(Stack, { direction: "vertical", ...props });
|
|
968
|
+
};
|
|
969
|
+
VStack.displayName = "VStack";
|
|
970
|
+
var HStack = ({
|
|
971
|
+
...props
|
|
972
|
+
}) => {
|
|
973
|
+
return /* @__PURE__ */ jsx(Stack, { direction: "horizontal", ...props });
|
|
974
|
+
};
|
|
975
|
+
HStack.displayName = "HStack";
|
|
976
|
+
|
|
977
|
+
// src/components/Flex/Flex.styles.ts
|
|
978
|
+
var directionClasses2 = {
|
|
979
|
+
row: "flex-row",
|
|
980
|
+
"row-reverse": "flex-row-reverse",
|
|
981
|
+
column: "flex-col",
|
|
982
|
+
"column-reverse": "flex-col-reverse"
|
|
983
|
+
};
|
|
984
|
+
var gapClasses2 = {
|
|
985
|
+
none: "gap-0",
|
|
986
|
+
xs: "gap-1",
|
|
987
|
+
// 4px
|
|
988
|
+
sm: "gap-2",
|
|
989
|
+
// 8px
|
|
990
|
+
md: "gap-4",
|
|
991
|
+
// 16px
|
|
992
|
+
lg: "gap-6",
|
|
993
|
+
// 24px
|
|
994
|
+
xl: "gap-8"
|
|
995
|
+
// 32px
|
|
996
|
+
};
|
|
997
|
+
var alignClasses3 = {
|
|
998
|
+
start: "items-start",
|
|
999
|
+
center: "items-center",
|
|
1000
|
+
end: "items-end",
|
|
1001
|
+
stretch: "items-stretch",
|
|
1002
|
+
baseline: "items-baseline"
|
|
1003
|
+
};
|
|
1004
|
+
var justifyClasses2 = {
|
|
1005
|
+
start: "justify-start",
|
|
1006
|
+
center: "justify-center",
|
|
1007
|
+
end: "justify-end",
|
|
1008
|
+
between: "justify-between",
|
|
1009
|
+
around: "justify-around",
|
|
1010
|
+
evenly: "justify-evenly"
|
|
1011
|
+
};
|
|
1012
|
+
var wrapClasses = {
|
|
1013
|
+
nowrap: "flex-nowrap",
|
|
1014
|
+
wrap: "flex-wrap",
|
|
1015
|
+
"wrap-reverse": "flex-wrap-reverse"
|
|
1016
|
+
};
|
|
1017
|
+
function flexStyles({
|
|
1018
|
+
direction = "row",
|
|
1019
|
+
gap = "md",
|
|
1020
|
+
align = "stretch",
|
|
1021
|
+
justify = "start",
|
|
1022
|
+
wrap = "nowrap"
|
|
1023
|
+
}) {
|
|
1024
|
+
return mergeStyles([
|
|
1025
|
+
"flex",
|
|
1026
|
+
// Base style
|
|
1027
|
+
directionClasses2[direction],
|
|
1028
|
+
gapClasses2[gap],
|
|
1029
|
+
alignClasses3[align],
|
|
1030
|
+
justifyClasses2[justify],
|
|
1031
|
+
wrapClasses[wrap]
|
|
1032
|
+
]);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
// src/components/Flex/Flex.tsx
|
|
1036
|
+
var Flex = ({
|
|
1037
|
+
as,
|
|
1038
|
+
direction,
|
|
1039
|
+
gap,
|
|
1040
|
+
align,
|
|
1041
|
+
justify,
|
|
1042
|
+
wrap,
|
|
1043
|
+
className = "",
|
|
1044
|
+
children,
|
|
1045
|
+
...props
|
|
1046
|
+
}) => {
|
|
1047
|
+
const Component = as || "div";
|
|
1048
|
+
const classes = flexStyles({ direction, gap, align, justify, wrap });
|
|
1049
|
+
return React4.createElement(
|
|
1050
|
+
Component,
|
|
1051
|
+
{
|
|
1052
|
+
className: mergeStyles(classes, className),
|
|
1053
|
+
...props
|
|
1054
|
+
},
|
|
1055
|
+
children
|
|
1056
|
+
);
|
|
1057
|
+
};
|
|
1058
|
+
Flex.displayName = "Flex";
|
|
1059
|
+
|
|
1060
|
+
// src/components/Grid/Grid.styles.ts
|
|
1061
|
+
var columnsClasses = {
|
|
1062
|
+
1: "grid-cols-1",
|
|
1063
|
+
2: "grid-cols-2",
|
|
1064
|
+
3: "grid-cols-3",
|
|
1065
|
+
4: "grid-cols-4",
|
|
1066
|
+
5: "grid-cols-5",
|
|
1067
|
+
6: "grid-cols-6",
|
|
1068
|
+
7: "grid-cols-7",
|
|
1069
|
+
8: "grid-cols-8",
|
|
1070
|
+
9: "grid-cols-9",
|
|
1071
|
+
10: "grid-cols-10",
|
|
1072
|
+
11: "grid-cols-11",
|
|
1073
|
+
12: "grid-cols-12",
|
|
1074
|
+
none: "grid-cols-none"
|
|
1075
|
+
};
|
|
1076
|
+
var rowsClasses = {
|
|
1077
|
+
1: "grid-rows-1",
|
|
1078
|
+
2: "grid-rows-2",
|
|
1079
|
+
3: "grid-rows-3",
|
|
1080
|
+
4: "grid-rows-4",
|
|
1081
|
+
5: "grid-rows-5",
|
|
1082
|
+
6: "grid-rows-6",
|
|
1083
|
+
none: "grid-rows-none"
|
|
1084
|
+
};
|
|
1085
|
+
var gapClasses3 = {
|
|
1086
|
+
none: "gap-0",
|
|
1087
|
+
xs: "gap-1",
|
|
1088
|
+
// 4px
|
|
1089
|
+
sm: "gap-2",
|
|
1090
|
+
// 8px
|
|
1091
|
+
md: "gap-4",
|
|
1092
|
+
// 16px
|
|
1093
|
+
lg: "gap-6",
|
|
1094
|
+
// 24px
|
|
1095
|
+
xl: "gap-8"
|
|
1096
|
+
// 32px
|
|
1097
|
+
};
|
|
1098
|
+
var flowClasses = {
|
|
1099
|
+
row: "grid-flow-row",
|
|
1100
|
+
col: "grid-flow-col",
|
|
1101
|
+
"row-dense": "grid-flow-row-dense",
|
|
1102
|
+
"col-dense": "grid-flow-col-dense"
|
|
1103
|
+
};
|
|
1104
|
+
function gridStyles({
|
|
1105
|
+
columns = "none",
|
|
1106
|
+
rows = "none",
|
|
1107
|
+
gap = "md",
|
|
1108
|
+
flow = "row"
|
|
1109
|
+
}) {
|
|
1110
|
+
return mergeStyles([
|
|
1111
|
+
"grid",
|
|
1112
|
+
columnsClasses[columns],
|
|
1113
|
+
rowsClasses[rows],
|
|
1114
|
+
gapClasses3[gap],
|
|
1115
|
+
flowClasses[flow]
|
|
1116
|
+
]);
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
// src/components/Grid/Grid.tsx
|
|
1120
|
+
var Grid = ({
|
|
1121
|
+
as,
|
|
1122
|
+
columns,
|
|
1123
|
+
rows,
|
|
1124
|
+
gap,
|
|
1125
|
+
flow,
|
|
1126
|
+
className = "",
|
|
1127
|
+
children,
|
|
1128
|
+
...props
|
|
1129
|
+
}) => {
|
|
1130
|
+
const Component = as || "div";
|
|
1131
|
+
const classes = gridStyles({ columns, rows, gap, flow });
|
|
1132
|
+
return React4.createElement(
|
|
1133
|
+
Component,
|
|
1134
|
+
{
|
|
1135
|
+
className: mergeStyles(classes, className),
|
|
1136
|
+
...props
|
|
1137
|
+
},
|
|
1138
|
+
children
|
|
1139
|
+
);
|
|
1140
|
+
};
|
|
1141
|
+
Grid.displayName = "Grid";
|
|
1142
|
+
|
|
1143
|
+
// src/components/Separator/Separator.styles.ts
|
|
1144
|
+
var orientationClasses = {
|
|
1145
|
+
horizontal: "h-px w-full my-2",
|
|
1146
|
+
vertical: "h-full w-px mx-2 self-stretch"
|
|
1147
|
+
};
|
|
1148
|
+
var colorClasses2 = "bg-gray-200";
|
|
1149
|
+
function separatorStyles({
|
|
1150
|
+
orientation = "horizontal"
|
|
1151
|
+
}) {
|
|
1152
|
+
return mergeStyles([colorClasses2, orientationClasses[orientation]]);
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
// src/components/Separator/Separator.tsx
|
|
1156
|
+
var Separator = ({
|
|
1157
|
+
as,
|
|
1158
|
+
orientation = "horizontal",
|
|
1159
|
+
className = "",
|
|
1160
|
+
...props
|
|
1161
|
+
}) => {
|
|
1162
|
+
const Component = as || "div";
|
|
1163
|
+
const classes = separatorStyles({ orientation });
|
|
1164
|
+
return React4.createElement(Component, {
|
|
1165
|
+
role: "separator",
|
|
1166
|
+
"aria-orientation": orientation,
|
|
1167
|
+
className: mergeStyles(classes, className),
|
|
1168
|
+
...props
|
|
1169
|
+
});
|
|
1170
|
+
};
|
|
1171
|
+
Separator.displayName = "Separator";
|
|
1172
|
+
|
|
1173
|
+
// src/components/Spacer/Spacer.styles.ts
|
|
1174
|
+
var sizeClasses = {
|
|
1175
|
+
1: "w-1 h-1",
|
|
1176
|
+
// 4px
|
|
1177
|
+
2: "w-2 h-2",
|
|
1178
|
+
// 8px
|
|
1179
|
+
4: "w-4 h-4",
|
|
1180
|
+
// 16px
|
|
1181
|
+
6: "w-6 h-6",
|
|
1182
|
+
// 24px
|
|
1183
|
+
8: "w-8 h-8",
|
|
1184
|
+
// 32px
|
|
1185
|
+
10: "w-10 h-10",
|
|
1186
|
+
// 40px
|
|
1187
|
+
12: "w-12 h-12",
|
|
1188
|
+
// 48px
|
|
1189
|
+
16: "w-16 h-16",
|
|
1190
|
+
// 64px
|
|
1191
|
+
20: "w-20 h-20",
|
|
1192
|
+
// 80px
|
|
1193
|
+
24: "w-24 h-24"
|
|
1194
|
+
// 96px
|
|
1195
|
+
};
|
|
1196
|
+
function spacerStyles({ size = "auto" }) {
|
|
1197
|
+
if (size === "auto") {
|
|
1198
|
+
return "flex-1";
|
|
1199
|
+
}
|
|
1200
|
+
return mergeStyles(["flex-none", sizeClasses[size]]);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
// src/components/Spacer/Spacer.tsx
|
|
1204
|
+
var Spacer = ({
|
|
1205
|
+
as,
|
|
1206
|
+
size,
|
|
1207
|
+
className = "",
|
|
1208
|
+
...props
|
|
1209
|
+
}) => {
|
|
1210
|
+
const Component = as || "div";
|
|
1211
|
+
const classes = spacerStyles({ size });
|
|
1212
|
+
return React4.createElement(Component, {
|
|
1213
|
+
"aria-hidden": "true",
|
|
1214
|
+
className: mergeStyles(classes, className),
|
|
1215
|
+
...props
|
|
1216
|
+
});
|
|
1217
|
+
};
|
|
1218
|
+
Spacer.displayName = "Spacer";
|
|
1219
|
+
|
|
1220
|
+
export { Box, Button, CTAButton, Checkbox, Field, Flex, FloatingActionButton, Grid, HStack, Radio, RadioGroup, Separator, Spacer, Stack, Text, TextArea, TextInput, Toggle, VStack, mergeStyles, useRadioGroupContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@causw/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Core components and utilities for CAUSW Design System - CAU Software Community Service",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
"src/styles"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@radix-ui/react-toast": "^1.2.15",
|
|
24
25
|
"@radix-ui/react-slot": "^1.2.4",
|
|
26
|
+
"class-variance-authority": "^0.7.1",
|
|
25
27
|
"clsx": "^2.1.1",
|
|
26
28
|
"tailwind-merge": "^3.4.0",
|
|
27
|
-
"@causw/icons": "0.0.
|
|
28
|
-
"@causw/tokens": "0.0.
|
|
29
|
+
"@causw/icons": "0.0.9",
|
|
30
|
+
"@causw/tokens": "0.0.11"
|
|
29
31
|
},
|
|
30
32
|
"peerDependencies": {
|
|
31
33
|
"react": ">=18",
|