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