@beyondcorp/beyond-ui-native 0.1.0 → 0.1.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/dist/{chunk-2B6HTSGM.mjs → chunk-RNHEGFYR.mjs} +16 -2
- package/dist/chunk-RNHEGFYR.mjs.map +1 -0
- package/dist/index.d.mts +83 -230
- package/dist/index.d.ts +83 -230
- package/dist/index.js +525 -323
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +474 -273
- package/dist/index.mjs.map +1 -1
- package/dist/preset-BmUHLoAa.d.mts +274 -0
- package/dist/preset-BmUHLoAa.d.ts +274 -0
- package/dist/preset.d.mts +1 -117
- package/dist/preset.d.ts +1 -117
- package/dist/preset.js +19 -3
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +5 -3
- package/package.json +1 -1
- package/dist/chunk-2B6HTSGM.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
preset_default,
|
|
3
3
|
tokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RNHEGFYR.mjs";
|
|
5
5
|
import {
|
|
6
6
|
cn,
|
|
7
7
|
getAccessibilityProps,
|
|
@@ -708,29 +708,56 @@ AvatarFallback.displayName = "Avatar.Fallback";
|
|
|
708
708
|
|
|
709
709
|
// src/components/switch/switch.tsx
|
|
710
710
|
import * as React10 from "react";
|
|
711
|
-
import
|
|
711
|
+
import {
|
|
712
|
+
Pressable as Pressable3,
|
|
713
|
+
View as View8
|
|
714
|
+
} from "react-native";
|
|
712
715
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
713
|
-
var Switch = React10.forwardRef(function Switch2({
|
|
716
|
+
var Switch = React10.forwardRef(function Switch2({
|
|
717
|
+
checked: controlledChecked,
|
|
718
|
+
defaultChecked = false,
|
|
719
|
+
onCheckedChange,
|
|
720
|
+
disabled = false,
|
|
721
|
+
className,
|
|
722
|
+
thumbClassName,
|
|
723
|
+
onPress,
|
|
724
|
+
...props
|
|
725
|
+
}, ref) {
|
|
726
|
+
const [uncontrolledChecked, setUncontrolledChecked] = React10.useState(defaultChecked);
|
|
727
|
+
const isControlled = controlledChecked !== void 0;
|
|
728
|
+
const isChecked = isControlled ? controlledChecked : uncontrolledChecked;
|
|
729
|
+
const handlePress = (e) => {
|
|
730
|
+
if (disabled) return;
|
|
731
|
+
const nextChecked = !isChecked;
|
|
732
|
+
if (!isControlled) {
|
|
733
|
+
setUncontrolledChecked(nextChecked);
|
|
734
|
+
}
|
|
735
|
+
onCheckedChange?.(nextChecked);
|
|
736
|
+
onPress?.(e);
|
|
737
|
+
};
|
|
714
738
|
return /* @__PURE__ */ jsx11(
|
|
715
|
-
|
|
739
|
+
Pressable3,
|
|
716
740
|
{
|
|
717
741
|
ref,
|
|
718
|
-
|
|
719
|
-
|
|
742
|
+
role: "switch",
|
|
743
|
+
accessibilityRole: "switch",
|
|
744
|
+
accessibilityState: { checked: isChecked, disabled: !!disabled },
|
|
745
|
+
disabled,
|
|
746
|
+
onPress: handlePress,
|
|
720
747
|
className: cn(
|
|
721
748
|
"h-7 w-12 shrink-0 flex-row items-center rounded-full p-0.5 transition-colors",
|
|
722
|
-
"bg-
|
|
723
|
-
|
|
724
|
-
props.disabled && "opacity-50",
|
|
749
|
+
isChecked ? "bg-primary-600 dark:bg-primary-600" : "bg-neutral-300 dark:bg-neutral-700",
|
|
750
|
+
disabled && "opacity-50",
|
|
725
751
|
className
|
|
726
752
|
),
|
|
727
753
|
...props,
|
|
728
754
|
children: /* @__PURE__ */ jsx11(
|
|
729
|
-
|
|
755
|
+
View8,
|
|
730
756
|
{
|
|
757
|
+
role: "presentation",
|
|
731
758
|
className: cn(
|
|
732
|
-
"h-6 w-6 rounded-full bg-white shadow-
|
|
733
|
-
|
|
759
|
+
"h-6 w-6 rounded-full bg-white shadow-sm transition-transform",
|
|
760
|
+
isChecked ? "translate-x-5" : "translate-x-0",
|
|
734
761
|
thumbClassName
|
|
735
762
|
)
|
|
736
763
|
}
|
|
@@ -742,42 +769,67 @@ Switch.displayName = "Switch";
|
|
|
742
769
|
|
|
743
770
|
// src/components/checkbox/checkbox.tsx
|
|
744
771
|
import * as React11 from "react";
|
|
745
|
-
import {
|
|
746
|
-
|
|
772
|
+
import {
|
|
773
|
+
View as View9,
|
|
774
|
+
Text as Text9,
|
|
775
|
+
Pressable as Pressable4
|
|
776
|
+
} from "react-native";
|
|
747
777
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
748
|
-
var Checkbox = React11.forwardRef(function Checkbox2({
|
|
778
|
+
var Checkbox = React11.forwardRef(function Checkbox2({
|
|
779
|
+
checked: controlledChecked,
|
|
780
|
+
defaultChecked = false,
|
|
781
|
+
onCheckedChange,
|
|
782
|
+
disabled = false,
|
|
783
|
+
className,
|
|
784
|
+
indicatorClassName,
|
|
785
|
+
label,
|
|
786
|
+
labelClassName,
|
|
787
|
+
onPress,
|
|
788
|
+
...props
|
|
789
|
+
}, ref) {
|
|
790
|
+
const [uncontrolledChecked, setUncontrolledChecked] = React11.useState(defaultChecked);
|
|
791
|
+
const isControlled = controlledChecked !== void 0;
|
|
792
|
+
const isChecked = isControlled ? controlledChecked : uncontrolledChecked;
|
|
793
|
+
const handlePress = (e) => {
|
|
794
|
+
if (disabled) return;
|
|
795
|
+
const nextChecked = !isChecked;
|
|
796
|
+
if (!isControlled) {
|
|
797
|
+
setUncontrolledChecked(nextChecked);
|
|
798
|
+
}
|
|
799
|
+
onCheckedChange?.(nextChecked);
|
|
800
|
+
onPress?.(e);
|
|
801
|
+
};
|
|
749
802
|
const content = /* @__PURE__ */ jsx12(
|
|
750
|
-
|
|
803
|
+
Pressable4,
|
|
751
804
|
{
|
|
752
805
|
ref,
|
|
806
|
+
role: "checkbox",
|
|
807
|
+
accessibilityRole: "checkbox",
|
|
808
|
+
accessibilityState: { checked: isChecked, disabled: !!disabled },
|
|
809
|
+
disabled,
|
|
810
|
+
onPress: handlePress,
|
|
753
811
|
className: cn(
|
|
754
812
|
"h-6 w-6 shrink-0 items-center justify-center rounded-md border border-neutral-300 dark:border-neutral-700 bg-white dark:bg-neutral-900",
|
|
755
|
-
|
|
756
|
-
|
|
813
|
+
isChecked && "bg-primary-600 border-primary-600 dark:bg-primary-600 dark:border-primary-600",
|
|
814
|
+
disabled && "opacity-50",
|
|
757
815
|
className
|
|
758
816
|
),
|
|
759
817
|
...props,
|
|
760
|
-
children: /* @__PURE__ */ jsx12(
|
|
761
|
-
CheckboxPrimitive.Indicator,
|
|
762
|
-
{
|
|
763
|
-
className: cn("items-center justify-center", indicatorClassName),
|
|
764
|
-
children: /* @__PURE__ */ jsx12(Text9, { className: "text-white text-xs font-bold leading-none", children: "\u2713" })
|
|
765
|
-
}
|
|
766
|
-
)
|
|
818
|
+
children: isChecked ? /* @__PURE__ */ jsx12(View9, { className: cn("items-center justify-center", indicatorClassName), children: /* @__PURE__ */ jsx12(Text9, { className: "text-white text-xs font-bold leading-none", children: "\u2713" }) }) : null
|
|
767
819
|
}
|
|
768
820
|
);
|
|
769
821
|
if (!label) {
|
|
770
822
|
return content;
|
|
771
823
|
}
|
|
772
|
-
return /* @__PURE__ */ jsxs4(
|
|
824
|
+
return /* @__PURE__ */ jsxs4(View9, { className: "flex-row items-center gap-2.5", children: [
|
|
773
825
|
content,
|
|
774
826
|
/* @__PURE__ */ jsx12(
|
|
775
827
|
Text9,
|
|
776
828
|
{
|
|
777
|
-
onPress:
|
|
829
|
+
onPress: !disabled ? handlePress : void 0,
|
|
778
830
|
className: cn(
|
|
779
831
|
"text-sm font-medium text-neutral-800 dark:text-neutral-200",
|
|
780
|
-
|
|
832
|
+
disabled && "opacity-50",
|
|
781
833
|
labelClassName
|
|
782
834
|
),
|
|
783
835
|
children: label
|
|
@@ -789,7 +841,7 @@ Checkbox.displayName = "Checkbox";
|
|
|
789
841
|
|
|
790
842
|
// src/components/radio/radio.tsx
|
|
791
843
|
import * as React12 from "react";
|
|
792
|
-
import { View as
|
|
844
|
+
import { View as View10, Text as Text10, Pressable as Pressable5 } from "react-native";
|
|
793
845
|
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
794
846
|
var RadioGroupContext = React12.createContext({});
|
|
795
847
|
function RadioGroup({
|
|
@@ -816,7 +868,7 @@ function RadioGroup({
|
|
|
816
868
|
onValueChange: handleValueChange,
|
|
817
869
|
disabled
|
|
818
870
|
},
|
|
819
|
-
children: /* @__PURE__ */ jsx13(
|
|
871
|
+
children: /* @__PURE__ */ jsx13(View10, { className: cn("gap-3", className), ...props, children })
|
|
820
872
|
}
|
|
821
873
|
);
|
|
822
874
|
}
|
|
@@ -837,7 +889,7 @@ function Radio({
|
|
|
837
889
|
}
|
|
838
890
|
};
|
|
839
891
|
return /* @__PURE__ */ jsxs5(
|
|
840
|
-
|
|
892
|
+
Pressable5,
|
|
841
893
|
{
|
|
842
894
|
onPress: handlePress,
|
|
843
895
|
disabled: isDisabled,
|
|
@@ -846,7 +898,7 @@ function Radio({
|
|
|
846
898
|
className: cn("flex-row items-center gap-2.5", isDisabled && "opacity-50"),
|
|
847
899
|
children: [
|
|
848
900
|
/* @__PURE__ */ jsx13(
|
|
849
|
-
|
|
901
|
+
View10,
|
|
850
902
|
{
|
|
851
903
|
className: cn(
|
|
852
904
|
"h-5 w-5 rounded-full border border-neutral-300 dark:border-neutral-700 items-center justify-center bg-white dark:bg-neutral-900",
|
|
@@ -854,7 +906,7 @@ function Radio({
|
|
|
854
906
|
className
|
|
855
907
|
),
|
|
856
908
|
children: isSelected ? /* @__PURE__ */ jsx13(
|
|
857
|
-
|
|
909
|
+
View10,
|
|
858
910
|
{
|
|
859
911
|
className: cn(
|
|
860
912
|
"h-2.5 w-2.5 rounded-full bg-primary-600 dark:bg-primary-600",
|
|
@@ -880,7 +932,7 @@ function Radio({
|
|
|
880
932
|
}
|
|
881
933
|
|
|
882
934
|
// src/components/spinner/spinner.tsx
|
|
883
|
-
import { ActivityIndicator as ActivityIndicator2, View as
|
|
935
|
+
import { ActivityIndicator as ActivityIndicator2, View as View11 } from "react-native";
|
|
884
936
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
885
937
|
var colorMap = {
|
|
886
938
|
primary: "#2563eb",
|
|
@@ -899,7 +951,7 @@ function Spinner({
|
|
|
899
951
|
}) {
|
|
900
952
|
const nativeSize = size === "lg" ? "large" : "small";
|
|
901
953
|
const hexColor = colorMap[color] ?? colorMap.primary;
|
|
902
|
-
return /* @__PURE__ */ jsx14(
|
|
954
|
+
return /* @__PURE__ */ jsx14(View11, { className: cn("items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx14(ActivityIndicator2, { size: nativeSize, color: hexColor }) });
|
|
903
955
|
}
|
|
904
956
|
Spinner.displayName = "Spinner";
|
|
905
957
|
|
|
@@ -943,7 +995,7 @@ Skeleton.displayName = "Skeleton";
|
|
|
943
995
|
|
|
944
996
|
// src/components/alert/alert.tsx
|
|
945
997
|
import * as React14 from "react";
|
|
946
|
-
import { View as
|
|
998
|
+
import { View as View12, Text as Text11 } from "react-native";
|
|
947
999
|
import { cva as cva8 } from "class-variance-authority";
|
|
948
1000
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
949
1001
|
var alertVariants = cva8(
|
|
@@ -996,7 +1048,7 @@ function Alert({
|
|
|
996
1048
|
...props
|
|
997
1049
|
}) {
|
|
998
1050
|
return /* @__PURE__ */ jsx16(AlertContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx16(
|
|
999
|
-
|
|
1051
|
+
View12,
|
|
1000
1052
|
{
|
|
1001
1053
|
accessibilityRole: "alert",
|
|
1002
1054
|
className: cn(alertVariants({ variant }), className),
|
|
@@ -1040,7 +1092,7 @@ function AlertDescription({
|
|
|
1040
1092
|
AlertDescription.displayName = "Alert.Description";
|
|
1041
1093
|
|
|
1042
1094
|
// src/components/separator/separator.tsx
|
|
1043
|
-
import { View as
|
|
1095
|
+
import { View as View13 } from "react-native";
|
|
1044
1096
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1045
1097
|
function Separator({
|
|
1046
1098
|
orientation = "horizontal",
|
|
@@ -1048,7 +1100,7 @@ function Separator({
|
|
|
1048
1100
|
...props
|
|
1049
1101
|
}) {
|
|
1050
1102
|
return /* @__PURE__ */ jsx17(
|
|
1051
|
-
|
|
1103
|
+
View13,
|
|
1052
1104
|
{
|
|
1053
1105
|
accessibilityRole: "none",
|
|
1054
1106
|
className: cn(
|
|
@@ -1064,60 +1116,137 @@ Separator.displayName = "Separator";
|
|
|
1064
1116
|
|
|
1065
1117
|
// src/components/dialog/dialog.tsx
|
|
1066
1118
|
import * as React15 from "react";
|
|
1067
|
-
import {
|
|
1068
|
-
|
|
1119
|
+
import {
|
|
1120
|
+
Modal,
|
|
1121
|
+
View as View14,
|
|
1122
|
+
Text as Text12,
|
|
1123
|
+
Pressable as Pressable6,
|
|
1124
|
+
StyleSheet
|
|
1125
|
+
} from "react-native";
|
|
1069
1126
|
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1070
|
-
var
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1127
|
+
var DialogContext = React15.createContext(null);
|
|
1128
|
+
function useDialogContext() {
|
|
1129
|
+
const context = React15.useContext(DialogContext);
|
|
1130
|
+
if (!context) {
|
|
1131
|
+
throw new Error("Dialog compound components must be used within a Dialog component");
|
|
1132
|
+
}
|
|
1133
|
+
return context;
|
|
1134
|
+
}
|
|
1135
|
+
function Dialog({
|
|
1136
|
+
open: controlledOpen,
|
|
1137
|
+
defaultOpen = false,
|
|
1138
|
+
onOpenChange,
|
|
1139
|
+
children
|
|
1140
|
+
}) {
|
|
1141
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React15.useState(defaultOpen);
|
|
1142
|
+
const isControlled = controlledOpen !== void 0;
|
|
1143
|
+
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
1144
|
+
const handleOpenChange = React15.useCallback(
|
|
1145
|
+
(nextOpen) => {
|
|
1146
|
+
if (!isControlled) {
|
|
1147
|
+
setUncontrolledOpen(nextOpen);
|
|
1148
|
+
}
|
|
1149
|
+
onOpenChange?.(nextOpen);
|
|
1150
|
+
},
|
|
1151
|
+
[isControlled, onOpenChange]
|
|
1152
|
+
);
|
|
1153
|
+
return /* @__PURE__ */ jsx18(DialogContext.Provider, { value: { open, onOpenChange: handleOpenChange }, children });
|
|
1154
|
+
}
|
|
1155
|
+
Dialog.displayName = "Dialog";
|
|
1156
|
+
var DialogTrigger = React15.forwardRef(
|
|
1157
|
+
function DialogTrigger2({ asChild, children, onPress, ...props }, ref) {
|
|
1158
|
+
const { open, onOpenChange } = useDialogContext();
|
|
1159
|
+
const handlePress = (e) => {
|
|
1160
|
+
onOpenChange(!open);
|
|
1161
|
+
onPress?.(e);
|
|
1162
|
+
};
|
|
1163
|
+
if (asChild && React15.isValidElement(children)) {
|
|
1164
|
+
return React15.cloneElement(children, {
|
|
1165
|
+
ref,
|
|
1166
|
+
onPress: (e) => {
|
|
1167
|
+
children.props?.onPress?.(e);
|
|
1168
|
+
handlePress(e);
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
return /* @__PURE__ */ jsx18(Pressable6, { ref, onPress: handlePress, role: "button", ...props, children });
|
|
1173
|
+
}
|
|
1174
|
+
);
|
|
1175
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
1176
|
+
function DialogPortal({ children, forceMount }) {
|
|
1177
|
+
const { open, onOpenChange } = useDialogContext();
|
|
1178
|
+
if (!open && !forceMount) {
|
|
1179
|
+
return null;
|
|
1180
|
+
}
|
|
1075
1181
|
return /* @__PURE__ */ jsx18(
|
|
1076
|
-
|
|
1182
|
+
Modal,
|
|
1077
1183
|
{
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
...props
|
|
1184
|
+
transparent: true,
|
|
1185
|
+
visible: open,
|
|
1186
|
+
animationType: "fade",
|
|
1187
|
+
onRequestClose: () => onOpenChange(false),
|
|
1188
|
+
statusBarTranslucent: true,
|
|
1189
|
+
children
|
|
1085
1190
|
}
|
|
1086
1191
|
);
|
|
1087
|
-
}
|
|
1192
|
+
}
|
|
1193
|
+
DialogPortal.displayName = "DialogPortal";
|
|
1194
|
+
var DialogOverlay = React15.forwardRef(
|
|
1195
|
+
function DialogOverlay2({ className, closeOnPress = true, ...props }, ref) {
|
|
1196
|
+
const { onOpenChange } = useDialogContext();
|
|
1197
|
+
return /* @__PURE__ */ jsx18(
|
|
1198
|
+
Pressable6,
|
|
1199
|
+
{
|
|
1200
|
+
ref,
|
|
1201
|
+
style: StyleSheet.absoluteFill,
|
|
1202
|
+
className: cn("z-50 bg-black/60", className),
|
|
1203
|
+
onPress: () => {
|
|
1204
|
+
if (closeOnPress) {
|
|
1205
|
+
onOpenChange(false);
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
...props
|
|
1209
|
+
}
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1088
1213
|
DialogOverlay.displayName = "DialogOverlay";
|
|
1089
|
-
var DialogContent = React15.forwardRef(
|
|
1090
|
-
|
|
1091
|
-
/* @__PURE__ */ jsx18(
|
|
1092
|
-
|
|
1093
|
-
View13,
|
|
1214
|
+
var DialogContent = React15.forwardRef(
|
|
1215
|
+
function DialogContent2({ className, overlayClassName, children, ...props }, ref) {
|
|
1216
|
+
return /* @__PURE__ */ jsx18(DialogPortal, { children: /* @__PURE__ */ jsxs6(
|
|
1217
|
+
View14,
|
|
1094
1218
|
{
|
|
1095
1219
|
pointerEvents: "box-none",
|
|
1096
1220
|
style: StyleSheet.absoluteFill,
|
|
1097
1221
|
className: "z-50 items-center justify-center p-4",
|
|
1098
|
-
children:
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ jsx18(DialogOverlay, { className: overlayClassName }),
|
|
1224
|
+
/* @__PURE__ */ jsx18(
|
|
1225
|
+
View14,
|
|
1226
|
+
{
|
|
1227
|
+
ref,
|
|
1228
|
+
role: "dialog",
|
|
1229
|
+
"aria-modal": true,
|
|
1230
|
+
className: cn(
|
|
1231
|
+
"z-50 w-full max-w-lg rounded-2xl border border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 p-6 shadow-2xl",
|
|
1232
|
+
className
|
|
1233
|
+
),
|
|
1234
|
+
...props,
|
|
1235
|
+
children
|
|
1236
|
+
}
|
|
1237
|
+
)
|
|
1238
|
+
]
|
|
1110
1239
|
}
|
|
1111
|
-
)
|
|
1112
|
-
|
|
1113
|
-
|
|
1240
|
+
) });
|
|
1241
|
+
}
|
|
1242
|
+
);
|
|
1114
1243
|
DialogContent.displayName = "DialogContent";
|
|
1115
1244
|
function DialogHeader({
|
|
1116
1245
|
className,
|
|
1117
1246
|
...props
|
|
1118
1247
|
}) {
|
|
1119
1248
|
return /* @__PURE__ */ jsx18(
|
|
1120
|
-
|
|
1249
|
+
View14,
|
|
1121
1250
|
{
|
|
1122
1251
|
className: cn("flex-col space-y-2 text-center sm:text-left", className),
|
|
1123
1252
|
...props
|
|
@@ -1125,77 +1254,112 @@ function DialogHeader({
|
|
|
1125
1254
|
);
|
|
1126
1255
|
}
|
|
1127
1256
|
DialogHeader.displayName = "DialogHeader";
|
|
1128
|
-
var DialogTitle = React15.forwardRef(
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1257
|
+
var DialogTitle = React15.forwardRef(
|
|
1258
|
+
function DialogTitle2({ className, ...props }, ref) {
|
|
1259
|
+
return /* @__PURE__ */ jsx18(
|
|
1260
|
+
Text12,
|
|
1261
|
+
{
|
|
1262
|
+
ref,
|
|
1263
|
+
role: "heading",
|
|
1264
|
+
"aria-level": 2,
|
|
1265
|
+
className: cn(
|
|
1266
|
+
"text-xl font-bold tracking-tight text-neutral-900 dark:text-neutral-50",
|
|
1267
|
+
className
|
|
1268
|
+
),
|
|
1269
|
+
...props
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
);
|
|
1141
1274
|
DialogTitle.displayName = "DialogTitle";
|
|
1142
|
-
var DialogDescription = React15.forwardRef(
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1275
|
+
var DialogDescription = React15.forwardRef(
|
|
1276
|
+
function DialogDescription2({ className, ...props }, ref) {
|
|
1277
|
+
return /* @__PURE__ */ jsx18(
|
|
1278
|
+
Text12,
|
|
1279
|
+
{
|
|
1280
|
+
ref,
|
|
1281
|
+
className: cn(
|
|
1282
|
+
"text-sm text-neutral-500 dark:text-neutral-400 mt-1",
|
|
1283
|
+
className
|
|
1284
|
+
),
|
|
1285
|
+
...props
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
);
|
|
1152
1290
|
DialogDescription.displayName = "DialogDescription";
|
|
1153
1291
|
function DialogFooter({
|
|
1154
1292
|
className,
|
|
1155
1293
|
...props
|
|
1156
1294
|
}) {
|
|
1157
1295
|
return /* @__PURE__ */ jsx18(
|
|
1158
|
-
|
|
1296
|
+
View14,
|
|
1159
1297
|
{
|
|
1160
|
-
className: cn(
|
|
1161
|
-
"flex-row justify-end space-x-2 mt-6",
|
|
1162
|
-
className
|
|
1163
|
-
),
|
|
1298
|
+
className: cn("flex-row justify-end space-x-2 mt-6", className),
|
|
1164
1299
|
...props
|
|
1165
1300
|
}
|
|
1166
1301
|
);
|
|
1167
1302
|
}
|
|
1168
1303
|
DialogFooter.displayName = "DialogFooter";
|
|
1304
|
+
var DialogClose = React15.forwardRef(
|
|
1305
|
+
function DialogClose2({ asChild, children, onPress, ...props }, ref) {
|
|
1306
|
+
const { onOpenChange } = useDialogContext();
|
|
1307
|
+
const handlePress = (e) => {
|
|
1308
|
+
onOpenChange(false);
|
|
1309
|
+
onPress?.(e);
|
|
1310
|
+
};
|
|
1311
|
+
if (asChild && React15.isValidElement(children)) {
|
|
1312
|
+
return React15.cloneElement(children, {
|
|
1313
|
+
ref,
|
|
1314
|
+
onPress: (e) => {
|
|
1315
|
+
children.props?.onPress?.(e);
|
|
1316
|
+
handlePress(e);
|
|
1317
|
+
}
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
return /* @__PURE__ */ jsx18(Pressable6, { ref, onPress: handlePress, role: "button", ...props, children });
|
|
1321
|
+
}
|
|
1322
|
+
);
|
|
1323
|
+
DialogClose.displayName = "DialogClose";
|
|
1169
1324
|
|
|
1170
1325
|
// src/components/tabs/tabs.tsx
|
|
1171
1326
|
import * as React16 from "react";
|
|
1172
|
-
import {
|
|
1173
|
-
|
|
1327
|
+
import {
|
|
1328
|
+
View as View15,
|
|
1329
|
+
Text as Text13,
|
|
1330
|
+
Pressable as Pressable7
|
|
1331
|
+
} from "react-native";
|
|
1174
1332
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1175
|
-
var
|
|
1333
|
+
var TabsContext = React16.createContext(null);
|
|
1334
|
+
function useTabsContext() {
|
|
1335
|
+
const context = React16.useContext(TabsContext);
|
|
1336
|
+
if (!context) {
|
|
1337
|
+
throw new Error("Tabs compound components must be rendered inside a Tabs component");
|
|
1338
|
+
}
|
|
1339
|
+
return context;
|
|
1340
|
+
}
|
|
1341
|
+
var Tabs = React16.forwardRef(function Tabs2({ value: controlledValue, defaultValue = "", onValueChange, className, children, ...props }, ref) {
|
|
1176
1342
|
const [internalValue, setInternalValue] = React16.useState(defaultValue);
|
|
1177
1343
|
const isControlled = controlledValue !== void 0;
|
|
1178
1344
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
1179
|
-
const handleValueChange = (
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
value: currentValue,
|
|
1188
|
-
onValueChange: handleValueChange,
|
|
1189
|
-
...props
|
|
1190
|
-
}
|
|
1345
|
+
const handleValueChange = React16.useCallback(
|
|
1346
|
+
(val) => {
|
|
1347
|
+
if (!isControlled) {
|
|
1348
|
+
setInternalValue(val);
|
|
1349
|
+
}
|
|
1350
|
+
onValueChange?.(val);
|
|
1351
|
+
},
|
|
1352
|
+
[isControlled, onValueChange]
|
|
1191
1353
|
);
|
|
1354
|
+
return /* @__PURE__ */ jsx19(TabsContext.Provider, { value: { value: currentValue, onValueChange: handleValueChange }, children: /* @__PURE__ */ jsx19(View15, { ref, className, ...props, children }) });
|
|
1192
1355
|
});
|
|
1193
1356
|
Tabs.displayName = "Tabs";
|
|
1194
1357
|
var TabsList = React16.forwardRef(function TabsList2({ className, ...props }, ref) {
|
|
1195
1358
|
return /* @__PURE__ */ jsx19(
|
|
1196
|
-
|
|
1359
|
+
View15,
|
|
1197
1360
|
{
|
|
1198
1361
|
ref,
|
|
1362
|
+
role: "tablist",
|
|
1199
1363
|
className: cn(
|
|
1200
1364
|
"flex-row items-center justify-center rounded-xl bg-neutral-100 dark:bg-neutral-800 p-1",
|
|
1201
1365
|
className
|
|
@@ -1205,17 +1369,27 @@ var TabsList = React16.forwardRef(function TabsList2({ className, ...props }, re
|
|
|
1205
1369
|
);
|
|
1206
1370
|
});
|
|
1207
1371
|
TabsList.displayName = "TabsList";
|
|
1208
|
-
var TabsTrigger = React16.forwardRef(function TabsTrigger2({ className, textClassName, children, ...props }, ref) {
|
|
1209
|
-
const { value } =
|
|
1210
|
-
const isSelected =
|
|
1372
|
+
var TabsTrigger = React16.forwardRef(function TabsTrigger2({ value, className, textClassName, children, onPress, disabled, ...props }, ref) {
|
|
1373
|
+
const { value: selectedValue, onValueChange } = useTabsContext();
|
|
1374
|
+
const isSelected = selectedValue === value;
|
|
1375
|
+
const handlePress = (e) => {
|
|
1376
|
+
if (disabled) return;
|
|
1377
|
+
onValueChange(value);
|
|
1378
|
+
onPress?.(e);
|
|
1379
|
+
};
|
|
1211
1380
|
return /* @__PURE__ */ jsx19(
|
|
1212
|
-
|
|
1381
|
+
Pressable7,
|
|
1213
1382
|
{
|
|
1214
1383
|
ref,
|
|
1384
|
+
role: "tab",
|
|
1385
|
+
accessibilityRole: "tab",
|
|
1386
|
+
accessibilityState: { selected: isSelected, disabled: !!disabled },
|
|
1387
|
+
disabled,
|
|
1388
|
+
onPress: handlePress,
|
|
1215
1389
|
className: cn(
|
|
1216
1390
|
"flex-1 items-center justify-center rounded-lg py-2 px-3 transition-all",
|
|
1217
1391
|
isSelected ? "bg-white dark:bg-neutral-900 shadow-sm" : "bg-transparent opacity-70",
|
|
1218
|
-
|
|
1392
|
+
disabled && "opacity-40",
|
|
1219
1393
|
className
|
|
1220
1394
|
),
|
|
1221
1395
|
...props,
|
|
@@ -1234,13 +1408,21 @@ var TabsTrigger = React16.forwardRef(function TabsTrigger2({ className, textClas
|
|
|
1234
1408
|
);
|
|
1235
1409
|
});
|
|
1236
1410
|
TabsTrigger.displayName = "TabsTrigger";
|
|
1237
|
-
var TabsContent = React16.forwardRef(function TabsContent2({ className, ...props }, ref) {
|
|
1411
|
+
var TabsContent = React16.forwardRef(function TabsContent2({ value, className, forceMount, children, ...props }, ref) {
|
|
1412
|
+
const { value: selectedValue } = useTabsContext();
|
|
1413
|
+
const isSelected = selectedValue === value;
|
|
1414
|
+
if (!isSelected && !forceMount) {
|
|
1415
|
+
return null;
|
|
1416
|
+
}
|
|
1238
1417
|
return /* @__PURE__ */ jsx19(
|
|
1239
|
-
|
|
1418
|
+
View15,
|
|
1240
1419
|
{
|
|
1241
1420
|
ref,
|
|
1421
|
+
role: "tabpanel",
|
|
1422
|
+
accessibilityElementsHidden: !isSelected,
|
|
1242
1423
|
className: cn("mt-3", className),
|
|
1243
|
-
...props
|
|
1424
|
+
...props,
|
|
1425
|
+
children
|
|
1244
1426
|
}
|
|
1245
1427
|
);
|
|
1246
1428
|
});
|
|
@@ -1248,7 +1430,7 @@ TabsContent.displayName = "TabsContent";
|
|
|
1248
1430
|
|
|
1249
1431
|
// src/components/toast/toast.tsx
|
|
1250
1432
|
import * as React17 from "react";
|
|
1251
|
-
import { View as
|
|
1433
|
+
import { View as View16, Text as Text14, Pressable as Pressable8, Animated as Animated2 } from "react-native";
|
|
1252
1434
|
import { cva as cva9 } from "class-variance-authority";
|
|
1253
1435
|
import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1254
1436
|
var toastVariants = cva9(
|
|
@@ -1329,12 +1511,12 @@ function ToastBanner({ toast, onDismiss }) {
|
|
|
1329
1511
|
},
|
|
1330
1512
|
className: "w-full items-center px-4",
|
|
1331
1513
|
children: /* @__PURE__ */ jsxs7(
|
|
1332
|
-
|
|
1514
|
+
Pressable8,
|
|
1333
1515
|
{
|
|
1334
1516
|
onPress: handleDismiss,
|
|
1335
1517
|
className: cn(toastVariants({ variant })),
|
|
1336
1518
|
children: [
|
|
1337
|
-
/* @__PURE__ */ jsxs7(
|
|
1519
|
+
/* @__PURE__ */ jsxs7(View16, { className: "flex-1 pr-2", children: [
|
|
1338
1520
|
/* @__PURE__ */ jsx20(Text14, { className: cn(toastTitleVariants({ variant })), children: toast.title }),
|
|
1339
1521
|
toast.description ? /* @__PURE__ */ jsx20(Text14, { className: "text-xs text-neutral-600 dark:text-neutral-400 mt-0.5", children: toast.description }) : null
|
|
1340
1522
|
] }),
|
|
@@ -1351,7 +1533,7 @@ function ToastContainer({
|
|
|
1351
1533
|
}) {
|
|
1352
1534
|
if (toasts.length === 0) return null;
|
|
1353
1535
|
return /* @__PURE__ */ jsx20(
|
|
1354
|
-
|
|
1536
|
+
View16,
|
|
1355
1537
|
{
|
|
1356
1538
|
pointerEvents: "box-none",
|
|
1357
1539
|
className: "absolute top-12 left-0 right-0 z-50 items-center",
|
|
@@ -1372,7 +1554,7 @@ function useToast() {
|
|
|
1372
1554
|
}
|
|
1373
1555
|
|
|
1374
1556
|
// src/components/stats-card/stats-card.tsx
|
|
1375
|
-
import { View as
|
|
1557
|
+
import { View as View17, Text as Text15 } from "react-native";
|
|
1376
1558
|
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1377
1559
|
function StatsCard({
|
|
1378
1560
|
title,
|
|
@@ -1385,14 +1567,14 @@ function StatsCard({
|
|
|
1385
1567
|
const isUp = trend?.direction === "up";
|
|
1386
1568
|
const isDown = trend?.direction === "down";
|
|
1387
1569
|
return /* @__PURE__ */ jsx21(Card, { className: cn("w-full shadow-sm", className), ...props, children: /* @__PURE__ */ jsxs8(CardContent, { className: "p-4", children: [
|
|
1388
|
-
/* @__PURE__ */ jsxs8(
|
|
1570
|
+
/* @__PURE__ */ jsxs8(View17, { className: "flex-row items-center justify-between mb-2", children: [
|
|
1389
1571
|
/* @__PURE__ */ jsx21(Text15, { className: "text-sm font-medium text-neutral-500 dark:text-neutral-400", children: title }),
|
|
1390
|
-
icon ? /* @__PURE__ */ jsx21(
|
|
1572
|
+
icon ? /* @__PURE__ */ jsx21(View17, { className: "h-9 w-9 rounded-xl bg-neutral-100 dark:bg-neutral-800 items-center justify-center", children: icon }) : null
|
|
1391
1573
|
] }),
|
|
1392
1574
|
/* @__PURE__ */ jsx21(Text15, { className: "text-2xl font-extrabold tracking-tight text-neutral-900 dark:text-neutral-50 mb-2", children: value }),
|
|
1393
|
-
trend ? /* @__PURE__ */ jsxs8(
|
|
1575
|
+
trend ? /* @__PURE__ */ jsxs8(View17, { className: "flex-row items-center gap-1.5 flex-wrap", children: [
|
|
1394
1576
|
/* @__PURE__ */ jsxs8(
|
|
1395
|
-
|
|
1577
|
+
View17,
|
|
1396
1578
|
{
|
|
1397
1579
|
className: cn(
|
|
1398
1580
|
"flex-row items-center rounded-md px-1.5 py-0.5",
|
|
@@ -1437,8 +1619,8 @@ StatsCard.displayName = "StatsCard";
|
|
|
1437
1619
|
// src/components/accordion/accordion.tsx
|
|
1438
1620
|
import * as React19 from "react";
|
|
1439
1621
|
import {
|
|
1440
|
-
View as
|
|
1441
|
-
Pressable as
|
|
1622
|
+
View as View18,
|
|
1623
|
+
Pressable as Pressable9,
|
|
1442
1624
|
Animated as Animated3
|
|
1443
1625
|
} from "react-native";
|
|
1444
1626
|
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -1506,7 +1688,7 @@ var Accordion = React19.forwardRef(
|
|
|
1506
1688
|
collapsible
|
|
1507
1689
|
},
|
|
1508
1690
|
children: /* @__PURE__ */ jsx22(
|
|
1509
|
-
|
|
1691
|
+
View18,
|
|
1510
1692
|
{
|
|
1511
1693
|
ref,
|
|
1512
1694
|
className: cn("w-full divide-y divide-border", className),
|
|
@@ -1532,7 +1714,7 @@ var AccordionItem = React19.forwardRef(
|
|
|
1532
1714
|
const { value: selectedValues } = useAccordionContext();
|
|
1533
1715
|
const isOpen = selectedValues.includes(value);
|
|
1534
1716
|
return /* @__PURE__ */ jsx22(AccordionItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsx22(
|
|
1535
|
-
|
|
1717
|
+
View18,
|
|
1536
1718
|
{
|
|
1537
1719
|
ref,
|
|
1538
1720
|
className: cn("border-b border-border py-1", className),
|
|
@@ -1560,7 +1742,7 @@ var AccordionTrigger = React19.forwardRef(
|
|
|
1560
1742
|
outputRange: ["0deg", "180deg"]
|
|
1561
1743
|
});
|
|
1562
1744
|
return /* @__PURE__ */ jsxs9(
|
|
1563
|
-
|
|
1745
|
+
Pressable9,
|
|
1564
1746
|
{
|
|
1565
1747
|
ref,
|
|
1566
1748
|
onPress: () => toggleItem(value),
|
|
@@ -1572,7 +1754,7 @@ var AccordionTrigger = React19.forwardRef(
|
|
|
1572
1754
|
),
|
|
1573
1755
|
...props,
|
|
1574
1756
|
children: [
|
|
1575
|
-
/* @__PURE__ */ jsx22(
|
|
1757
|
+
/* @__PURE__ */ jsx22(View18, { className: "flex-1 pr-2", children: typeof children === "string" ? /* @__PURE__ */ jsx22(Text2, { className: "text-base font-medium text-foreground", children }) : children }),
|
|
1576
1758
|
/* @__PURE__ */ jsx22(Animated3.View, { style: { transform: [{ rotate }] }, children: /* @__PURE__ */ jsx22(Text2, { className: "text-muted text-base font-semibold", children: "\u25BC" }) })
|
|
1577
1759
|
]
|
|
1578
1760
|
}
|
|
@@ -1585,7 +1767,7 @@ var AccordionContent = React19.forwardRef(
|
|
|
1585
1767
|
const { isOpen } = useAccordionItemContext();
|
|
1586
1768
|
if (!isOpen) return null;
|
|
1587
1769
|
return /* @__PURE__ */ jsx22(
|
|
1588
|
-
|
|
1770
|
+
View18,
|
|
1589
1771
|
{
|
|
1590
1772
|
ref,
|
|
1591
1773
|
className: cn("pt-1 pb-3 px-1 text-sm text-muted", className),
|
|
@@ -1600,9 +1782,9 @@ AccordionContent.displayName = "AccordionContent";
|
|
|
1600
1782
|
// src/components/bottom-sheet/bottom-sheet.tsx
|
|
1601
1783
|
import * as React20 from "react";
|
|
1602
1784
|
import {
|
|
1603
|
-
Modal,
|
|
1604
|
-
View as
|
|
1605
|
-
Pressable as
|
|
1785
|
+
Modal as Modal2,
|
|
1786
|
+
View as View19,
|
|
1787
|
+
Pressable as Pressable10,
|
|
1606
1788
|
Animated as Animated4,
|
|
1607
1789
|
PanResponder,
|
|
1608
1790
|
Dimensions
|
|
@@ -1652,7 +1834,7 @@ var BottomSheetTrigger = React20.forwardRef(
|
|
|
1652
1834
|
onPress: handlePress
|
|
1653
1835
|
});
|
|
1654
1836
|
}
|
|
1655
|
-
return /* @__PURE__ */ jsx23(
|
|
1837
|
+
return /* @__PURE__ */ jsx23(Pressable10, { ref, onPress: handlePress, ...props, children });
|
|
1656
1838
|
}
|
|
1657
1839
|
);
|
|
1658
1840
|
BottomSheetTrigger.displayName = "BottomSheetTrigger";
|
|
@@ -1715,20 +1897,20 @@ var BottomSheetContent = React20.forwardRef(
|
|
|
1715
1897
|
).current;
|
|
1716
1898
|
if (!open) return null;
|
|
1717
1899
|
return /* @__PURE__ */ jsx23(
|
|
1718
|
-
|
|
1900
|
+
Modal2,
|
|
1719
1901
|
{
|
|
1720
1902
|
transparent: true,
|
|
1721
1903
|
visible: open,
|
|
1722
1904
|
animationType: "none",
|
|
1723
1905
|
onRequestClose: closeSheet,
|
|
1724
1906
|
statusBarTranslucent: true,
|
|
1725
|
-
children: /* @__PURE__ */ jsxs10(
|
|
1907
|
+
children: /* @__PURE__ */ jsxs10(View19, { className: "flex-1 justify-end", children: [
|
|
1726
1908
|
/* @__PURE__ */ jsx23(
|
|
1727
1909
|
Animated4.View,
|
|
1728
1910
|
{
|
|
1729
1911
|
style: { opacity: backdropOpacity },
|
|
1730
1912
|
className: "absolute inset-0 bg-black/60",
|
|
1731
|
-
children: /* @__PURE__ */ jsx23(
|
|
1913
|
+
children: /* @__PURE__ */ jsx23(Pressable10, { className: "flex-1", onPress: closeSheet })
|
|
1732
1914
|
}
|
|
1733
1915
|
),
|
|
1734
1916
|
/* @__PURE__ */ jsxs10(
|
|
@@ -1742,7 +1924,7 @@ var BottomSheetContent = React20.forwardRef(
|
|
|
1742
1924
|
),
|
|
1743
1925
|
...props,
|
|
1744
1926
|
children: [
|
|
1745
|
-
/* @__PURE__ */ jsx23(
|
|
1927
|
+
/* @__PURE__ */ jsx23(View19, { ...panResponder.panHandlers, className: "w-full py-2 items-center", children: /* @__PURE__ */ jsx23(View19, { className: "w-12 h-1.5 rounded-full bg-muted/40" }) }),
|
|
1746
1928
|
children
|
|
1747
1929
|
]
|
|
1748
1930
|
}
|
|
@@ -1754,7 +1936,7 @@ var BottomSheetContent = React20.forwardRef(
|
|
|
1754
1936
|
);
|
|
1755
1937
|
BottomSheetContent.displayName = "BottomSheetContent";
|
|
1756
1938
|
var BottomSheetHeader = React20.forwardRef(
|
|
1757
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1939
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(View19, { ref, className: cn("mb-4 gap-1", className), ...props, children })
|
|
1758
1940
|
);
|
|
1759
1941
|
BottomSheetHeader.displayName = "BottomSheetHeader";
|
|
1760
1942
|
var BottomSheetTitle = ({
|
|
@@ -1772,12 +1954,12 @@ var BottomSheetDescription = ({
|
|
|
1772
1954
|
};
|
|
1773
1955
|
BottomSheetDescription.displayName = "BottomSheetDescription";
|
|
1774
1956
|
var BottomSheetBody = React20.forwardRef(
|
|
1775
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1957
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(View19, { ref, className: cn("py-2", className), ...props, children })
|
|
1776
1958
|
);
|
|
1777
1959
|
BottomSheetBody.displayName = "BottomSheetBody";
|
|
1778
1960
|
var BottomSheetFooter = React20.forwardRef(
|
|
1779
1961
|
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1780
|
-
|
|
1962
|
+
View19,
|
|
1781
1963
|
{
|
|
1782
1964
|
ref,
|
|
1783
1965
|
className: cn("mt-6 flex-row items-center justify-end gap-3", className),
|
|
@@ -1800,7 +1982,7 @@ var BottomSheetClose = React20.forwardRef(
|
|
|
1800
1982
|
onPress: handlePress
|
|
1801
1983
|
});
|
|
1802
1984
|
}
|
|
1803
|
-
return /* @__PURE__ */ jsx23(
|
|
1985
|
+
return /* @__PURE__ */ jsx23(Pressable10, { ref, onPress: handlePress, ...props, children });
|
|
1804
1986
|
}
|
|
1805
1987
|
);
|
|
1806
1988
|
BottomSheetClose.displayName = "BottomSheetClose";
|
|
@@ -1808,9 +1990,9 @@ BottomSheetClose.displayName = "BottomSheetClose";
|
|
|
1808
1990
|
// src/components/select/select.tsx
|
|
1809
1991
|
import * as React21 from "react";
|
|
1810
1992
|
import {
|
|
1811
|
-
Modal as
|
|
1812
|
-
View as
|
|
1813
|
-
Pressable as
|
|
1993
|
+
Modal as Modal3,
|
|
1994
|
+
View as View20,
|
|
1995
|
+
Pressable as Pressable11,
|
|
1814
1996
|
ScrollView,
|
|
1815
1997
|
TextInput as TextInput3
|
|
1816
1998
|
} from "react-native";
|
|
@@ -1896,10 +2078,10 @@ var Select = ({
|
|
|
1896
2078
|
value: currentValue,
|
|
1897
2079
|
onSelect: handleSelect
|
|
1898
2080
|
},
|
|
1899
|
-
children: /* @__PURE__ */ jsxs11(
|
|
2081
|
+
children: /* @__PURE__ */ jsxs11(View20, { className: cn("w-full gap-1.5", className), children: [
|
|
1900
2082
|
label && /* @__PURE__ */ jsx24(Text2, { className: "text-sm font-medium text-foreground", children: label }),
|
|
1901
2083
|
children ? children : /* @__PURE__ */ jsxs11(
|
|
1902
|
-
|
|
2084
|
+
Pressable11,
|
|
1903
2085
|
{
|
|
1904
2086
|
disabled,
|
|
1905
2087
|
onPress: () => setOpen(true),
|
|
@@ -1926,21 +2108,21 @@ var Select = ({
|
|
|
1926
2108
|
),
|
|
1927
2109
|
error ? /* @__PURE__ */ jsx24(Text2, { className: "text-xs text-danger font-medium", children: error }) : helperText ? /* @__PURE__ */ jsx24(Text2, { className: "text-xs text-muted", children: helperText }) : null,
|
|
1928
2110
|
options && /* @__PURE__ */ jsx24(
|
|
1929
|
-
|
|
2111
|
+
Modal3,
|
|
1930
2112
|
{
|
|
1931
2113
|
transparent: true,
|
|
1932
2114
|
visible: open,
|
|
1933
2115
|
animationType: "fade",
|
|
1934
2116
|
onRequestClose: () => setOpen(false),
|
|
1935
2117
|
statusBarTranslucent: true,
|
|
1936
|
-
children: /* @__PURE__ */ jsxs11(
|
|
1937
|
-
/* @__PURE__ */ jsx24(
|
|
1938
|
-
/* @__PURE__ */ jsxs11(
|
|
1939
|
-
/* @__PURE__ */ jsxs11(
|
|
2118
|
+
children: /* @__PURE__ */ jsxs11(View20, { className: "flex-1 justify-end bg-black/60", children: [
|
|
2119
|
+
/* @__PURE__ */ jsx24(Pressable11, { className: "flex-1", onPress: () => setOpen(false) }),
|
|
2120
|
+
/* @__PURE__ */ jsxs11(View20, { className: "w-full bg-card rounded-t-3xl border-t border-border p-6 max-h-[75%]", children: [
|
|
2121
|
+
/* @__PURE__ */ jsxs11(View20, { className: "flex-row items-center justify-between pb-4 border-b border-border mb-3", children: [
|
|
1940
2122
|
/* @__PURE__ */ jsx24(Text2, { className: "text-lg font-bold text-foreground", children: label || placeholder }),
|
|
1941
|
-
/* @__PURE__ */ jsx24(
|
|
2123
|
+
/* @__PURE__ */ jsx24(Pressable11, { onPress: () => setOpen(false), className: "p-1", children: /* @__PURE__ */ jsx24(Text2, { className: "text-muted text-lg font-semibold", children: "\u2715" }) })
|
|
1942
2124
|
] }),
|
|
1943
|
-
searchable && /* @__PURE__ */ jsx24(
|
|
2125
|
+
searchable && /* @__PURE__ */ jsx24(View20, { className: "mb-4", children: /* @__PURE__ */ jsx24(
|
|
1944
2126
|
TextInput3,
|
|
1945
2127
|
{
|
|
1946
2128
|
value: searchQuery,
|
|
@@ -1950,10 +2132,10 @@ var Select = ({
|
|
|
1950
2132
|
className: "h-11 px-4 rounded-xl border border-border bg-background text-foreground text-base"
|
|
1951
2133
|
}
|
|
1952
2134
|
) }),
|
|
1953
|
-
/* @__PURE__ */ jsx24(ScrollView, { className: "max-h-80", showsVerticalScrollIndicator: false, children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx24(
|
|
2135
|
+
/* @__PURE__ */ jsx24(ScrollView, { className: "max-h-80", showsVerticalScrollIndicator: false, children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx24(View20, { className: "py-8 items-center", children: /* @__PURE__ */ jsx24(Text2, { className: "text-muted text-sm", children: "No options found" }) }) : filteredOptions.map((opt) => {
|
|
1954
2136
|
const isSelected = opt.value === currentValue;
|
|
1955
2137
|
return /* @__PURE__ */ jsxs11(
|
|
1956
|
-
|
|
2138
|
+
Pressable11,
|
|
1957
2139
|
{
|
|
1958
2140
|
disabled: opt.disabled,
|
|
1959
2141
|
onPress: () => handleSelect(opt.value),
|
|
@@ -1995,7 +2177,7 @@ var SelectTrigger = ({
|
|
|
1995
2177
|
}) => {
|
|
1996
2178
|
const { setOpen, open } = useSelectContext();
|
|
1997
2179
|
return /* @__PURE__ */ jsxs11(
|
|
1998
|
-
|
|
2180
|
+
Pressable11,
|
|
1999
2181
|
{
|
|
2000
2182
|
onPress: () => setOpen(true),
|
|
2001
2183
|
accessibilityRole: "combobox",
|
|
@@ -2035,19 +2217,19 @@ var SelectContent = ({ title, children }) => {
|
|
|
2035
2217
|
const { open, setOpen } = useSelectContext();
|
|
2036
2218
|
if (!open) return null;
|
|
2037
2219
|
return /* @__PURE__ */ jsx24(
|
|
2038
|
-
|
|
2220
|
+
Modal3,
|
|
2039
2221
|
{
|
|
2040
2222
|
transparent: true,
|
|
2041
2223
|
visible: open,
|
|
2042
2224
|
animationType: "fade",
|
|
2043
2225
|
onRequestClose: () => setOpen(false),
|
|
2044
2226
|
statusBarTranslucent: true,
|
|
2045
|
-
children: /* @__PURE__ */ jsxs11(
|
|
2046
|
-
/* @__PURE__ */ jsx24(
|
|
2047
|
-
/* @__PURE__ */ jsxs11(
|
|
2048
|
-
/* @__PURE__ */ jsxs11(
|
|
2227
|
+
children: /* @__PURE__ */ jsxs11(View20, { className: "flex-1 justify-end bg-black/60", children: [
|
|
2228
|
+
/* @__PURE__ */ jsx24(Pressable11, { className: "flex-1", onPress: () => setOpen(false) }),
|
|
2229
|
+
/* @__PURE__ */ jsxs11(View20, { className: "w-full bg-card rounded-t-3xl border-t border-border p-6 max-h-[75%]", children: [
|
|
2230
|
+
/* @__PURE__ */ jsxs11(View20, { className: "flex-row items-center justify-between pb-3 border-b border-border mb-3", children: [
|
|
2049
2231
|
/* @__PURE__ */ jsx24(Text2, { className: "text-lg font-bold text-foreground", children: title || "Select" }),
|
|
2050
|
-
/* @__PURE__ */ jsx24(
|
|
2232
|
+
/* @__PURE__ */ jsx24(Pressable11, { onPress: () => setOpen(false), className: "p-1", children: /* @__PURE__ */ jsx24(Text2, { className: "text-muted text-lg font-semibold", children: "\u2715" }) })
|
|
2051
2233
|
] }),
|
|
2052
2234
|
/* @__PURE__ */ jsx24(ScrollView, { className: "max-h-80", children })
|
|
2053
2235
|
] })
|
|
@@ -2064,7 +2246,7 @@ var SelectItem = ({
|
|
|
2064
2246
|
const { value: selectedValue, onSelect } = useSelectContext();
|
|
2065
2247
|
const isSelected = selectedValue === itemValue;
|
|
2066
2248
|
return /* @__PURE__ */ jsxs11(
|
|
2067
|
-
|
|
2249
|
+
Pressable11,
|
|
2068
2250
|
{
|
|
2069
2251
|
onPress: () => onSelect(itemValue),
|
|
2070
2252
|
className: cn(
|
|
@@ -2093,9 +2275,9 @@ SelectItem.displayName = "SelectItem";
|
|
|
2093
2275
|
// src/components/data-table/data-table.tsx
|
|
2094
2276
|
import * as React22 from "react";
|
|
2095
2277
|
import {
|
|
2096
|
-
View as
|
|
2278
|
+
View as View21,
|
|
2097
2279
|
ScrollView as ScrollView2,
|
|
2098
|
-
Pressable as
|
|
2280
|
+
Pressable as Pressable12
|
|
2099
2281
|
} from "react-native";
|
|
2100
2282
|
import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2101
2283
|
function DataTable({
|
|
@@ -2163,7 +2345,7 @@ function DataTable({
|
|
|
2163
2345
|
setSortDirection("asc");
|
|
2164
2346
|
}
|
|
2165
2347
|
};
|
|
2166
|
-
return /* @__PURE__ */ jsxs12(
|
|
2348
|
+
return /* @__PURE__ */ jsxs12(View21, { className: cn("w-full gap-4", className), ...props, children: [
|
|
2167
2349
|
searchable && /* @__PURE__ */ jsx25(
|
|
2168
2350
|
Input,
|
|
2169
2351
|
{
|
|
@@ -2176,10 +2358,10 @@ function DataTable({
|
|
|
2176
2358
|
className: "bg-card"
|
|
2177
2359
|
}
|
|
2178
2360
|
),
|
|
2179
|
-
loading ? /* @__PURE__ */ jsx25(
|
|
2361
|
+
loading ? /* @__PURE__ */ jsx25(View21, { className: "gap-3", children: [1, 2, 3].map((idx) => /* @__PURE__ */ jsx25(Skeleton, { className: "h-20 w-full rounded-2xl" }, idx)) }) : paginatedData.length === 0 ? /* @__PURE__ */ jsx25(Card, { className: "items-center justify-center p-8", children: /* @__PURE__ */ jsx25(Text2, { className: "text-muted text-base", children: emptyText }) }) : mode === "card" ? (
|
|
2180
2362
|
/* Mobile Card Mode */
|
|
2181
|
-
/* @__PURE__ */ jsx25(
|
|
2182
|
-
|
|
2363
|
+
/* @__PURE__ */ jsx25(View21, { className: "gap-3", children: paginatedData.map((item, idx) => /* @__PURE__ */ jsx25(
|
|
2364
|
+
Pressable12,
|
|
2183
2365
|
{
|
|
2184
2366
|
disabled: !onRowPress,
|
|
2185
2367
|
onPress: () => onRowPress?.(item),
|
|
@@ -2188,12 +2370,12 @@ function DataTable({
|
|
|
2188
2370
|
const rawVal = item[col.key];
|
|
2189
2371
|
const renderedVal = col.render ? col.render(rawVal, item) : String(rawVal ?? "\u2014");
|
|
2190
2372
|
return /* @__PURE__ */ jsxs12(
|
|
2191
|
-
|
|
2373
|
+
View21,
|
|
2192
2374
|
{
|
|
2193
2375
|
className: "flex-row items-center justify-between py-1 border-b border-border/40 last:border-b-0",
|
|
2194
2376
|
children: [
|
|
2195
2377
|
/* @__PURE__ */ jsx25(Text2, { className: "text-xs font-semibold text-muted uppercase tracking-wider", children: col.title }),
|
|
2196
|
-
/* @__PURE__ */ jsx25(
|
|
2378
|
+
/* @__PURE__ */ jsx25(View21, { className: "shrink", children: typeof renderedVal === "string" ? /* @__PURE__ */ jsx25(Text2, { className: "text-sm font-medium text-foreground", children: renderedVal }) : renderedVal })
|
|
2197
2379
|
]
|
|
2198
2380
|
},
|
|
2199
2381
|
String(col.key)
|
|
@@ -2204,9 +2386,9 @@ function DataTable({
|
|
|
2204
2386
|
)) })
|
|
2205
2387
|
) : (
|
|
2206
2388
|
/* Horizontal Table Mode */
|
|
2207
|
-
/* @__PURE__ */ jsx25(ScrollView2, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxs12(
|
|
2208
|
-
/* @__PURE__ */ jsx25(
|
|
2209
|
-
|
|
2389
|
+
/* @__PURE__ */ jsx25(ScrollView2, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsxs12(View21, { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
2390
|
+
/* @__PURE__ */ jsx25(View21, { className: "flex-row bg-muted/10 border-b border-border", children: columns.map((col) => /* @__PURE__ */ jsxs12(
|
|
2391
|
+
Pressable12,
|
|
2210
2392
|
{
|
|
2211
2393
|
disabled: !col.sortable,
|
|
2212
2394
|
onPress: () => handleSort(String(col.key)),
|
|
@@ -2220,7 +2402,7 @@ function DataTable({
|
|
|
2220
2402
|
String(col.key)
|
|
2221
2403
|
)) }),
|
|
2222
2404
|
paginatedData.map((item, idx) => /* @__PURE__ */ jsx25(
|
|
2223
|
-
|
|
2405
|
+
Pressable12,
|
|
2224
2406
|
{
|
|
2225
2407
|
disabled: !onRowPress,
|
|
2226
2408
|
onPress: () => onRowPress?.(item),
|
|
@@ -2229,7 +2411,7 @@ function DataTable({
|
|
|
2229
2411
|
const rawVal = item[col.key];
|
|
2230
2412
|
const renderedVal = col.render ? col.render(rawVal, item) : String(rawVal ?? "\u2014");
|
|
2231
2413
|
return /* @__PURE__ */ jsx25(
|
|
2232
|
-
|
|
2414
|
+
View21,
|
|
2233
2415
|
{
|
|
2234
2416
|
style: { width: col.width || 120 },
|
|
2235
2417
|
className: "px-4 py-3 justify-center",
|
|
@@ -2243,7 +2425,7 @@ function DataTable({
|
|
|
2243
2425
|
))
|
|
2244
2426
|
] }) })
|
|
2245
2427
|
),
|
|
2246
|
-
totalPages > 1 && /* @__PURE__ */ jsxs12(
|
|
2428
|
+
totalPages > 1 && /* @__PURE__ */ jsxs12(View21, { className: "flex-row items-center justify-between pt-2", children: [
|
|
2247
2429
|
/* @__PURE__ */ jsxs12(Text2, { className: "text-xs text-muted", children: [
|
|
2248
2430
|
"Showing ",
|
|
2249
2431
|
(currentPage - 1) * pageSize + 1,
|
|
@@ -2254,7 +2436,7 @@ function DataTable({
|
|
|
2254
2436
|
" ",
|
|
2255
2437
|
sortedData.length
|
|
2256
2438
|
] }),
|
|
2257
|
-
/* @__PURE__ */ jsxs12(
|
|
2439
|
+
/* @__PURE__ */ jsxs12(View21, { className: "flex-row items-center gap-2", children: [
|
|
2258
2440
|
/* @__PURE__ */ jsx25(
|
|
2259
2441
|
Button,
|
|
2260
2442
|
{
|
|
@@ -2288,11 +2470,11 @@ function DataTable({
|
|
|
2288
2470
|
// src/templates/auth/SignInTemplate.tsx
|
|
2289
2471
|
import * as React23 from "react";
|
|
2290
2472
|
import {
|
|
2291
|
-
View as
|
|
2473
|
+
View as View22,
|
|
2292
2474
|
ScrollView as ScrollView3,
|
|
2293
2475
|
KeyboardAvoidingView,
|
|
2294
2476
|
Platform,
|
|
2295
|
-
Pressable as
|
|
2477
|
+
Pressable as Pressable13
|
|
2296
2478
|
} from "react-native";
|
|
2297
2479
|
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2298
2480
|
var SignInTemplate = ({
|
|
@@ -2334,22 +2516,24 @@ var SignInTemplate = ({
|
|
|
2334
2516
|
KeyboardAvoidingView,
|
|
2335
2517
|
{
|
|
2336
2518
|
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
2519
|
+
style: { flex: 1 },
|
|
2337
2520
|
className: cn("flex-1 bg-background", className),
|
|
2338
2521
|
children: /* @__PURE__ */ jsx26(
|
|
2339
2522
|
ScrollView3,
|
|
2340
2523
|
{
|
|
2524
|
+
style: { flex: 1 },
|
|
2341
2525
|
contentContainerStyle: { flexGrow: 1, justifyContent: "center" },
|
|
2342
2526
|
className: "px-6 py-8",
|
|
2343
2527
|
keyboardShouldPersistTaps: "handled",
|
|
2344
2528
|
showsVerticalScrollIndicator: false,
|
|
2345
|
-
children: /* @__PURE__ */ jsxs13(
|
|
2346
|
-
/* @__PURE__ */ jsxs13(
|
|
2347
|
-
logo && /* @__PURE__ */ jsx26(
|
|
2529
|
+
children: /* @__PURE__ */ jsxs13(View22, { className: "w-full max-w-md mx-auto gap-6", children: [
|
|
2530
|
+
/* @__PURE__ */ jsxs13(View22, { className: "items-center gap-2", children: [
|
|
2531
|
+
logo && /* @__PURE__ */ jsx26(View22, { className: "mb-2", children: logo }),
|
|
2348
2532
|
/* @__PURE__ */ jsx26(Heading, { level: 2, className: "text-3xl font-extrabold text-foreground text-center", children: title }),
|
|
2349
2533
|
/* @__PURE__ */ jsx26(Text2, { className: "text-muted text-center text-base", children: subtitle })
|
|
2350
2534
|
] }),
|
|
2351
2535
|
error && /* @__PURE__ */ jsx26(Alert, { variant: "danger", children: /* @__PURE__ */ jsx26(AlertDescription, { children: error }) }),
|
|
2352
|
-
/* @__PURE__ */ jsxs13(
|
|
2536
|
+
/* @__PURE__ */ jsxs13(View22, { className: "gap-4", children: [
|
|
2353
2537
|
/* @__PURE__ */ jsx26(
|
|
2354
2538
|
Input,
|
|
2355
2539
|
{
|
|
@@ -2366,7 +2550,7 @@ var SignInTemplate = ({
|
|
|
2366
2550
|
error: emailError
|
|
2367
2551
|
}
|
|
2368
2552
|
),
|
|
2369
|
-
/* @__PURE__ */ jsx26(
|
|
2553
|
+
/* @__PURE__ */ jsx26(View22, { className: "gap-1", children: /* @__PURE__ */ jsx26(
|
|
2370
2554
|
Input,
|
|
2371
2555
|
{
|
|
2372
2556
|
label: "Password",
|
|
@@ -2378,15 +2562,15 @@ var SignInTemplate = ({
|
|
|
2378
2562
|
if (passwordError) setPasswordError(void 0);
|
|
2379
2563
|
},
|
|
2380
2564
|
error: passwordError,
|
|
2381
|
-
rightElement: /* @__PURE__ */ jsx26(
|
|
2565
|
+
rightElement: /* @__PURE__ */ jsx26(Pressable13, { onPress: () => setShowPassword((p) => !p), className: "p-1", children: /* @__PURE__ */ jsx26(Text2, { className: "text-xs text-muted font-semibold", children: showPassword ? "HIDE" : "SHOW" }) })
|
|
2382
2566
|
}
|
|
2383
2567
|
) }),
|
|
2384
|
-
/* @__PURE__ */ jsxs13(
|
|
2385
|
-
/* @__PURE__ */ jsxs13(
|
|
2568
|
+
/* @__PURE__ */ jsxs13(View22, { className: "flex-row items-center justify-between py-1", children: [
|
|
2569
|
+
/* @__PURE__ */ jsxs13(View22, { className: "flex-row items-center gap-2", children: [
|
|
2386
2570
|
/* @__PURE__ */ jsx26(Checkbox, { checked: rememberMe, onCheckedChange: setRememberMe }),
|
|
2387
2571
|
/* @__PURE__ */ jsx26(Text2, { className: "text-sm text-foreground", children: "Remember me" })
|
|
2388
2572
|
] }),
|
|
2389
|
-
onForgotPassword && /* @__PURE__ */ jsx26(
|
|
2573
|
+
onForgotPassword && /* @__PURE__ */ jsx26(Pressable13, { onPress: onForgotPassword, children: /* @__PURE__ */ jsx26(Text2, { className: "text-sm font-semibold text-primary", children: "Forgot password?" }) })
|
|
2390
2574
|
] }),
|
|
2391
2575
|
/* @__PURE__ */ jsx26(
|
|
2392
2576
|
Button,
|
|
@@ -2400,13 +2584,13 @@ var SignInTemplate = ({
|
|
|
2400
2584
|
}
|
|
2401
2585
|
)
|
|
2402
2586
|
] }),
|
|
2403
|
-
(onGooglePress || onApplePress) && /* @__PURE__ */ jsxs13(
|
|
2404
|
-
/* @__PURE__ */ jsxs13(
|
|
2587
|
+
(onGooglePress || onApplePress) && /* @__PURE__ */ jsxs13(View22, { className: "gap-4", children: [
|
|
2588
|
+
/* @__PURE__ */ jsxs13(View22, { className: "flex-row items-center gap-3", children: [
|
|
2405
2589
|
/* @__PURE__ */ jsx26(Separator, { className: "flex-1" }),
|
|
2406
2590
|
/* @__PURE__ */ jsx26(Text2, { className: "text-xs text-muted uppercase", children: "or continue with" }),
|
|
2407
2591
|
/* @__PURE__ */ jsx26(Separator, { className: "flex-1" })
|
|
2408
2592
|
] }),
|
|
2409
|
-
/* @__PURE__ */ jsxs13(
|
|
2593
|
+
/* @__PURE__ */ jsxs13(View22, { className: "flex-row gap-3", children: [
|
|
2410
2594
|
onGooglePress && /* @__PURE__ */ jsx26(
|
|
2411
2595
|
Button,
|
|
2412
2596
|
{
|
|
@@ -2427,9 +2611,9 @@ var SignInTemplate = ({
|
|
|
2427
2611
|
)
|
|
2428
2612
|
] })
|
|
2429
2613
|
] }),
|
|
2430
|
-
onSignUpPress && /* @__PURE__ */ jsxs13(
|
|
2614
|
+
onSignUpPress && /* @__PURE__ */ jsxs13(View22, { className: "flex-row justify-center items-center gap-1.5 pt-2", children: [
|
|
2431
2615
|
/* @__PURE__ */ jsx26(Text2, { className: "text-sm text-muted", children: "Don't have an account?" }),
|
|
2432
|
-
/* @__PURE__ */ jsx26(
|
|
2616
|
+
/* @__PURE__ */ jsx26(Pressable13, { onPress: onSignUpPress, children: /* @__PURE__ */ jsx26(Text2, { className: "text-sm font-bold text-primary", children: "Sign Up" }) })
|
|
2433
2617
|
] })
|
|
2434
2618
|
] })
|
|
2435
2619
|
}
|
|
@@ -2441,11 +2625,11 @@ var SignInTemplate = ({
|
|
|
2441
2625
|
// src/templates/auth/SignUpTemplate.tsx
|
|
2442
2626
|
import * as React24 from "react";
|
|
2443
2627
|
import {
|
|
2444
|
-
View as
|
|
2628
|
+
View as View23,
|
|
2445
2629
|
ScrollView as ScrollView4,
|
|
2446
2630
|
KeyboardAvoidingView as KeyboardAvoidingView2,
|
|
2447
2631
|
Platform as Platform2,
|
|
2448
|
-
Pressable as
|
|
2632
|
+
Pressable as Pressable14
|
|
2449
2633
|
} from "react-native";
|
|
2450
2634
|
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2451
2635
|
var SignUpTemplate = ({
|
|
@@ -2498,22 +2682,24 @@ var SignUpTemplate = ({
|
|
|
2498
2682
|
KeyboardAvoidingView2,
|
|
2499
2683
|
{
|
|
2500
2684
|
behavior: Platform2.OS === "ios" ? "padding" : "height",
|
|
2685
|
+
style: { flex: 1 },
|
|
2501
2686
|
className: cn("flex-1 bg-background", className),
|
|
2502
2687
|
children: /* @__PURE__ */ jsx27(
|
|
2503
2688
|
ScrollView4,
|
|
2504
2689
|
{
|
|
2690
|
+
style: { flex: 1 },
|
|
2505
2691
|
contentContainerStyle: { flexGrow: 1, justifyContent: "center" },
|
|
2506
2692
|
className: "px-6 py-8",
|
|
2507
2693
|
keyboardShouldPersistTaps: "handled",
|
|
2508
2694
|
showsVerticalScrollIndicator: false,
|
|
2509
|
-
children: /* @__PURE__ */ jsxs14(
|
|
2510
|
-
/* @__PURE__ */ jsxs14(
|
|
2511
|
-
logo && /* @__PURE__ */ jsx27(
|
|
2695
|
+
children: /* @__PURE__ */ jsxs14(View23, { className: "w-full max-w-md mx-auto gap-6", children: [
|
|
2696
|
+
/* @__PURE__ */ jsxs14(View23, { className: "items-center gap-2", children: [
|
|
2697
|
+
logo && /* @__PURE__ */ jsx27(View23, { className: "mb-2", children: logo }),
|
|
2512
2698
|
/* @__PURE__ */ jsx27(Heading, { level: 2, className: "text-3xl font-extrabold text-foreground text-center", children: title }),
|
|
2513
2699
|
/* @__PURE__ */ jsx27(Text2, { className: "text-muted text-center text-base", children: subtitle })
|
|
2514
2700
|
] }),
|
|
2515
2701
|
error && /* @__PURE__ */ jsx27(Alert, { variant: "danger", children: /* @__PURE__ */ jsx27(AlertDescription, { children: error }) }),
|
|
2516
|
-
/* @__PURE__ */ jsxs14(
|
|
2702
|
+
/* @__PURE__ */ jsxs14(View23, { className: "gap-4", children: [
|
|
2517
2703
|
/* @__PURE__ */ jsx27(
|
|
2518
2704
|
Input,
|
|
2519
2705
|
{
|
|
@@ -2556,8 +2742,8 @@ var SignUpTemplate = ({
|
|
|
2556
2742
|
error: passwordError
|
|
2557
2743
|
}
|
|
2558
2744
|
),
|
|
2559
|
-
/* @__PURE__ */ jsxs14(
|
|
2560
|
-
/* @__PURE__ */ jsxs14(
|
|
2745
|
+
/* @__PURE__ */ jsxs14(View23, { className: "gap-1", children: [
|
|
2746
|
+
/* @__PURE__ */ jsxs14(View23, { className: "flex-row items-center gap-2 pt-1", children: [
|
|
2561
2747
|
/* @__PURE__ */ jsx27(
|
|
2562
2748
|
Checkbox,
|
|
2563
2749
|
{
|
|
@@ -2584,13 +2770,13 @@ var SignUpTemplate = ({
|
|
|
2584
2770
|
}
|
|
2585
2771
|
)
|
|
2586
2772
|
] }),
|
|
2587
|
-
(onGooglePress || onApplePress) && /* @__PURE__ */ jsxs14(
|
|
2588
|
-
/* @__PURE__ */ jsxs14(
|
|
2773
|
+
(onGooglePress || onApplePress) && /* @__PURE__ */ jsxs14(View23, { className: "gap-4", children: [
|
|
2774
|
+
/* @__PURE__ */ jsxs14(View23, { className: "flex-row items-center gap-3", children: [
|
|
2589
2775
|
/* @__PURE__ */ jsx27(Separator, { className: "flex-1" }),
|
|
2590
2776
|
/* @__PURE__ */ jsx27(Text2, { className: "text-xs text-muted uppercase", children: "or continue with" }),
|
|
2591
2777
|
/* @__PURE__ */ jsx27(Separator, { className: "flex-1" })
|
|
2592
2778
|
] }),
|
|
2593
|
-
/* @__PURE__ */ jsxs14(
|
|
2779
|
+
/* @__PURE__ */ jsxs14(View23, { className: "flex-row gap-3", children: [
|
|
2594
2780
|
onGooglePress && /* @__PURE__ */ jsx27(
|
|
2595
2781
|
Button,
|
|
2596
2782
|
{
|
|
@@ -2611,9 +2797,9 @@ var SignUpTemplate = ({
|
|
|
2611
2797
|
)
|
|
2612
2798
|
] })
|
|
2613
2799
|
] }),
|
|
2614
|
-
onSignInPress && /* @__PURE__ */ jsxs14(
|
|
2800
|
+
onSignInPress && /* @__PURE__ */ jsxs14(View23, { className: "flex-row justify-center items-center gap-1.5 pt-2", children: [
|
|
2615
2801
|
/* @__PURE__ */ jsx27(Text2, { className: "text-sm text-muted", children: "Already have an account?" }),
|
|
2616
|
-
/* @__PURE__ */ jsx27(
|
|
2802
|
+
/* @__PURE__ */ jsx27(Pressable14, { onPress: onSignInPress, children: /* @__PURE__ */ jsx27(Text2, { className: "text-sm font-bold text-primary", children: "Sign In" }) })
|
|
2617
2803
|
] })
|
|
2618
2804
|
] })
|
|
2619
2805
|
}
|
|
@@ -2625,11 +2811,11 @@ var SignUpTemplate = ({
|
|
|
2625
2811
|
// src/templates/auth/ForgotPasswordTemplate.tsx
|
|
2626
2812
|
import * as React25 from "react";
|
|
2627
2813
|
import {
|
|
2628
|
-
View as
|
|
2814
|
+
View as View24,
|
|
2629
2815
|
ScrollView as ScrollView5,
|
|
2630
2816
|
KeyboardAvoidingView as KeyboardAvoidingView3,
|
|
2631
2817
|
Platform as Platform3,
|
|
2632
|
-
Pressable as
|
|
2818
|
+
Pressable as Pressable15
|
|
2633
2819
|
} from "react-native";
|
|
2634
2820
|
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2635
2821
|
var ForgotPasswordTemplate = ({
|
|
@@ -2656,24 +2842,26 @@ var ForgotPasswordTemplate = ({
|
|
|
2656
2842
|
KeyboardAvoidingView3,
|
|
2657
2843
|
{
|
|
2658
2844
|
behavior: Platform3.OS === "ios" ? "padding" : "height",
|
|
2845
|
+
style: { flex: 1 },
|
|
2659
2846
|
className: cn("flex-1 bg-background", className),
|
|
2660
2847
|
children: /* @__PURE__ */ jsx28(
|
|
2661
2848
|
ScrollView5,
|
|
2662
2849
|
{
|
|
2850
|
+
style: { flex: 1 },
|
|
2663
2851
|
contentContainerStyle: { flexGrow: 1, justifyContent: "center" },
|
|
2664
2852
|
className: "px-6 py-8",
|
|
2665
2853
|
keyboardShouldPersistTaps: "handled",
|
|
2666
2854
|
showsVerticalScrollIndicator: false,
|
|
2667
|
-
children: /* @__PURE__ */ jsxs15(
|
|
2668
|
-
/* @__PURE__ */ jsxs15(
|
|
2855
|
+
children: /* @__PURE__ */ jsxs15(View24, { className: "w-full max-w-md mx-auto gap-6", children: [
|
|
2856
|
+
/* @__PURE__ */ jsxs15(View24, { className: "items-center gap-2", children: [
|
|
2669
2857
|
/* @__PURE__ */ jsx28(Heading, { level: 2, className: "text-3xl font-extrabold text-foreground text-center", children: title }),
|
|
2670
2858
|
/* @__PURE__ */ jsx28(Text2, { className: "text-muted text-center text-base", children: subtitle })
|
|
2671
2859
|
] }),
|
|
2672
2860
|
error && /* @__PURE__ */ jsx28(Alert, { variant: "danger", children: /* @__PURE__ */ jsx28(AlertDescription, { children: error }) }),
|
|
2673
|
-
isSuccess ? /* @__PURE__ */ jsxs15(
|
|
2861
|
+
isSuccess ? /* @__PURE__ */ jsxs15(View24, { className: "gap-4", children: [
|
|
2674
2862
|
/* @__PURE__ */ jsx28(Alert, { variant: "success", children: /* @__PURE__ */ jsx28(AlertDescription, { children: "Password reset link sent! Check your email inbox." }) }),
|
|
2675
2863
|
onBackToSignIn && /* @__PURE__ */ jsx28(Button, { variant: "primary", size: "lg", onPress: onBackToSignIn, children: "Back to Sign In" })
|
|
2676
|
-
] }) : /* @__PURE__ */ jsxs15(
|
|
2864
|
+
] }) : /* @__PURE__ */ jsxs15(View24, { className: "gap-4", children: [
|
|
2677
2865
|
/* @__PURE__ */ jsx28(
|
|
2678
2866
|
Input,
|
|
2679
2867
|
{
|
|
@@ -2700,7 +2888,7 @@ var ForgotPasswordTemplate = ({
|
|
|
2700
2888
|
children: "Send Reset Link"
|
|
2701
2889
|
}
|
|
2702
2890
|
),
|
|
2703
|
-
onBackToSignIn && /* @__PURE__ */ jsx28(
|
|
2891
|
+
onBackToSignIn && /* @__PURE__ */ jsx28(View24, { className: "flex-row justify-center items-center gap-1.5 pt-2", children: /* @__PURE__ */ jsx28(Pressable15, { onPress: onBackToSignIn, children: /* @__PURE__ */ jsx28(Text2, { className: "text-sm font-semibold text-primary", children: "Back to Sign In" }) }) })
|
|
2704
2892
|
] })
|
|
2705
2893
|
] })
|
|
2706
2894
|
}
|
|
@@ -2711,9 +2899,9 @@ var ForgotPasswordTemplate = ({
|
|
|
2711
2899
|
|
|
2712
2900
|
// src/templates/dashboard/DashboardTemplate.tsx
|
|
2713
2901
|
import {
|
|
2714
|
-
View as
|
|
2902
|
+
View as View25,
|
|
2715
2903
|
ScrollView as ScrollView6,
|
|
2716
|
-
Pressable as
|
|
2904
|
+
Pressable as Pressable16
|
|
2717
2905
|
} from "react-native";
|
|
2718
2906
|
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2719
2907
|
var DashboardTemplate = ({
|
|
@@ -2732,18 +2920,19 @@ var DashboardTemplate = ({
|
|
|
2732
2920
|
return /* @__PURE__ */ jsxs16(
|
|
2733
2921
|
ScrollView6,
|
|
2734
2922
|
{
|
|
2923
|
+
...props,
|
|
2924
|
+
style: [{ flex: 1 }, props.style],
|
|
2735
2925
|
className: cn("flex-1 bg-background", className),
|
|
2736
2926
|
contentContainerStyle: { paddingBottom: 40 },
|
|
2737
2927
|
showsVerticalScrollIndicator: false,
|
|
2738
|
-
...props,
|
|
2739
2928
|
children: [
|
|
2740
|
-
/* @__PURE__ */ jsxs16(
|
|
2741
|
-
/* @__PURE__ */ jsxs16(
|
|
2929
|
+
/* @__PURE__ */ jsxs16(View25, { className: "px-6 pt-6 pb-4 flex-row items-center justify-between border-b border-border/40", children: [
|
|
2930
|
+
/* @__PURE__ */ jsxs16(View25, { className: "flex-row items-center gap-3", children: [
|
|
2742
2931
|
/* @__PURE__ */ jsxs16(Avatar, { size: "lg", children: [
|
|
2743
2932
|
userAvatarUrl && /* @__PURE__ */ jsx29(AvatarImage, { source: { uri: userAvatarUrl } }),
|
|
2744
2933
|
/* @__PURE__ */ jsx29(AvatarFallback, { text: userName.slice(0, 2).toUpperCase() })
|
|
2745
2934
|
] }),
|
|
2746
|
-
/* @__PURE__ */ jsxs16(
|
|
2935
|
+
/* @__PURE__ */ jsxs16(View25, { children: [
|
|
2747
2936
|
/* @__PURE__ */ jsx29(Text2, { className: "text-xs text-muted font-medium uppercase tracking-wider", children: userRole }),
|
|
2748
2937
|
/* @__PURE__ */ jsxs16(Heading, { level: 3, className: "text-xl font-bold text-foreground", children: [
|
|
2749
2938
|
"Hello, ",
|
|
@@ -2753,19 +2942,19 @@ var DashboardTemplate = ({
|
|
|
2753
2942
|
] })
|
|
2754
2943
|
] }),
|
|
2755
2944
|
onNotificationPress && /* @__PURE__ */ jsxs16(
|
|
2756
|
-
|
|
2945
|
+
Pressable16,
|
|
2757
2946
|
{
|
|
2758
2947
|
onPress: onNotificationPress,
|
|
2759
2948
|
className: "w-10 h-10 rounded-full border border-border bg-card items-center justify-center relative active:opacity-70",
|
|
2760
2949
|
children: [
|
|
2761
2950
|
/* @__PURE__ */ jsx29(Text2, { className: "text-base text-foreground", children: "\u{1F514}" }),
|
|
2762
|
-
unreadNotificationsCount > 0 && /* @__PURE__ */ jsx29(
|
|
2951
|
+
unreadNotificationsCount > 0 && /* @__PURE__ */ jsx29(View25, { className: "absolute -top-1 -right-1 w-5 h-5 rounded-full bg-danger items-center justify-center", children: /* @__PURE__ */ jsx29(Text2, { className: "text-[10px] font-bold text-white", children: unreadNotificationsCount > 9 ? "9+" : unreadNotificationsCount }) })
|
|
2763
2952
|
]
|
|
2764
2953
|
}
|
|
2765
2954
|
)
|
|
2766
2955
|
] }),
|
|
2767
|
-
/* @__PURE__ */ jsxs16(
|
|
2768
|
-
quickActions && quickActions.length > 0 && /* @__PURE__ */ jsxs16(
|
|
2956
|
+
/* @__PURE__ */ jsxs16(View25, { className: "px-6 pt-6 gap-6", children: [
|
|
2957
|
+
quickActions && quickActions.length > 0 && /* @__PURE__ */ jsxs16(View25, { className: "gap-2", children: [
|
|
2769
2958
|
/* @__PURE__ */ jsx29(Text2, { className: "text-xs font-bold text-muted uppercase tracking-wider", children: "Quick Actions" }),
|
|
2770
2959
|
/* @__PURE__ */ jsx29(
|
|
2771
2960
|
ScrollView6,
|
|
@@ -2773,7 +2962,7 @@ var DashboardTemplate = ({
|
|
|
2773
2962
|
horizontal: true,
|
|
2774
2963
|
showsHorizontalScrollIndicator: false,
|
|
2775
2964
|
className: "-mx-6 px-6",
|
|
2776
|
-
children: /* @__PURE__ */ jsx29(
|
|
2965
|
+
children: /* @__PURE__ */ jsx29(View25, { className: "flex-row gap-3", children: quickActions.map((action) => /* @__PURE__ */ jsx29(
|
|
2777
2966
|
Button,
|
|
2778
2967
|
{
|
|
2779
2968
|
variant: "outline",
|
|
@@ -2787,21 +2976,21 @@ var DashboardTemplate = ({
|
|
|
2787
2976
|
}
|
|
2788
2977
|
)
|
|
2789
2978
|
] }),
|
|
2790
|
-
/* @__PURE__ */ jsxs16(
|
|
2979
|
+
/* @__PURE__ */ jsxs16(View25, { className: "gap-3", children: [
|
|
2791
2980
|
/* @__PURE__ */ jsx29(Text2, { className: "text-xs font-bold text-muted uppercase tracking-wider", children: "Overview Performance" }),
|
|
2792
|
-
/* @__PURE__ */ jsx29(
|
|
2981
|
+
/* @__PURE__ */ jsx29(View25, { className: "gap-3", children: metrics.map((metric) => /* @__PURE__ */ jsx29(StatsCard, { ...metric }, metric.id)) })
|
|
2793
2982
|
] }),
|
|
2794
2983
|
recentActivities && recentActivities.length > 0 && /* @__PURE__ */ jsxs16(Card, { className: "gap-2", children: [
|
|
2795
2984
|
/* @__PURE__ */ jsxs16(CardHeader, { className: "flex-row items-center justify-between pb-2", children: [
|
|
2796
2985
|
/* @__PURE__ */ jsx29(CardTitle, { className: "text-base font-bold", children: "Recent Activity" }),
|
|
2797
|
-
onViewAllActivities && /* @__PURE__ */ jsx29(
|
|
2986
|
+
onViewAllActivities && /* @__PURE__ */ jsx29(Pressable16, { onPress: onViewAllActivities, children: /* @__PURE__ */ jsx29(Text2, { className: "text-xs font-semibold text-primary", children: "View all" }) })
|
|
2798
2987
|
] }),
|
|
2799
2988
|
/* @__PURE__ */ jsx29(CardContent, { className: "gap-3 pt-0", children: recentActivities.map((act) => /* @__PURE__ */ jsxs16(
|
|
2800
|
-
|
|
2989
|
+
View25,
|
|
2801
2990
|
{
|
|
2802
2991
|
className: "flex-row items-center justify-between py-2 border-b border-border/40 last:border-b-0",
|
|
2803
2992
|
children: [
|
|
2804
|
-
/* @__PURE__ */ jsxs16(
|
|
2993
|
+
/* @__PURE__ */ jsxs16(View25, { className: "flex-row items-center gap-3 flex-1 pr-2", children: [
|
|
2805
2994
|
/* @__PURE__ */ jsxs16(Avatar, { size: "sm", children: [
|
|
2806
2995
|
act.avatarUrl && /* @__PURE__ */ jsx29(AvatarImage, { source: { uri: act.avatarUrl } }),
|
|
2807
2996
|
/* @__PURE__ */ jsx29(
|
|
@@ -2811,7 +3000,7 @@ var DashboardTemplate = ({
|
|
|
2811
3000
|
}
|
|
2812
3001
|
)
|
|
2813
3002
|
] }),
|
|
2814
|
-
/* @__PURE__ */ jsxs16(
|
|
3003
|
+
/* @__PURE__ */ jsxs16(View25, { className: "flex-1", children: [
|
|
2815
3004
|
/* @__PURE__ */ jsx29(Text2, { className: "text-sm font-semibold text-foreground", numberOfLines: 1, children: act.title }),
|
|
2816
3005
|
/* @__PURE__ */ jsxs16(Text2, { className: "text-xs text-muted", numberOfLines: 1, children: [
|
|
2817
3006
|
act.subtitle,
|
|
@@ -2820,7 +3009,7 @@ var DashboardTemplate = ({
|
|
|
2820
3009
|
] })
|
|
2821
3010
|
] })
|
|
2822
3011
|
] }),
|
|
2823
|
-
/* @__PURE__ */ jsxs16(
|
|
3012
|
+
/* @__PURE__ */ jsxs16(View25, { className: "items-end gap-1", children: [
|
|
2824
3013
|
act.amount && /* @__PURE__ */ jsx29(Text2, { className: "text-sm font-bold text-foreground", children: act.amount }),
|
|
2825
3014
|
act.status && /* @__PURE__ */ jsx29(Badge, { variant: act.status.variant, size: "sm", children: act.status.label })
|
|
2826
3015
|
] })
|
|
@@ -2837,9 +3026,9 @@ var DashboardTemplate = ({
|
|
|
2837
3026
|
|
|
2838
3027
|
// src/templates/settings/SettingsTemplate.tsx
|
|
2839
3028
|
import {
|
|
2840
|
-
View as
|
|
3029
|
+
View as View26,
|
|
2841
3030
|
ScrollView as ScrollView7,
|
|
2842
|
-
Pressable as
|
|
3031
|
+
Pressable as Pressable17
|
|
2843
3032
|
} from "react-native";
|
|
2844
3033
|
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2845
3034
|
var SettingsTemplate = ({
|
|
@@ -2864,19 +3053,20 @@ var SettingsTemplate = ({
|
|
|
2864
3053
|
return /* @__PURE__ */ jsx30(
|
|
2865
3054
|
ScrollView7,
|
|
2866
3055
|
{
|
|
3056
|
+
...props,
|
|
3057
|
+
style: [{ flex: 1 }, props.style],
|
|
2867
3058
|
className: cn("flex-1 bg-background", className),
|
|
2868
3059
|
contentContainerStyle: { paddingBottom: 40 },
|
|
2869
3060
|
showsVerticalScrollIndicator: false,
|
|
2870
|
-
|
|
2871
|
-
children: /* @__PURE__ */ jsxs17(View24, { className: "px-6 pt-6 gap-6", children: [
|
|
3061
|
+
children: /* @__PURE__ */ jsxs17(View26, { className: "px-6 pt-6 gap-6", children: [
|
|
2872
3062
|
/* @__PURE__ */ jsx30(Heading, { level: 2, className: "text-2xl font-bold text-foreground", children: "Settings & Profile" }),
|
|
2873
3063
|
/* @__PURE__ */ jsxs17(Card, { className: "p-4 flex-row items-center gap-4", children: [
|
|
2874
3064
|
/* @__PURE__ */ jsxs17(Avatar, { size: "lg", children: [
|
|
2875
3065
|
user.avatarUrl && /* @__PURE__ */ jsx30(AvatarImage, { source: { uri: user.avatarUrl } }),
|
|
2876
3066
|
/* @__PURE__ */ jsx30(AvatarFallback, { text: user.name.slice(0, 2).toUpperCase() })
|
|
2877
3067
|
] }),
|
|
2878
|
-
/* @__PURE__ */ jsxs17(
|
|
2879
|
-
/* @__PURE__ */ jsxs17(
|
|
3068
|
+
/* @__PURE__ */ jsxs17(View26, { className: "flex-1", children: [
|
|
3069
|
+
/* @__PURE__ */ jsxs17(View26, { className: "flex-row items-center gap-2", children: [
|
|
2880
3070
|
/* @__PURE__ */ jsx30(Text2, { className: "text-base font-bold text-foreground", children: user.name }),
|
|
2881
3071
|
user.plan && /* @__PURE__ */ jsx30(Badge, { variant: "primary", size: "sm", children: user.plan })
|
|
2882
3072
|
] }),
|
|
@@ -2884,11 +3074,11 @@ var SettingsTemplate = ({
|
|
|
2884
3074
|
] }),
|
|
2885
3075
|
onEditProfile && /* @__PURE__ */ jsx30(Button, { variant: "outline", size: "sm", onPress: onEditProfile, children: "Edit" })
|
|
2886
3076
|
] }),
|
|
2887
|
-
/* @__PURE__ */ jsxs17(
|
|
3077
|
+
/* @__PURE__ */ jsxs17(View26, { className: "gap-2", children: [
|
|
2888
3078
|
/* @__PURE__ */ jsx30(Text2, { className: "text-xs font-bold text-muted uppercase tracking-wider px-1", children: "Preferences" }),
|
|
2889
3079
|
/* @__PURE__ */ jsxs17(Card, { className: "divide-y divide-border/50", children: [
|
|
2890
|
-
/* @__PURE__ */ jsxs17(
|
|
2891
|
-
/* @__PURE__ */ jsxs17(
|
|
3080
|
+
/* @__PURE__ */ jsxs17(View26, { className: "p-4 flex-row items-center justify-between", children: [
|
|
3081
|
+
/* @__PURE__ */ jsxs17(View26, { className: "pr-4 flex-1", children: [
|
|
2892
3082
|
/* @__PURE__ */ jsx30(Text2, { className: "text-sm font-semibold text-foreground", children: "Push Notifications" }),
|
|
2893
3083
|
/* @__PURE__ */ jsx30(Text2, { className: "text-xs text-muted", children: "Receive real-time alerts on your mobile device" })
|
|
2894
3084
|
] }),
|
|
@@ -2900,8 +3090,8 @@ var SettingsTemplate = ({
|
|
|
2900
3090
|
}
|
|
2901
3091
|
)
|
|
2902
3092
|
] }),
|
|
2903
|
-
/* @__PURE__ */ jsxs17(
|
|
2904
|
-
/* @__PURE__ */ jsxs17(
|
|
3093
|
+
/* @__PURE__ */ jsxs17(View26, { className: "p-4 flex-row items-center justify-between", children: [
|
|
3094
|
+
/* @__PURE__ */ jsxs17(View26, { className: "pr-4 flex-1", children: [
|
|
2905
3095
|
/* @__PURE__ */ jsx30(Text2, { className: "text-sm font-semibold text-foreground", children: "Email Notifications" }),
|
|
2906
3096
|
/* @__PURE__ */ jsx30(Text2, { className: "text-xs text-muted", children: "Weekly digests and activity summaries" })
|
|
2907
3097
|
] }),
|
|
@@ -2913,15 +3103,15 @@ var SettingsTemplate = ({
|
|
|
2913
3103
|
}
|
|
2914
3104
|
)
|
|
2915
3105
|
] }),
|
|
2916
|
-
/* @__PURE__ */ jsxs17(
|
|
2917
|
-
/* @__PURE__ */ jsxs17(
|
|
3106
|
+
/* @__PURE__ */ jsxs17(View26, { className: "p-4 flex-row items-center justify-between", children: [
|
|
3107
|
+
/* @__PURE__ */ jsxs17(View26, { className: "pr-4 flex-1", children: [
|
|
2918
3108
|
/* @__PURE__ */ jsx30(Text2, { className: "text-sm font-semibold text-foreground", children: "Dark Theme" }),
|
|
2919
3109
|
/* @__PURE__ */ jsx30(Text2, { className: "text-xs text-muted", children: "Enable high contrast dark mode appearance" })
|
|
2920
3110
|
] }),
|
|
2921
3111
|
/* @__PURE__ */ jsx30(Switch, { checked: isDarkMode, onCheckedChange: onToggleDarkMode })
|
|
2922
3112
|
] }),
|
|
2923
|
-
/* @__PURE__ */ jsxs17(
|
|
2924
|
-
/* @__PURE__ */ jsxs17(
|
|
3113
|
+
/* @__PURE__ */ jsxs17(View26, { className: "p-4 flex-row items-center justify-between", children: [
|
|
3114
|
+
/* @__PURE__ */ jsxs17(View26, { className: "pr-4 flex-1", children: [
|
|
2925
3115
|
/* @__PURE__ */ jsx30(Text2, { className: "text-sm font-semibold text-foreground", children: "Biometric Login" }),
|
|
2926
3116
|
/* @__PURE__ */ jsx30(Text2, { className: "text-xs text-muted", children: "Use Face ID or fingerprint to authenticate" })
|
|
2927
3117
|
] }),
|
|
@@ -2935,11 +3125,11 @@ var SettingsTemplate = ({
|
|
|
2935
3125
|
] })
|
|
2936
3126
|
] })
|
|
2937
3127
|
] }),
|
|
2938
|
-
/* @__PURE__ */ jsxs17(
|
|
3128
|
+
/* @__PURE__ */ jsxs17(View26, { className: "gap-2", children: [
|
|
2939
3129
|
/* @__PURE__ */ jsx30(Text2, { className: "text-xs font-bold text-muted uppercase tracking-wider px-1", children: "Account & Security" }),
|
|
2940
3130
|
/* @__PURE__ */ jsxs17(Card, { className: "divide-y divide-border/50", children: [
|
|
2941
3131
|
onChangePassword && /* @__PURE__ */ jsxs17(
|
|
2942
|
-
|
|
3132
|
+
Pressable17,
|
|
2943
3133
|
{
|
|
2944
3134
|
onPress: onChangePassword,
|
|
2945
3135
|
className: "p-4 flex-row items-center justify-between active:bg-muted/10",
|
|
@@ -2950,7 +3140,7 @@ var SettingsTemplate = ({
|
|
|
2950
3140
|
}
|
|
2951
3141
|
),
|
|
2952
3142
|
onViewTerms && /* @__PURE__ */ jsxs17(
|
|
2953
|
-
|
|
3143
|
+
Pressable17,
|
|
2954
3144
|
{
|
|
2955
3145
|
onPress: onViewTerms,
|
|
2956
3146
|
className: "p-4 flex-row items-center justify-between active:bg-muted/10",
|
|
@@ -2961,7 +3151,7 @@ var SettingsTemplate = ({
|
|
|
2961
3151
|
}
|
|
2962
3152
|
),
|
|
2963
3153
|
onViewPrivacy && /* @__PURE__ */ jsxs17(
|
|
2964
|
-
|
|
3154
|
+
Pressable17,
|
|
2965
3155
|
{
|
|
2966
3156
|
onPress: onViewPrivacy,
|
|
2967
3157
|
className: "p-4 flex-row items-center justify-between active:bg-muted/10",
|
|
@@ -2973,7 +3163,7 @@ var SettingsTemplate = ({
|
|
|
2973
3163
|
)
|
|
2974
3164
|
] })
|
|
2975
3165
|
] }),
|
|
2976
|
-
/* @__PURE__ */ jsxs17(
|
|
3166
|
+
/* @__PURE__ */ jsxs17(View26, { className: "gap-3 pt-2", children: [
|
|
2977
3167
|
onLogout && /* @__PURE__ */ jsx30(Button, { variant: "outline", size: "lg", onPress: onLogout, children: "Log Out" }),
|
|
2978
3168
|
onDeleteAccount && /* @__PURE__ */ jsx30(
|
|
2979
3169
|
Button,
|
|
@@ -2992,7 +3182,7 @@ var SettingsTemplate = ({
|
|
|
2992
3182
|
|
|
2993
3183
|
// src/providers/BeyondUIProvider.tsx
|
|
2994
3184
|
import * as React26 from "react";
|
|
2995
|
-
import { View as
|
|
3185
|
+
import { View as View27, useColorScheme as useRNColorScheme } from "react-native";
|
|
2996
3186
|
import { PortalHost } from "@rn-primitives/portal";
|
|
2997
3187
|
import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2998
3188
|
var BeyondUIContext = React26.createContext({
|
|
@@ -3048,11 +3238,18 @@ function BeyondUIProvider({
|
|
|
3048
3238
|
}),
|
|
3049
3239
|
[activeScheme, toggleColorScheme]
|
|
3050
3240
|
);
|
|
3051
|
-
return /* @__PURE__ */ jsx31(BeyondUIContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx31(ToastContext.Provider, { value: toastContextValue, children: /* @__PURE__ */ jsxs18(
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3241
|
+
return /* @__PURE__ */ jsx31(BeyondUIContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx31(ToastContext.Provider, { value: toastContextValue, children: /* @__PURE__ */ jsxs18(
|
|
3242
|
+
View27,
|
|
3243
|
+
{
|
|
3244
|
+
style: { flex: 1 },
|
|
3245
|
+
className: activeScheme === "dark" ? "dark flex-1" : "flex-1",
|
|
3246
|
+
children: [
|
|
3247
|
+
children,
|
|
3248
|
+
/* @__PURE__ */ jsx31(PortalHost, {}),
|
|
3249
|
+
/* @__PURE__ */ jsx31(ToastContainer, { toasts, onDismiss: dismissToast })
|
|
3250
|
+
]
|
|
3251
|
+
}
|
|
3252
|
+
) }) });
|
|
3056
3253
|
}
|
|
3057
3254
|
export {
|
|
3058
3255
|
Accordion,
|
|
@@ -3092,6 +3289,7 @@ export {
|
|
|
3092
3289
|
Dialog,
|
|
3093
3290
|
DialogClose,
|
|
3094
3291
|
DialogContent,
|
|
3292
|
+
DialogContext,
|
|
3095
3293
|
DialogDescription,
|
|
3096
3294
|
DialogFooter,
|
|
3097
3295
|
DialogHeader,
|
|
@@ -3120,6 +3318,7 @@ export {
|
|
|
3120
3318
|
Switch,
|
|
3121
3319
|
Tabs,
|
|
3122
3320
|
TabsContent,
|
|
3321
|
+
TabsContext,
|
|
3123
3322
|
TabsList,
|
|
3124
3323
|
TabsTrigger,
|
|
3125
3324
|
Text2 as Text,
|
|
@@ -3146,6 +3345,8 @@ export {
|
|
|
3146
3345
|
textVariants,
|
|
3147
3346
|
tokens,
|
|
3148
3347
|
useBeyondUI,
|
|
3348
|
+
useDialogContext,
|
|
3349
|
+
useTabsContext,
|
|
3149
3350
|
useToast
|
|
3150
3351
|
};
|
|
3151
3352
|
//# sourceMappingURL=index.mjs.map
|