@blinkdotnew/mobile-ui 2.0.0-alpha.5 → 2.0.0-alpha.6
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 +314 -3
- package/dist/index.d.ts +314 -3
- package/dist/index.js +1254 -190
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1207 -170
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,76 +20,103 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
Accordion: () => Accordion,
|
|
24
|
+
ActionSheet: () => ActionSheet,
|
|
25
|
+
AlertDialog: () => import_tamagui49.AlertDialog,
|
|
26
|
+
AppHeader: () => AppHeader,
|
|
27
|
+
Avatar: () => import_tamagui49.Avatar,
|
|
25
28
|
Badge: () => Badge,
|
|
26
29
|
BlinkAvatar: () => Avatar,
|
|
27
30
|
BlinkButton: () => Button,
|
|
28
31
|
BlinkCard: () => Card,
|
|
29
32
|
BlinkInput: () => Input,
|
|
30
33
|
BlinkText: () => BlinkText,
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
BlinkTooltip: () => BlinkTooltip,
|
|
35
|
+
BottomSheet: () => BottomSheet,
|
|
36
|
+
Button: () => import_tamagui49.Button,
|
|
37
|
+
Card: () => import_tamagui49.Card,
|
|
38
|
+
Carousel: () => Carousel,
|
|
33
39
|
ChatBubble: () => ChatBubble,
|
|
34
|
-
Checkbox: () =>
|
|
35
|
-
Circle: () =>
|
|
36
|
-
|
|
40
|
+
Checkbox: () => import_tamagui49.Checkbox,
|
|
41
|
+
Circle: () => import_tamagui49.Circle,
|
|
42
|
+
Container: () => Container,
|
|
43
|
+
Dialog: () => import_tamagui49.Dialog,
|
|
37
44
|
DialogProvider: () => DialogProvider,
|
|
38
45
|
Divider: () => Divider,
|
|
39
46
|
EmptyState: () => EmptyState,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
FloatingActionButton: () => FloatingActionButton,
|
|
48
|
+
FormField: () => FormField,
|
|
49
|
+
Grid: () => Grid,
|
|
50
|
+
H1: () => import_tamagui49.H1,
|
|
51
|
+
H2: () => import_tamagui49.H2,
|
|
52
|
+
H3: () => import_tamagui49.H3,
|
|
53
|
+
H4: () => import_tamagui49.H4,
|
|
54
|
+
H5: () => import_tamagui49.H5,
|
|
55
|
+
H6: () => import_tamagui49.H6,
|
|
56
|
+
ICONS: () => ICONS,
|
|
57
|
+
Icon: () => Icon,
|
|
46
58
|
Image: () => Image2,
|
|
47
|
-
Input: () =>
|
|
59
|
+
Input: () => import_tamagui49.Input,
|
|
48
60
|
KeyboardStickyFooter: () => KeyboardStickyFooter,
|
|
49
|
-
Label: () =>
|
|
61
|
+
Label: () => import_tamagui49.Label,
|
|
50
62
|
ListItem: () => ListItem,
|
|
63
|
+
LoginScreen: () => LoginScreen,
|
|
64
|
+
MediaCard: () => MediaCard,
|
|
65
|
+
NotificationBanner: () => NotificationBanner,
|
|
51
66
|
OnboardingCarousel: () => OnboardingCarousel,
|
|
52
67
|
PageContainer: () => PageContainer,
|
|
53
68
|
PageMainContainer: () => PageMainContainer,
|
|
54
|
-
Paragraph: () =>
|
|
69
|
+
Paragraph: () => import_tamagui49.Paragraph,
|
|
55
70
|
PaywallScreen: () => PaywallScreen,
|
|
56
|
-
Popover: () =>
|
|
71
|
+
Popover: () => import_tamagui49.Popover,
|
|
57
72
|
Pressable: () => Pressable,
|
|
58
73
|
ProfileHeader: () => ProfileHeader,
|
|
59
|
-
Progress: () =>
|
|
60
|
-
|
|
74
|
+
Progress: () => import_tamagui49.Progress,
|
|
75
|
+
ProgressSteps: () => ProgressSteps,
|
|
76
|
+
PullToRefresh: () => PullToRefresh,
|
|
77
|
+
RadioGroup: () => import_tamagui49.RadioGroup,
|
|
78
|
+
SafeArea: () => SafeArea,
|
|
61
79
|
ScreenLayout: () => ScreenLayout,
|
|
62
|
-
ScrollView: () =>
|
|
80
|
+
ScrollView: () => import_tamagui49.ScrollView,
|
|
81
|
+
SearchBar: () => SearchBar,
|
|
63
82
|
Section: () => Section,
|
|
64
|
-
Select: () =>
|
|
83
|
+
Select: () => import_tamagui49.Select,
|
|
65
84
|
SepHeading: () => SepHeading,
|
|
66
|
-
Separator: () =>
|
|
85
|
+
Separator: () => import_tamagui49.Separator,
|
|
67
86
|
SettingsScreen: () => SettingsScreen,
|
|
68
|
-
Sheet: () =>
|
|
69
|
-
SizableText: () =>
|
|
70
|
-
|
|
71
|
-
|
|
87
|
+
Sheet: () => import_tamagui49.Sheet,
|
|
88
|
+
SizableText: () => import_tamagui49.SizableText,
|
|
89
|
+
Skeleton: () => Skeleton,
|
|
90
|
+
Slider: () => import_tamagui49.Slider,
|
|
91
|
+
Spinner: () => import_tamagui49.Spinner,
|
|
72
92
|
StepPageLayout: () => StepPageLayout,
|
|
73
93
|
SubHeading: () => SubHeading,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
SwipeableRow: () => SwipeableRow,
|
|
95
|
+
Switch: () => import_tamagui49.Switch,
|
|
96
|
+
TabBar: () => TabBar,
|
|
97
|
+
Tabs: () => Tabs,
|
|
98
|
+
TamaguiImage: () => import_tamagui49.Image,
|
|
99
|
+
TamaguiProvider: () => import_tamagui49.TamaguiProvider,
|
|
100
|
+
Text: () => import_tamagui49.Text,
|
|
101
|
+
TextArea: () => import_tamagui49.TextArea,
|
|
102
|
+
Theme: () => import_tamagui49.Theme,
|
|
103
|
+
ToastProvider: () => ToastProvider,
|
|
104
|
+
ToggleGroup: () => ToggleGroup,
|
|
105
|
+
Tooltip: () => import_tamagui49.Tooltip,
|
|
106
|
+
View: () => import_tamagui49.View,
|
|
107
|
+
XStack: () => import_tamagui49.XStack,
|
|
108
|
+
YStack: () => import_tamagui49.YStack,
|
|
109
|
+
ZStack: () => import_tamagui49.ZStack,
|
|
85
110
|
blinkConfig: () => blinkConfig,
|
|
86
111
|
dialogConfirm: () => dialogConfirm,
|
|
87
112
|
showError: () => showError,
|
|
88
|
-
styled: () =>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
113
|
+
styled: () => import_tamagui49.styled,
|
|
114
|
+
toast: () => toast,
|
|
115
|
+
useMedia: () => import_tamagui49.useMedia,
|
|
116
|
+
useTheme: () => import_tamagui49.useTheme,
|
|
117
|
+
useThemeName: () => import_tamagui49.useThemeName,
|
|
118
|
+
useToast: () => useToast,
|
|
119
|
+
withStaticProperties: () => import_tamagui49.withStaticProperties
|
|
93
120
|
});
|
|
94
121
|
module.exports = __toCommonJS(index_exports);
|
|
95
122
|
|
|
@@ -101,7 +128,7 @@ var blinkConfig = (0, import_tamagui.createTamagui)({
|
|
|
101
128
|
});
|
|
102
129
|
|
|
103
130
|
// src/index.ts
|
|
104
|
-
var
|
|
131
|
+
var import_tamagui49 = require("tamagui");
|
|
105
132
|
|
|
106
133
|
// src/primitives/Button.tsx
|
|
107
134
|
var import_tamagui2 = require("tamagui");
|
|
@@ -575,23 +602,310 @@ function Badge({ children, variant = "default" }) {
|
|
|
575
602
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BadgeFrame, { variant, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BadgeText, { children }) });
|
|
576
603
|
}
|
|
577
604
|
|
|
578
|
-
// src/
|
|
605
|
+
// src/interface/Icon.tsx
|
|
579
606
|
var import_tamagui13 = require("tamagui");
|
|
580
607
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
608
|
+
var ICONS = {
|
|
609
|
+
home: "\u2302",
|
|
610
|
+
search: "\u2315",
|
|
611
|
+
back: "\u2039",
|
|
612
|
+
forward: "\u203A",
|
|
613
|
+
close: "\u2715",
|
|
614
|
+
menu: "\u2630",
|
|
615
|
+
more: "\u22EF",
|
|
616
|
+
plus: "+",
|
|
617
|
+
minus: "\u2212",
|
|
618
|
+
check: "\u2713",
|
|
619
|
+
star: "\u2605",
|
|
620
|
+
starOutline: "\u2606",
|
|
621
|
+
heart: "\u2665",
|
|
622
|
+
heartOutline: "\u2661",
|
|
623
|
+
share: "\u2934",
|
|
624
|
+
edit: "\u270E",
|
|
625
|
+
trash: "\u232B",
|
|
626
|
+
copy: "\u2398",
|
|
627
|
+
chat: "\u{1F4AC}",
|
|
628
|
+
mail: "\u2709",
|
|
629
|
+
bell: "\u{1F514}",
|
|
630
|
+
bellOff: "\u{1F515}",
|
|
631
|
+
send: "\u27A4",
|
|
632
|
+
play: "\u25B6",
|
|
633
|
+
pause: "\u23F8",
|
|
634
|
+
camera: "\u{1F4F7}",
|
|
635
|
+
image: "\u{1F5BC}",
|
|
636
|
+
info: "\u2139",
|
|
637
|
+
warning: "\u26A0",
|
|
638
|
+
error: "\u2715",
|
|
639
|
+
success: "\u2713",
|
|
640
|
+
loading: "\u27F3",
|
|
641
|
+
user: "\u{1F464}",
|
|
642
|
+
users: "\u{1F465}",
|
|
643
|
+
settings: "\u2699",
|
|
644
|
+
lock: "\u{1F512}",
|
|
645
|
+
unlock: "\u{1F513}",
|
|
646
|
+
arrowUp: "\u2191",
|
|
647
|
+
arrowDown: "\u2193",
|
|
648
|
+
arrowLeft: "\u2190",
|
|
649
|
+
arrowRight: "\u2192",
|
|
650
|
+
chevronUp: "\u2303",
|
|
651
|
+
chevronDown: "\u2304",
|
|
652
|
+
chevronLeft: "\u2039",
|
|
653
|
+
chevronRight: "\u203A"
|
|
654
|
+
};
|
|
655
|
+
function Icon({ name, size = 20, color = "$color12" }) {
|
|
656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
657
|
+
import_tamagui13.SizableText,
|
|
658
|
+
{
|
|
659
|
+
fontSize: size,
|
|
660
|
+
lineHeight: size,
|
|
661
|
+
color,
|
|
662
|
+
textAlign: "center",
|
|
663
|
+
width: size,
|
|
664
|
+
height: size,
|
|
665
|
+
children: ICONS[name]
|
|
666
|
+
}
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// src/interface/Accordion.tsx
|
|
671
|
+
var import_react3 = require("react");
|
|
672
|
+
var import_tamagui14 = require("tamagui");
|
|
673
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
674
|
+
function Accordion({ items, defaultOpen, allowMultiple = false }) {
|
|
675
|
+
const [openIds, setOpenIds] = (0, import_react3.useState)(defaultOpen ? [defaultOpen] : []);
|
|
676
|
+
const toggle = (id) => {
|
|
677
|
+
setOpenIds((prev) => {
|
|
678
|
+
if (prev.includes(id)) return prev.filter((i) => i !== id);
|
|
679
|
+
return allowMultiple ? [...prev, id] : [id];
|
|
680
|
+
});
|
|
681
|
+
};
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.YStack, { children: items.map((item, index) => {
|
|
683
|
+
const isOpen = openIds.includes(item.id);
|
|
684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_tamagui14.YStack, { children: [
|
|
685
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.Separator, { borderColor: "$borderColor" }),
|
|
686
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
687
|
+
import_tamagui14.XStack,
|
|
688
|
+
{
|
|
689
|
+
paddingVertical: "$3",
|
|
690
|
+
paddingHorizontal: "$2",
|
|
691
|
+
justifyContent: "space-between",
|
|
692
|
+
alignItems: "center",
|
|
693
|
+
pressStyle: { opacity: 0.7 },
|
|
694
|
+
onPress: () => toggle(item.id),
|
|
695
|
+
cursor: "pointer",
|
|
696
|
+
children: [
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.SizableText, { size: "$4", fontWeight: "600", children: item.title }),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.SizableText, { size: "$3", color: "$color10", children: isOpen ? "\u2303" : "\u2304" })
|
|
699
|
+
]
|
|
700
|
+
}
|
|
701
|
+
),
|
|
702
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.YStack, { paddingHorizontal: "$2", paddingBottom: "$3", children: item.content })
|
|
703
|
+
] }, item.id);
|
|
704
|
+
}) });
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// src/interface/Tabs.tsx
|
|
708
|
+
var import_react4 = require("react");
|
|
709
|
+
var import_react_native = require("react-native");
|
|
710
|
+
var import_tamagui15 = require("tamagui");
|
|
711
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
712
|
+
function Tabs({ tabs, activeTab, onTabChange, variant = "underline" }) {
|
|
713
|
+
const [internalActive, setInternalActive] = (0, import_react4.useState)(tabs[0]?.id ?? "");
|
|
714
|
+
const current = activeTab ?? internalActive;
|
|
715
|
+
const handlePress = (id) => {
|
|
716
|
+
if (!activeTab) setInternalActive(id);
|
|
717
|
+
onTabChange?.(id);
|
|
718
|
+
};
|
|
719
|
+
const activeContent = tabs.find((t) => t.id === current)?.content;
|
|
720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_tamagui15.YStack, { flex: 1, children: [
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tamagui15.XStack, { gap: "$2", paddingHorizontal: "$2", paddingBottom: "$2", children: tabs.map((tab) => {
|
|
722
|
+
const isActive = tab.id === current;
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
724
|
+
import_tamagui15.YStack,
|
|
725
|
+
{
|
|
726
|
+
paddingVertical: "$2",
|
|
727
|
+
paddingHorizontal: "$3",
|
|
728
|
+
borderRadius: variant === "pill" ? "$4" : "$0",
|
|
729
|
+
backgroundColor: variant === "pill" && isActive ? "$color9" : "transparent",
|
|
730
|
+
borderBottomWidth: variant === "underline" ? 2 : 0,
|
|
731
|
+
borderBottomColor: variant === "underline" && isActive ? "$color9" : "transparent",
|
|
732
|
+
pressStyle: { opacity: 0.7 },
|
|
733
|
+
onPress: () => handlePress(tab.id),
|
|
734
|
+
cursor: "pointer",
|
|
735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
736
|
+
import_tamagui15.SizableText,
|
|
737
|
+
{
|
|
738
|
+
size: "$3",
|
|
739
|
+
fontWeight: isActive ? "600" : "400",
|
|
740
|
+
color: variant === "pill" && isActive ? "$color1" : isActive ? "$color12" : "$color10",
|
|
741
|
+
children: tab.label
|
|
742
|
+
}
|
|
743
|
+
)
|
|
744
|
+
},
|
|
745
|
+
tab.id
|
|
746
|
+
);
|
|
747
|
+
}) }) }),
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tamagui15.YStack, { flex: 1, paddingTop: "$2", children: activeContent })
|
|
749
|
+
] });
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// src/interface/ToggleGroup.tsx
|
|
753
|
+
var import_tamagui16 = require("tamagui");
|
|
754
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
755
|
+
var sizeMap = { sm: "$2", md: "$3", lg: "$4" };
|
|
756
|
+
function ToggleGroup({ options, value, onValueChange, size = "md" }) {
|
|
757
|
+
const textSize = sizeMap[size];
|
|
758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tamagui16.XStack, { borderRadius: "$4", overflow: "hidden", backgroundColor: "$color2", children: options.map((option, index) => {
|
|
759
|
+
const isActive = option.id === value;
|
|
760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
761
|
+
import_tamagui16.XStack,
|
|
762
|
+
{
|
|
763
|
+
flex: 1,
|
|
764
|
+
justifyContent: "center",
|
|
765
|
+
alignItems: "center",
|
|
766
|
+
paddingVertical: "$2",
|
|
767
|
+
paddingHorizontal: "$3",
|
|
768
|
+
backgroundColor: isActive ? "$color9" : "$color2",
|
|
769
|
+
borderLeftWidth: index > 0 ? 1 : 0,
|
|
770
|
+
borderLeftColor: isActive ? "$color9" : "$color4",
|
|
771
|
+
pressStyle: { opacity: 0.7 },
|
|
772
|
+
onPress: () => onValueChange(option.id),
|
|
773
|
+
cursor: "pointer",
|
|
774
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tamagui16.SizableText, { size: textSize, fontWeight: isActive ? "600" : "400", color: isActive ? "$color1" : "$color11", children: option.label })
|
|
775
|
+
},
|
|
776
|
+
option.id
|
|
777
|
+
);
|
|
778
|
+
}) });
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// src/interface/Toast.tsx
|
|
782
|
+
var import_react5 = require("react");
|
|
783
|
+
var import_tamagui17 = require("tamagui");
|
|
784
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
785
|
+
var ToastContext = (0, import_react5.createContext)(null);
|
|
786
|
+
var variantColors = {
|
|
787
|
+
default: "$color9",
|
|
788
|
+
success: "$green9",
|
|
789
|
+
error: "$red9",
|
|
790
|
+
warning: "$yellow9"
|
|
791
|
+
};
|
|
792
|
+
var globalToastShow = null;
|
|
793
|
+
var toast = (message, variant, duration) => {
|
|
794
|
+
if (globalToastShow) globalToastShow(message, variant, duration);
|
|
795
|
+
else console.warn("ToastProvider not mounted");
|
|
796
|
+
};
|
|
797
|
+
function ToastProvider({ children }) {
|
|
798
|
+
const [toasts, setToasts] = (0, import_react5.useState)([]);
|
|
799
|
+
const show = (0, import_react5.useCallback)((message, variant = "default", duration = 3e3) => {
|
|
800
|
+
const id = Math.random().toString(36).slice(2, 9);
|
|
801
|
+
setToasts((prev) => [...prev, { id, message, variant, duration }]);
|
|
802
|
+
setTimeout(() => setToasts((prev) => prev.filter((t) => t.id !== id)), duration);
|
|
803
|
+
}, []);
|
|
804
|
+
(0, import_react5.useEffect)(() => {
|
|
805
|
+
globalToastShow = show;
|
|
806
|
+
return () => {
|
|
807
|
+
globalToastShow = null;
|
|
808
|
+
};
|
|
809
|
+
}, [show]);
|
|
810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ToastContext.Provider, { value: { show }, children: [
|
|
811
|
+
children,
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
813
|
+
import_tamagui17.YStack,
|
|
814
|
+
{
|
|
815
|
+
position: "absolute",
|
|
816
|
+
top: 60,
|
|
817
|
+
left: 0,
|
|
818
|
+
right: 0,
|
|
819
|
+
alignItems: "center",
|
|
820
|
+
gap: "$2",
|
|
821
|
+
pointerEvents: "none",
|
|
822
|
+
zIndex: 1e5,
|
|
823
|
+
children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
824
|
+
import_tamagui17.YStack,
|
|
825
|
+
{
|
|
826
|
+
backgroundColor: variantColors[t.variant ?? "default"],
|
|
827
|
+
paddingHorizontal: "$4",
|
|
828
|
+
paddingVertical: "$2.5",
|
|
829
|
+
borderRadius: "$4",
|
|
830
|
+
enterStyle: { opacity: 0, y: -10 },
|
|
831
|
+
exitStyle: { opacity: 0, y: -10 },
|
|
832
|
+
opacity: 1,
|
|
833
|
+
y: 0,
|
|
834
|
+
animation: "quick",
|
|
835
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$3", color: "white", fontWeight: "600", children: t.message })
|
|
836
|
+
},
|
|
837
|
+
t.id
|
|
838
|
+
))
|
|
839
|
+
}
|
|
840
|
+
)
|
|
841
|
+
] });
|
|
842
|
+
}
|
|
843
|
+
function useToast() {
|
|
844
|
+
const ctx = (0, import_react5.useContext)(ToastContext);
|
|
845
|
+
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
846
|
+
return ctx;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
// src/interface/FormField.tsx
|
|
850
|
+
var import_tamagui18 = require("tamagui");
|
|
851
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
852
|
+
function FormField({ label, error, helperText, required, children }) {
|
|
853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_tamagui18.YStack, { gap: "$1.5", children: [
|
|
854
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_tamagui18.SizableText, { size: "$3", fontWeight: "600", color: "$color11", children: [
|
|
855
|
+
label,
|
|
856
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui18.SizableText, { color: "$red9", children: " *" })
|
|
857
|
+
] }),
|
|
858
|
+
children,
|
|
859
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui18.SizableText, { size: "$2", color: "$color9", children: helperText }),
|
|
860
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui18.SizableText, { size: "$2", color: "$red9", children: error })
|
|
861
|
+
] });
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
// src/interface/Tooltip.tsx
|
|
865
|
+
var import_tamagui19 = require("tamagui");
|
|
866
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
867
|
+
function BlinkTooltip({ content, children, side = "top" }) {
|
|
868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_tamagui19.Popover, { size: "$2", placement: side, children: [
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tamagui19.Popover.Trigger, { asChild: true, children }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
871
|
+
import_tamagui19.Popover.Content,
|
|
872
|
+
{
|
|
873
|
+
backgroundColor: "$color11",
|
|
874
|
+
borderRadius: "$2",
|
|
875
|
+
paddingHorizontal: "$2.5",
|
|
876
|
+
paddingVertical: "$1.5",
|
|
877
|
+
elevate: true,
|
|
878
|
+
enterStyle: { opacity: 0, y: side === "bottom" ? -4 : 4 },
|
|
879
|
+
exitStyle: { opacity: 0, y: side === "bottom" ? -4 : 4 },
|
|
880
|
+
opacity: 1,
|
|
881
|
+
y: 0,
|
|
882
|
+
animation: "quick",
|
|
883
|
+
children: [
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tamagui19.Popover.Arrow, { backgroundColor: "$color11", size: "$1" }),
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tamagui19.SizableText, { size: "$2", color: "$color1", children: content })
|
|
886
|
+
]
|
|
887
|
+
}
|
|
888
|
+
)
|
|
889
|
+
] });
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
// src/layouts/StepPageLayout.tsx
|
|
893
|
+
var import_tamagui20 = require("tamagui");
|
|
894
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
581
895
|
function StepPageLayout({ title, description, children, bottom }) {
|
|
582
|
-
return /* @__PURE__ */ (0,
|
|
583
|
-
/* @__PURE__ */ (0,
|
|
584
|
-
/* @__PURE__ */ (0,
|
|
585
|
-
description && /* @__PURE__ */ (0,
|
|
896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_tamagui20.YStack, { flex: 1, padding: "$4", maxWidth: 500, marginHorizontal: "auto", width: "100%", children: [
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.YStack, { gap: "$5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_tamagui20.YStack, { gap: "$2", children: [
|
|
898
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.SizableText, { size: "$8", fontWeight: "700", children: title }),
|
|
899
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.SizableText, { size: "$5", fontWeight: "400", color: "$color10", children: description })
|
|
586
900
|
] }) }),
|
|
587
|
-
/* @__PURE__ */ (0,
|
|
588
|
-
bottom && /* @__PURE__ */ (0,
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.YStack, { paddingTop: "$5", gap: "$4", children }),
|
|
902
|
+
bottom && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.YStack, { paddingTop: "$4", children: bottom })
|
|
589
903
|
] });
|
|
590
904
|
}
|
|
591
905
|
|
|
592
906
|
// src/layouts/ScreenLayout.tsx
|
|
593
|
-
var
|
|
594
|
-
var ScreenLayout = (0,
|
|
907
|
+
var import_tamagui21 = require("tamagui");
|
|
908
|
+
var ScreenLayout = (0, import_tamagui21.styled)(import_tamagui21.YStack, {
|
|
595
909
|
name: "BlinkScreenLayout",
|
|
596
910
|
flex: 1,
|
|
597
911
|
backgroundColor: "$background",
|
|
@@ -609,22 +923,22 @@ var ScreenLayout = (0, import_tamagui14.styled)(import_tamagui14.YStack, {
|
|
|
609
923
|
});
|
|
610
924
|
|
|
611
925
|
// src/layouts/Section.tsx
|
|
612
|
-
var
|
|
613
|
-
var
|
|
926
|
+
var import_tamagui22 = require("tamagui");
|
|
927
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
614
928
|
function Section({ title, description, children, gap = "$3" }) {
|
|
615
|
-
return /* @__PURE__ */ (0,
|
|
616
|
-
title && /* @__PURE__ */ (0,
|
|
617
|
-
/* @__PURE__ */ (0,
|
|
618
|
-
description && /* @__PURE__ */ (0,
|
|
929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_tamagui22.YStack, { gap, children: [
|
|
930
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_tamagui22.YStack, { gap: "$1", children: [
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tamagui22.SizableText, { size: "$5", fontWeight: "600", color: "$color12", children: title }),
|
|
932
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tamagui22.SizableText, { size: "$3", color: "$color9", children: description })
|
|
619
933
|
] }),
|
|
620
934
|
children
|
|
621
935
|
] });
|
|
622
936
|
}
|
|
623
937
|
|
|
624
938
|
// src/layouts/ListItem.tsx
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
var ListItemFrame = (0,
|
|
939
|
+
var import_tamagui23 = require("tamagui");
|
|
940
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
941
|
+
var ListItemFrame = (0, import_tamagui23.styled)(import_tamagui23.XStack, {
|
|
628
942
|
name: "BlinkListItem",
|
|
629
943
|
alignItems: "center",
|
|
630
944
|
gap: "$3",
|
|
@@ -641,109 +955,195 @@ var ListItemFrame = (0, import_tamagui16.styled)(import_tamagui16.XStack, {
|
|
|
641
955
|
}
|
|
642
956
|
});
|
|
643
957
|
function ListItem({ icon, title, subtitle, right, onPress }) {
|
|
644
|
-
return /* @__PURE__ */ (0,
|
|
645
|
-
icon && /* @__PURE__ */ (0,
|
|
646
|
-
/* @__PURE__ */ (0,
|
|
647
|
-
/* @__PURE__ */ (0,
|
|
648
|
-
subtitle && /* @__PURE__ */ (0,
|
|
958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ListItemFrame, { pressable: !!onPress, onPress, children: [
|
|
959
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tamagui23.View, { children: icon }),
|
|
960
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_tamagui23.YStack, { flex: 1, gap: "$1", children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tamagui23.SizableText, { size: "$4", fontWeight: "500", color: "$color12", children: title }),
|
|
962
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tamagui23.SizableText, { size: "$2", color: "$color9", children: subtitle })
|
|
649
963
|
] }),
|
|
650
964
|
right
|
|
651
965
|
] });
|
|
652
966
|
}
|
|
653
967
|
|
|
654
968
|
// src/layouts/Divider.tsx
|
|
655
|
-
var
|
|
656
|
-
var
|
|
969
|
+
var import_tamagui24 = require("tamagui");
|
|
970
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
657
971
|
function Divider({ label }) {
|
|
658
|
-
if (!label) return /* @__PURE__ */ (0,
|
|
659
|
-
return /* @__PURE__ */ (0,
|
|
660
|
-
/* @__PURE__ */ (0,
|
|
661
|
-
/* @__PURE__ */ (0,
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
972
|
+
if (!label) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.Separator, { borderColor: "$color4" });
|
|
973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_tamagui24.XStack, { alignItems: "center", gap: "$3", children: [
|
|
974
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.Separator, { flex: 1, borderColor: "$color4" }),
|
|
975
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.SizableText, { size: "$2", color: "$color9", children: label }),
|
|
976
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.Separator, { flex: 1, borderColor: "$color4" })
|
|
663
977
|
] });
|
|
664
978
|
}
|
|
665
979
|
|
|
666
980
|
// src/layouts/KeyboardStickyFooter.tsx
|
|
667
|
-
var
|
|
668
|
-
var
|
|
981
|
+
var import_tamagui25 = require("tamagui");
|
|
982
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
669
983
|
function KeyboardStickyFooter({ children, offset }) {
|
|
670
|
-
return /* @__PURE__ */ (0,
|
|
984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_tamagui25.YStack, { maxWidth: 500, alignSelf: "center", paddingTop: "$8", paddingBottom: "$4", style: { paddingBottom: offset }, children });
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// src/layouts/SafeArea.tsx
|
|
988
|
+
var import_tamagui26 = require("tamagui");
|
|
989
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
990
|
+
function SafeArea({ children, edges = ["top", "bottom"] }) {
|
|
991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
992
|
+
import_tamagui26.YStack,
|
|
993
|
+
{
|
|
994
|
+
flex: 1,
|
|
995
|
+
backgroundColor: "$background",
|
|
996
|
+
paddingTop: edges.includes("top") ? "$6" : void 0,
|
|
997
|
+
paddingBottom: edges.includes("bottom") ? "$6" : void 0,
|
|
998
|
+
paddingLeft: edges.includes("left") ? "$4" : void 0,
|
|
999
|
+
paddingRight: edges.includes("right") ? "$4" : void 0,
|
|
1000
|
+
children
|
|
1001
|
+
}
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// src/layouts/Grid.tsx
|
|
1006
|
+
var import_tamagui27 = require("tamagui");
|
|
1007
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1008
|
+
function Grid({ children, columns = 2, gap = "$3" }) {
|
|
1009
|
+
const childWidth = `${100 / columns}%`;
|
|
1010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.XStack, { flexWrap: "wrap", gap, children: Array.isArray(children) ? children.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: childWidth, flexBasis: childWidth, children: child }, i)) : children });
|
|
1011
|
+
}
|
|
1012
|
+
function Container({ children, maxWidth = 500, centered = true }) {
|
|
1013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: "100%", maxWidth, alignSelf: centered ? "center" : void 0, children });
|
|
671
1014
|
}
|
|
672
1015
|
|
|
673
1016
|
// src/patterns/PaywallScreen.tsx
|
|
674
|
-
var
|
|
675
|
-
var
|
|
1017
|
+
var import_tamagui28 = require("tamagui");
|
|
1018
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
676
1019
|
function PaywallScreen({
|
|
677
|
-
title = "
|
|
678
|
-
subtitle
|
|
1020
|
+
title = "Unlock Premium",
|
|
1021
|
+
subtitle,
|
|
1022
|
+
features = [],
|
|
679
1023
|
plans,
|
|
680
1024
|
selectedPlan,
|
|
681
1025
|
onSelectPlan,
|
|
682
1026
|
onContinue,
|
|
1027
|
+
onClose,
|
|
683
1028
|
onRestore,
|
|
684
|
-
|
|
1029
|
+
onTerms,
|
|
1030
|
+
onPrivacy,
|
|
1031
|
+
continueLabel = "Continue",
|
|
1032
|
+
reassurance = "Cancel anytime",
|
|
1033
|
+
hero,
|
|
1034
|
+
socialProof
|
|
685
1035
|
}) {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
] }),
|
|
691
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui19.YStack, { gap: "$3", flex: 1, children: plans.map((plan) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
692
|
-
import_tamagui19.YStack,
|
|
1036
|
+
const selected = selectedPlan ?? plans.find((p) => p.popular)?.id ?? plans[0]?.id;
|
|
1037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { flex: 1, backgroundColor: "$background", children: [
|
|
1038
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.XStack, { position: "absolute", top: "$4", right: "$4", zIndex: 10, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1039
|
+
import_tamagui28.Button,
|
|
693
1040
|
{
|
|
1041
|
+
size: "$3",
|
|
1042
|
+
circular: true,
|
|
1043
|
+
chromeless: true,
|
|
1044
|
+
onPress: onClose,
|
|
1045
|
+
pressStyle: { opacity: 0.6 },
|
|
1046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$5", color: "$color9", children: "\u2715" })
|
|
1047
|
+
}
|
|
1048
|
+
) }),
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.ScrollView, { flex: 1, contentContainerStyle: { paddingBottom: 200 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { padding: "$4", gap: "$5", paddingTop: "$8", children: [
|
|
1050
|
+
hero && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.YStack, { alignItems: "center", paddingVertical: "$4", children: hero }),
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { gap: "$2", alignItems: "center", children: [
|
|
1052
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$9", fontWeight: "800", textAlign: "center", children: title }),
|
|
1053
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$4", color: "$color10", textAlign: "center", children: subtitle }),
|
|
1054
|
+
socialProof && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$3", color: "$color9", textAlign: "center", paddingTop: "$1", children: socialProof })
|
|
1055
|
+
] }),
|
|
1056
|
+
features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.YStack, { gap: "$2.5", paddingHorizontal: "$2", children: features.map((feature, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.XStack, { gap: "$2.5", alignItems: "center", children: [
|
|
1057
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$4", color: "$green9", children: "\u2713" }),
|
|
1058
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$4", color: "$color11", children: feature })
|
|
1059
|
+
] }, i)) }),
|
|
1060
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.XStack, { gap: "$3", paddingTop: "$2", children: plans.map((plan) => {
|
|
1061
|
+
const isSelected = selected === plan.id;
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1063
|
+
import_tamagui28.YStack,
|
|
1064
|
+
{
|
|
1065
|
+
flex: 1,
|
|
1066
|
+
padding: "$3.5",
|
|
1067
|
+
borderRadius: "$5",
|
|
1068
|
+
borderWidth: 2,
|
|
1069
|
+
borderColor: isSelected ? "$color9" : "$color5",
|
|
1070
|
+
backgroundColor: isSelected ? "$color2" : "$color1",
|
|
1071
|
+
pressStyle: { scale: 0.97 },
|
|
1072
|
+
onPress: () => onSelectPlan?.(plan.id),
|
|
1073
|
+
cursor: "pointer",
|
|
1074
|
+
position: "relative",
|
|
1075
|
+
gap: "$1.5",
|
|
1076
|
+
children: [
|
|
1077
|
+
plan.savings && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1078
|
+
import_tamagui28.YStack,
|
|
1079
|
+
{
|
|
1080
|
+
position: "absolute",
|
|
1081
|
+
top: -10,
|
|
1082
|
+
right: 8,
|
|
1083
|
+
backgroundColor: "$green9",
|
|
1084
|
+
paddingHorizontal: "$2",
|
|
1085
|
+
paddingVertical: "$1",
|
|
1086
|
+
borderRadius: "$10",
|
|
1087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$1", color: "white", fontWeight: "700", children: plan.savings })
|
|
1088
|
+
}
|
|
1089
|
+
),
|
|
1090
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$3", fontWeight: "600", color: "$color11", children: plan.name }),
|
|
1091
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$7", fontWeight: "800", children: plan.price }),
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.SizableText, { size: "$2", color: "$color9", children: [
|
|
1093
|
+
"/",
|
|
1094
|
+
plan.period
|
|
1095
|
+
] }),
|
|
1096
|
+
plan.pricePerWeek && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$2", color: "$color10", paddingTop: "$1", children: plan.pricePerWeek }),
|
|
1097
|
+
plan.trial && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$2", color: "$green9", fontWeight: "600", paddingTop: "$1", children: plan.trial })
|
|
1098
|
+
]
|
|
1099
|
+
},
|
|
1100
|
+
plan.id
|
|
1101
|
+
);
|
|
1102
|
+
}) })
|
|
1103
|
+
] }) }),
|
|
1104
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1105
|
+
import_tamagui28.YStack,
|
|
1106
|
+
{
|
|
1107
|
+
position: "absolute",
|
|
1108
|
+
bottom: 0,
|
|
1109
|
+
left: 0,
|
|
1110
|
+
right: 0,
|
|
694
1111
|
padding: "$4",
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
onPress: () => onSelectPlan?.(plan.id),
|
|
701
|
-
cursor: "pointer",
|
|
1112
|
+
paddingBottom: "$6",
|
|
1113
|
+
backgroundColor: "$background",
|
|
1114
|
+
borderTopWidth: 1,
|
|
1115
|
+
borderTopColor: "$color4",
|
|
1116
|
+
gap: "$3",
|
|
702
1117
|
children: [
|
|
703
|
-
/* @__PURE__ */ (0,
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
717
|
-
|
|
718
|
-
/* @__PURE__ */ (0,
|
|
719
|
-
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1119
|
+
import_tamagui28.Button,
|
|
1120
|
+
{
|
|
1121
|
+
size: "$5",
|
|
1122
|
+
backgroundColor: "$color9",
|
|
1123
|
+
color: "$color1",
|
|
1124
|
+
onPress: onContinue,
|
|
1125
|
+
pressStyle: { backgroundColor: "$color8" },
|
|
1126
|
+
borderRadius: "$10",
|
|
1127
|
+
fontWeight: "700",
|
|
1128
|
+
children: continueLabel
|
|
1129
|
+
}
|
|
1130
|
+
),
|
|
1131
|
+
reassurance && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$2", color: "$color9", textAlign: "center", children: reassurance }),
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.XStack, { justifyContent: "center", gap: "$3", children: [
|
|
1133
|
+
onRestore && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$2", color: "$color8", onPress: onRestore, children: "Restore" }),
|
|
1134
|
+
onTerms && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$2", color: "$color8", onPress: onTerms, children: "Terms" }),
|
|
1135
|
+
onPrivacy && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$2", color: "$color8", onPress: onPrivacy, children: "Privacy" })
|
|
1136
|
+
] })
|
|
720
1137
|
]
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
)) }),
|
|
724
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_tamagui19.YStack, { gap: "$3", paddingBottom: "$4", children: [
|
|
725
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
726
|
-
import_tamagui19.Button,
|
|
727
|
-
{
|
|
728
|
-
size: "$5",
|
|
729
|
-
backgroundColor: "$color9",
|
|
730
|
-
color: "$color1",
|
|
731
|
-
onPress: onContinue,
|
|
732
|
-
hoverStyle: { backgroundColor: "$color10" },
|
|
733
|
-
pressStyle: { backgroundColor: "$color8" },
|
|
734
|
-
borderRadius: "$5",
|
|
735
|
-
children: continueLabel
|
|
736
|
-
}
|
|
737
|
-
),
|
|
738
|
-
onRestore && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui19.Button, { size: "$3", chromeless: true, onPress: onRestore, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui19.SizableText, { size: "$3", color: "$color9", children: "Restore Purchases" }) })
|
|
739
|
-
] })
|
|
1138
|
+
}
|
|
1139
|
+
)
|
|
740
1140
|
] });
|
|
741
1141
|
}
|
|
742
1142
|
|
|
743
1143
|
// src/patterns/OnboardingCarousel.tsx
|
|
744
|
-
var
|
|
745
|
-
var
|
|
746
|
-
var
|
|
1144
|
+
var import_react6 = require("react");
|
|
1145
|
+
var import_tamagui29 = require("tamagui");
|
|
1146
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
747
1147
|
function OnboardingCarousel({
|
|
748
1148
|
steps,
|
|
749
1149
|
onComplete,
|
|
@@ -752,21 +1152,21 @@ function OnboardingCarousel({
|
|
|
752
1152
|
skipLabel = "Skip",
|
|
753
1153
|
nextLabel = "Next"
|
|
754
1154
|
}) {
|
|
755
|
-
const [current, setCurrent] = (0,
|
|
1155
|
+
const [current, setCurrent] = (0, import_react6.useState)(0);
|
|
756
1156
|
const isLast = current === steps.length - 1;
|
|
757
1157
|
const step = steps[current];
|
|
758
|
-
return /* @__PURE__ */ (0,
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
761
|
-
step?.icon && /* @__PURE__ */ (0,
|
|
762
|
-
/* @__PURE__ */ (0,
|
|
763
|
-
/* @__PURE__ */ (0,
|
|
764
|
-
/* @__PURE__ */ (0,
|
|
1158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { flex: 1, backgroundColor: "$background", padding: "$4", justifyContent: "space-between", children: [
|
|
1159
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.XStack, { justifyContent: "flex-end", paddingTop: "$4", children: !isLast && onSkip && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.Button, { chromeless: true, onPress: onSkip, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.SizableText, { size: "$4", color: "$color9", children: skipLabel }) }) }),
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { flex: 1, alignItems: "center", justifyContent: "center", gap: "$5", paddingHorizontal: "$4", children: [
|
|
1161
|
+
step?.icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.Circle, { size: 120, backgroundColor: "$color2", alignItems: "center", justifyContent: "center", children: step.icon }),
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { gap: "$3", alignItems: "center", children: [
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.SizableText, { size: "$9", fontWeight: "700", textAlign: "center", children: step?.title }),
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.SizableText, { size: "$4", color: "$color10", textAlign: "center", maxWidth: 300, children: step?.description })
|
|
765
1165
|
] })
|
|
766
1166
|
] }),
|
|
767
|
-
/* @__PURE__ */ (0,
|
|
768
|
-
/* @__PURE__ */ (0,
|
|
769
|
-
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { gap: "$3", paddingBottom: "$2", children: [
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.XStack, { justifyContent: "center", gap: "$2", children: steps.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1169
|
+
import_tamagui29.Circle,
|
|
770
1170
|
{
|
|
771
1171
|
size: 8,
|
|
772
1172
|
backgroundColor: i === current ? "$color9" : "$color4",
|
|
@@ -774,8 +1174,8 @@ function OnboardingCarousel({
|
|
|
774
1174
|
},
|
|
775
1175
|
i
|
|
776
1176
|
)) }),
|
|
777
|
-
/* @__PURE__ */ (0,
|
|
778
|
-
|
|
1177
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1178
|
+
import_tamagui29.Button,
|
|
779
1179
|
{
|
|
780
1180
|
size: "$5",
|
|
781
1181
|
backgroundColor: "$color9",
|
|
@@ -792,21 +1192,21 @@ function OnboardingCarousel({
|
|
|
792
1192
|
}
|
|
793
1193
|
|
|
794
1194
|
// src/patterns/ChatBubble.tsx
|
|
795
|
-
var
|
|
796
|
-
var
|
|
1195
|
+
var import_tamagui30 = require("tamagui");
|
|
1196
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
797
1197
|
function ChatBubble({ message, showAvatar = true }) {
|
|
798
1198
|
const isUser = message.sender === "user";
|
|
799
|
-
return /* @__PURE__ */ (0,
|
|
800
|
-
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1200
|
+
import_tamagui30.XStack,
|
|
801
1201
|
{
|
|
802
1202
|
alignSelf: isUser ? "flex-end" : "flex-start",
|
|
803
1203
|
maxWidth: "75%",
|
|
804
1204
|
gap: "$2",
|
|
805
1205
|
flexDirection: isUser ? "row-reverse" : "row",
|
|
806
1206
|
children: [
|
|
807
|
-
showAvatar && !isUser && /* @__PURE__ */ (0,
|
|
808
|
-
/* @__PURE__ */ (0,
|
|
809
|
-
|
|
1207
|
+
showAvatar && !isUser && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.Circle, { size: 32, backgroundColor: "$color4", overflow: "hidden", children: message.avatar ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.Image, { source: { uri: message.avatar }, width: 32, height: 32, objectFit: "cover" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.SizableText, { size: "$2", fontWeight: "600", color: "$color11", children: message.senderName?.[0]?.toUpperCase() ?? "?" }) }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1209
|
+
import_tamagui30.YStack,
|
|
810
1210
|
{
|
|
811
1211
|
backgroundColor: isUser ? "$color9" : "$color3",
|
|
812
1212
|
paddingHorizontal: "$3",
|
|
@@ -816,8 +1216,8 @@ function ChatBubble({ message, showAvatar = true }) {
|
|
|
816
1216
|
borderBottomLeftRadius: isUser ? "$5" : "$2",
|
|
817
1217
|
gap: "$1",
|
|
818
1218
|
children: [
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
820
|
-
message.timestamp && /* @__PURE__ */ (0,
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.SizableText, { size: "$3", color: isUser ? "$color1" : "$color12", children: message.text }),
|
|
1220
|
+
message.timestamp && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.SizableText, { size: "$1", color: isUser ? "$color3" : "$color9", alignSelf: "flex-end", children: message.timestamp })
|
|
821
1221
|
]
|
|
822
1222
|
}
|
|
823
1223
|
)
|
|
@@ -827,11 +1227,11 @@ function ChatBubble({ message, showAvatar = true }) {
|
|
|
827
1227
|
}
|
|
828
1228
|
|
|
829
1229
|
// src/patterns/SettingsScreen.tsx
|
|
830
|
-
var
|
|
831
|
-
var
|
|
1230
|
+
var import_tamagui31 = require("tamagui");
|
|
1231
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
832
1232
|
function SettingsItemRow({ item }) {
|
|
833
|
-
return /* @__PURE__ */ (0,
|
|
834
|
-
|
|
1233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1234
|
+
import_tamagui31.XStack,
|
|
835
1235
|
{
|
|
836
1236
|
alignItems: "center",
|
|
837
1237
|
gap: "$3",
|
|
@@ -842,22 +1242,22 @@ function SettingsItemRow({ item }) {
|
|
|
842
1242
|
onPress: item.onPress,
|
|
843
1243
|
cursor: item.onPress ? "pointer" : void 0,
|
|
844
1244
|
children: [
|
|
845
|
-
item.icon && /* @__PURE__ */ (0,
|
|
846
|
-
/* @__PURE__ */ (0,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
848
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
1245
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.YStack, { width: 24, alignItems: "center", children: item.icon }),
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_tamagui31.YStack, { flex: 1, gap: "$1", children: [
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.SizableText, { size: "$4", fontWeight: "500", children: item.title }),
|
|
1248
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.SizableText, { size: "$2", color: "$color9", children: item.subtitle })
|
|
849
1249
|
] }),
|
|
850
|
-
item.type === "toggle" ? /* @__PURE__ */ (0,
|
|
1250
|
+
item.type === "toggle" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.Switch, { size: "$3", checked: item.value, onCheckedChange: item.onValueChange, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.Switch.Thumb, { animation: "quick" }) }) : item.right ? item.right : item.onPress && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.SizableText, { size: "$5", color: "$color8", children: "\u203A" })
|
|
851
1251
|
]
|
|
852
1252
|
}
|
|
853
1253
|
);
|
|
854
1254
|
}
|
|
855
1255
|
function SettingsScreen({ sections, header }) {
|
|
856
|
-
return /* @__PURE__ */ (0,
|
|
1256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_tamagui31.YStack, { flex: 1, backgroundColor: "$background", children: [
|
|
857
1257
|
header,
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
859
|
-
section.title && /* @__PURE__ */ (0,
|
|
860
|
-
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.YStack, { gap: "$4", paddingVertical: "$2", children: sections.map((section, si) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_tamagui31.YStack, { children: [
|
|
1259
|
+
section.title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1260
|
+
import_tamagui31.SizableText,
|
|
861
1261
|
{
|
|
862
1262
|
size: "$2",
|
|
863
1263
|
fontWeight: "600",
|
|
@@ -868,26 +1268,26 @@ function SettingsScreen({ sections, header }) {
|
|
|
868
1268
|
children: section.title
|
|
869
1269
|
}
|
|
870
1270
|
),
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
873
|
-
ii < section.items.length - 1 && /* @__PURE__ */ (0,
|
|
1271
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.YStack, { backgroundColor: "$color1", borderRadius: "$4", marginHorizontal: "$3", overflow: "hidden", children: section.items.map((item, ii) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_tamagui31.YStack, { children: [
|
|
1272
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SettingsItemRow, { item }),
|
|
1273
|
+
ii < section.items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.Separator, { borderColor: "$color3", marginLeft: "$12" })
|
|
874
1274
|
] }, item.id)) })
|
|
875
1275
|
] }, si)) })
|
|
876
1276
|
] });
|
|
877
1277
|
}
|
|
878
1278
|
|
|
879
1279
|
// src/patterns/EmptyState.tsx
|
|
880
|
-
var
|
|
881
|
-
var
|
|
1280
|
+
var import_tamagui32 = require("tamagui");
|
|
1281
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
882
1282
|
function EmptyState({ icon, title, description, actionLabel, onAction }) {
|
|
883
|
-
return /* @__PURE__ */ (0,
|
|
1283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_tamagui32.YStack, { flex: 1, alignItems: "center", justifyContent: "center", gap: "$4", padding: "$6", children: [
|
|
884
1284
|
icon,
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
887
|
-
description && /* @__PURE__ */ (0,
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_tamagui32.YStack, { gap: "$2", alignItems: "center", children: [
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_tamagui32.SizableText, { size: "$6", fontWeight: "600", textAlign: "center", children: title }),
|
|
1287
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_tamagui32.SizableText, { size: "$4", color: "$color9", textAlign: "center", maxWidth: 280, children: description })
|
|
888
1288
|
] }),
|
|
889
|
-
actionLabel && onAction && /* @__PURE__ */ (0,
|
|
890
|
-
|
|
1289
|
+
actionLabel && onAction && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1290
|
+
import_tamagui32.Button,
|
|
891
1291
|
{
|
|
892
1292
|
size: "$4",
|
|
893
1293
|
backgroundColor: "$color9",
|
|
@@ -903,25 +1303,665 @@ function EmptyState({ icon, title, description, actionLabel, onAction }) {
|
|
|
903
1303
|
}
|
|
904
1304
|
|
|
905
1305
|
// src/patterns/ProfileHeader.tsx
|
|
906
|
-
var
|
|
907
|
-
var
|
|
1306
|
+
var import_tamagui33 = require("tamagui");
|
|
1307
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
908
1308
|
function ProfileHeader({ name, subtitle, avatar, stats, actions }) {
|
|
909
|
-
return /* @__PURE__ */ (0,
|
|
910
|
-
/* @__PURE__ */ (0,
|
|
911
|
-
/* @__PURE__ */ (0,
|
|
912
|
-
/* @__PURE__ */ (0,
|
|
913
|
-
subtitle && /* @__PURE__ */ (0,
|
|
1309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_tamagui33.YStack, { alignItems: "center", gap: "$4", paddingVertical: "$6", paddingHorizontal: "$4", children: [
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.Circle, { size: 80, backgroundColor: "$color4", overflow: "hidden", children: avatar ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.Image, { source: { uri: avatar }, width: 80, height: 80, objectFit: "cover" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$9", fontWeight: "700", color: "$color11", children: name[0]?.toUpperCase() ?? "?" }) }),
|
|
1311
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_tamagui33.YStack, { alignItems: "center", gap: "$1", children: [
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$7", fontWeight: "700", children: name }),
|
|
1313
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$4", color: "$color10", children: subtitle })
|
|
914
1314
|
] }),
|
|
915
|
-
stats && stats.length > 0 && /* @__PURE__ */ (0,
|
|
916
|
-
/* @__PURE__ */ (0,
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
1315
|
+
stats && stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.XStack, { gap: "$6", children: stats.map((stat, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_tamagui33.YStack, { alignItems: "center", gap: "$1", children: [
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$6", fontWeight: "700", children: stat.value }),
|
|
1317
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$2", color: "$color9", children: stat.label })
|
|
918
1318
|
] }, i)) }),
|
|
919
1319
|
actions
|
|
920
1320
|
] });
|
|
921
1321
|
}
|
|
1322
|
+
|
|
1323
|
+
// src/patterns/AppHeader.tsx
|
|
1324
|
+
var import_tamagui34 = require("tamagui");
|
|
1325
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1326
|
+
function AppHeader({
|
|
1327
|
+
title,
|
|
1328
|
+
subtitle,
|
|
1329
|
+
variant = "simple",
|
|
1330
|
+
onBack,
|
|
1331
|
+
avatar,
|
|
1332
|
+
left,
|
|
1333
|
+
right,
|
|
1334
|
+
transparent,
|
|
1335
|
+
borderless
|
|
1336
|
+
}) {
|
|
1337
|
+
const leftContent = (() => {
|
|
1338
|
+
if (variant === "back")
|
|
1339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1340
|
+
import_tamagui34.SizableText,
|
|
1341
|
+
{
|
|
1342
|
+
size: "$6",
|
|
1343
|
+
paddingRight: "$2",
|
|
1344
|
+
onPress: onBack,
|
|
1345
|
+
pressStyle: { opacity: 0.6 },
|
|
1346
|
+
cursor: "pointer",
|
|
1347
|
+
children: "\u2039"
|
|
1348
|
+
}
|
|
1349
|
+
);
|
|
1350
|
+
if (variant === "profile")
|
|
1351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Avatar, { uri: avatar, name: title, size: "sm" });
|
|
1352
|
+
if (variant === "centered") return left ?? null;
|
|
1353
|
+
return null;
|
|
1354
|
+
})();
|
|
1355
|
+
const rightContent = variant === "profile" || variant === "centered" ? right ?? null : null;
|
|
1356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1357
|
+
import_tamagui34.YStack,
|
|
1358
|
+
{
|
|
1359
|
+
paddingTop: "$6",
|
|
1360
|
+
backgroundColor: transparent ? "transparent" : "$background",
|
|
1361
|
+
borderBottomWidth: borderless ? 0 : 1,
|
|
1362
|
+
borderBottomColor: "$borderColor",
|
|
1363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1364
|
+
import_tamagui34.XStack,
|
|
1365
|
+
{
|
|
1366
|
+
height: 56,
|
|
1367
|
+
alignItems: "center",
|
|
1368
|
+
paddingHorizontal: "$4",
|
|
1369
|
+
gap: "$3",
|
|
1370
|
+
children: [
|
|
1371
|
+
leftContent,
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1373
|
+
import_tamagui34.YStack,
|
|
1374
|
+
{
|
|
1375
|
+
flex: 1,
|
|
1376
|
+
alignItems: variant === "centered" ? "center" : "flex-start",
|
|
1377
|
+
children: [
|
|
1378
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_tamagui34.SizableText, { size: "$6", fontWeight: "700", numberOfLines: 1, children: title }),
|
|
1379
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_tamagui34.SizableText, { size: "$2", color: "$color9", numberOfLines: 1, children: subtitle })
|
|
1380
|
+
]
|
|
1381
|
+
}
|
|
1382
|
+
),
|
|
1383
|
+
rightContent
|
|
1384
|
+
]
|
|
1385
|
+
}
|
|
1386
|
+
)
|
|
1387
|
+
}
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
// src/patterns/BottomSheet.tsx
|
|
1392
|
+
var import_tamagui35 = require("tamagui");
|
|
1393
|
+
var import_react_native2 = require("react-native");
|
|
1394
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1395
|
+
function BottomSheet({
|
|
1396
|
+
open,
|
|
1397
|
+
onOpenChange,
|
|
1398
|
+
title,
|
|
1399
|
+
children,
|
|
1400
|
+
snapPoints = [85],
|
|
1401
|
+
dismissOnSnapToBottom = true,
|
|
1402
|
+
showHandle = true,
|
|
1403
|
+
showClose = false
|
|
1404
|
+
}) {
|
|
1405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1406
|
+
import_tamagui35.Sheet,
|
|
1407
|
+
{
|
|
1408
|
+
modal: true,
|
|
1409
|
+
open,
|
|
1410
|
+
onOpenChange,
|
|
1411
|
+
snapPoints,
|
|
1412
|
+
dismissOnSnapToBottom,
|
|
1413
|
+
animation: "medium",
|
|
1414
|
+
children: [
|
|
1415
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.Sheet.Overlay, { animation: "lazy", enterStyle: { opacity: 0 }, exitStyle: { opacity: 0 } }),
|
|
1416
|
+
showHandle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.Sheet.Handle, {}),
|
|
1417
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_tamagui35.Sheet.Frame, { borderTopLeftRadius: "$6", borderTopRightRadius: "$6", backgroundColor: "$background", children: [
|
|
1418
|
+
(title || showClose) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1419
|
+
import_tamagui35.XStack,
|
|
1420
|
+
{
|
|
1421
|
+
paddingHorizontal: "$4",
|
|
1422
|
+
paddingTop: "$3",
|
|
1423
|
+
paddingBottom: "$2",
|
|
1424
|
+
alignItems: "center",
|
|
1425
|
+
justifyContent: "space-between",
|
|
1426
|
+
children: [
|
|
1427
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.SizableText, { size: "$6", fontWeight: "600", flexShrink: 1, children: title }),
|
|
1428
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1429
|
+
import_tamagui35.XStack,
|
|
1430
|
+
{
|
|
1431
|
+
width: 28,
|
|
1432
|
+
height: 28,
|
|
1433
|
+
borderRadius: "$10",
|
|
1434
|
+
backgroundColor: "$color4",
|
|
1435
|
+
alignItems: "center",
|
|
1436
|
+
justifyContent: "center",
|
|
1437
|
+
pressStyle: { opacity: 0.7 },
|
|
1438
|
+
onPress: () => onOpenChange(false),
|
|
1439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.SizableText, { size: "$3", color: "$color10", fontWeight: "600", children: "\u2715" })
|
|
1440
|
+
}
|
|
1441
|
+
)
|
|
1442
|
+
]
|
|
1443
|
+
}
|
|
1444
|
+
),
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native2.ScrollView, { contentContainerStyle: { paddingBottom: 40 }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.YStack, { padding: "$4", children }) })
|
|
1446
|
+
] })
|
|
1447
|
+
]
|
|
1448
|
+
}
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
// src/patterns/LoginScreen.tsx
|
|
1453
|
+
var import_react7 = require("react");
|
|
1454
|
+
var import_tamagui36 = require("tamagui");
|
|
1455
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1456
|
+
function LoginScreen({
|
|
1457
|
+
title = "Welcome",
|
|
1458
|
+
subtitle = "Sign in to continue",
|
|
1459
|
+
logo,
|
|
1460
|
+
providers = [],
|
|
1461
|
+
onProviderPress,
|
|
1462
|
+
showEmailForm,
|
|
1463
|
+
onEmailSubmit,
|
|
1464
|
+
onForgotPassword,
|
|
1465
|
+
onCreateAccount,
|
|
1466
|
+
onTerms,
|
|
1467
|
+
onPrivacy,
|
|
1468
|
+
loading
|
|
1469
|
+
}) {
|
|
1470
|
+
const [email, setEmail] = (0, import_react7.useState)("");
|
|
1471
|
+
const [password, setPassword] = (0, import_react7.useState)("");
|
|
1472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { flex: 1, padding: "$4", gap: "$5", backgroundColor: "$background", justifyContent: "center", children: [
|
|
1473
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { alignItems: "center", gap: "$2", children: [
|
|
1474
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.YStack, { paddingBottom: "$3", children: logo }),
|
|
1475
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$9", fontWeight: "700", textAlign: "center", children: title }),
|
|
1476
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$4", color: "$color10", textAlign: "center", children: subtitle })
|
|
1477
|
+
] }),
|
|
1478
|
+
providers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.YStack, { gap: "$2.5", children: providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1479
|
+
import_tamagui36.Button,
|
|
1480
|
+
{
|
|
1481
|
+
size: "$5",
|
|
1482
|
+
borderWidth: 1.5,
|
|
1483
|
+
borderColor: "$color5",
|
|
1484
|
+
backgroundColor: "$color1",
|
|
1485
|
+
borderRadius: "$4",
|
|
1486
|
+
disabled: loading,
|
|
1487
|
+
onPress: () => onProviderPress?.(p.id),
|
|
1488
|
+
hoverStyle: { backgroundColor: "$color2" },
|
|
1489
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.XStack, { alignItems: "center", gap: "$2", children: [
|
|
1491
|
+
p.icon,
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$4", fontWeight: "500", children: p.name })
|
|
1493
|
+
] })
|
|
1494
|
+
},
|
|
1495
|
+
p.id
|
|
1496
|
+
)) }),
|
|
1497
|
+
showEmailForm && providers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Divider, { label: "or" }),
|
|
1498
|
+
showEmailForm && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { gap: "$3", children: [
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1500
|
+
Input,
|
|
1501
|
+
{
|
|
1502
|
+
label: "Email",
|
|
1503
|
+
placeholder: "your@email.com",
|
|
1504
|
+
value: email,
|
|
1505
|
+
onChangeText: setEmail,
|
|
1506
|
+
keyboardType: "email-address",
|
|
1507
|
+
autoCapitalize: "none"
|
|
1508
|
+
}
|
|
1509
|
+
),
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1511
|
+
Input,
|
|
1512
|
+
{
|
|
1513
|
+
label: "Password",
|
|
1514
|
+
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
1515
|
+
value: password,
|
|
1516
|
+
onChangeText: setPassword,
|
|
1517
|
+
secureTextEntry: true
|
|
1518
|
+
}
|
|
1519
|
+
),
|
|
1520
|
+
onForgotPassword && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.XStack, { justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$3", color: "$color9", onPress: onForgotPassword, children: "Forgot password?" }) }),
|
|
1521
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1522
|
+
import_tamagui36.Button,
|
|
1523
|
+
{
|
|
1524
|
+
size: "$5",
|
|
1525
|
+
backgroundColor: "$color9",
|
|
1526
|
+
color: "$color1",
|
|
1527
|
+
borderRadius: "$5",
|
|
1528
|
+
disabled: loading,
|
|
1529
|
+
onPress: () => onEmailSubmit?.(email, password),
|
|
1530
|
+
hoverStyle: { backgroundColor: "$color10" },
|
|
1531
|
+
pressStyle: { backgroundColor: "$color8" },
|
|
1532
|
+
icon: loading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.Spinner, { size: "small", color: "$color1" }) : void 0,
|
|
1533
|
+
children: "Sign In"
|
|
1534
|
+
}
|
|
1535
|
+
),
|
|
1536
|
+
onCreateAccount && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.Button, { size: "$3", chromeless: true, onPress: onCreateAccount, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$3", color: "$color9", children: "Create Account" }) })
|
|
1537
|
+
] }),
|
|
1538
|
+
(onTerms || onPrivacy) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.YStack, { paddingTop: "$2", alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.SizableText, { size: "$2", color: "$color8", textAlign: "center", children: [
|
|
1539
|
+
"By continuing you agree to our",
|
|
1540
|
+
" ",
|
|
1541
|
+
onTerms && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$2", color: "$color9", onPress: onTerms, children: "Terms of Service" }),
|
|
1542
|
+
onTerms && onPrivacy && " & ",
|
|
1543
|
+
onPrivacy && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$2", color: "$color9", onPress: onPrivacy, children: "Privacy Policy" })
|
|
1544
|
+
] }) })
|
|
1545
|
+
] });
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
// src/patterns/TabBar.tsx
|
|
1549
|
+
var import_tamagui37 = require("tamagui");
|
|
1550
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1551
|
+
function TabBar({ tabs, activeTab, onTabPress, showLabels = true }) {
|
|
1552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1553
|
+
import_tamagui37.XStack,
|
|
1554
|
+
{
|
|
1555
|
+
height: 56,
|
|
1556
|
+
borderTopWidth: 1,
|
|
1557
|
+
borderTopColor: "$borderColor",
|
|
1558
|
+
backgroundColor: "$background",
|
|
1559
|
+
paddingBottom: "$2",
|
|
1560
|
+
children: tabs.map((tab) => {
|
|
1561
|
+
const active = tab.id === activeTab;
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1563
|
+
import_tamagui37.YStack,
|
|
1564
|
+
{
|
|
1565
|
+
flex: 1,
|
|
1566
|
+
alignItems: "center",
|
|
1567
|
+
justifyContent: "center",
|
|
1568
|
+
gap: "$1",
|
|
1569
|
+
pressStyle: { opacity: 0.6 },
|
|
1570
|
+
onPress: () => onTabPress(tab.id),
|
|
1571
|
+
children: [
|
|
1572
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_tamagui37.SizableText, { size: "$5", color: active ? "$color9" : "$color8", children: tab.icon }),
|
|
1573
|
+
showLabels && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_tamagui37.SizableText, { size: "$1", color: active ? "$color9" : "$color8", fontWeight: active ? "600" : "400", children: tab.label })
|
|
1574
|
+
]
|
|
1575
|
+
},
|
|
1576
|
+
tab.id
|
|
1577
|
+
);
|
|
1578
|
+
})
|
|
1579
|
+
}
|
|
1580
|
+
);
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
// src/patterns/SearchBar.tsx
|
|
1584
|
+
var import_tamagui38 = require("tamagui");
|
|
1585
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1586
|
+
function SearchBar({ value, onChangeText, placeholder = "Search\u2026", onFilter, onCancel, autoFocus }) {
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1588
|
+
import_tamagui38.XStack,
|
|
1589
|
+
{
|
|
1590
|
+
height: 44,
|
|
1591
|
+
borderRadius: "$10",
|
|
1592
|
+
backgroundColor: "$color2",
|
|
1593
|
+
alignItems: "center",
|
|
1594
|
+
paddingHorizontal: "$3",
|
|
1595
|
+
gap: "$2",
|
|
1596
|
+
children: [
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_tamagui38.SizableText, { size: "$4", color: "$color8", children: "\u2315" }),
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1599
|
+
import_tamagui38.Input,
|
|
1600
|
+
{
|
|
1601
|
+
flex: 1,
|
|
1602
|
+
size: "$4",
|
|
1603
|
+
value,
|
|
1604
|
+
onChangeText,
|
|
1605
|
+
placeholder,
|
|
1606
|
+
placeholderTextColor: "$color8",
|
|
1607
|
+
backgroundColor: "transparent",
|
|
1608
|
+
borderWidth: 0,
|
|
1609
|
+
autoFocus
|
|
1610
|
+
}
|
|
1611
|
+
),
|
|
1612
|
+
onFilter && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_tamagui38.SizableText, { size: "$4", color: "$color9", pressStyle: { opacity: 0.6 }, onPress: onFilter, children: "\u2ACF" }),
|
|
1613
|
+
onCancel && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_tamagui38.SizableText, { size: "$3", color: "$color9", pressStyle: { opacity: 0.6 }, onPress: onCancel, children: "Cancel" })
|
|
1614
|
+
]
|
|
1615
|
+
}
|
|
1616
|
+
);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
// src/patterns/FloatingActionButton.tsx
|
|
1620
|
+
var import_tamagui39 = require("tamagui");
|
|
1621
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1622
|
+
var sizes = { sm: 44, md: 56, lg: 68 };
|
|
1623
|
+
var positionStyles = {
|
|
1624
|
+
"bottom-right": { right: 20 },
|
|
1625
|
+
"bottom-center": { left: "50%", marginLeft: -28 },
|
|
1626
|
+
"bottom-left": { left: 20 }
|
|
1627
|
+
};
|
|
1628
|
+
function FloatingActionButton({ icon, label, onPress, position = "bottom-right", size = "md" }) {
|
|
1629
|
+
const dim = sizes[size];
|
|
1630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1631
|
+
import_tamagui39.XStack,
|
|
1632
|
+
{
|
|
1633
|
+
position: "absolute",
|
|
1634
|
+
bottom: 32,
|
|
1635
|
+
...positionStyles[position],
|
|
1636
|
+
height: dim,
|
|
1637
|
+
minWidth: dim,
|
|
1638
|
+
borderRadius: label ? "$6" : "$10",
|
|
1639
|
+
backgroundColor: "$color9",
|
|
1640
|
+
alignItems: "center",
|
|
1641
|
+
justifyContent: "center",
|
|
1642
|
+
gap: "$2",
|
|
1643
|
+
paddingHorizontal: label ? "$4" : 0,
|
|
1644
|
+
elevation: 4,
|
|
1645
|
+
pressStyle: { scale: 0.95, opacity: 0.9 },
|
|
1646
|
+
onPress,
|
|
1647
|
+
children: [
|
|
1648
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_tamagui39.SizableText, { color: "$color1", children: icon }),
|
|
1649
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_tamagui39.SizableText, { color: "$color1", size: "$4", fontWeight: "600", children: label })
|
|
1650
|
+
]
|
|
1651
|
+
}
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
// src/patterns/ActionSheet.tsx
|
|
1656
|
+
var import_tamagui40 = require("tamagui");
|
|
1657
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1658
|
+
function ActionSheet({
|
|
1659
|
+
open,
|
|
1660
|
+
onOpenChange,
|
|
1661
|
+
title,
|
|
1662
|
+
items,
|
|
1663
|
+
onSelect,
|
|
1664
|
+
cancelLabel = "Cancel"
|
|
1665
|
+
}) {
|
|
1666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1667
|
+
import_tamagui40.Sheet,
|
|
1668
|
+
{
|
|
1669
|
+
modal: true,
|
|
1670
|
+
open,
|
|
1671
|
+
onOpenChange,
|
|
1672
|
+
snapPoints: [50],
|
|
1673
|
+
dismissOnSnapToBottom: true,
|
|
1674
|
+
animation: "medium",
|
|
1675
|
+
children: [
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.Sheet.Overlay, { animation: "lazy", enterStyle: { opacity: 0 }, exitStyle: { opacity: 0 } }),
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.Sheet.Handle, {}),
|
|
1678
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_tamagui40.Sheet.Frame, { borderTopLeftRadius: "$6", borderTopRightRadius: "$6", backgroundColor: "$background", children: [
|
|
1679
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.SizableText, { size: "$3", color: "$color8", textAlign: "center", paddingTop: "$3", paddingBottom: "$1", children: title }),
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.YStack, { paddingHorizontal: "$3", paddingTop: "$2", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1681
|
+
import_tamagui40.XStack,
|
|
1682
|
+
{
|
|
1683
|
+
height: 52,
|
|
1684
|
+
alignItems: "center",
|
|
1685
|
+
gap: "$3",
|
|
1686
|
+
paddingHorizontal: "$3",
|
|
1687
|
+
borderRadius: "$4",
|
|
1688
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1689
|
+
onPress: () => {
|
|
1690
|
+
onSelect(item.id);
|
|
1691
|
+
onOpenChange(false);
|
|
1692
|
+
},
|
|
1693
|
+
children: [
|
|
1694
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.SizableText, { size: "$5", children: item.icon }),
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1696
|
+
import_tamagui40.SizableText,
|
|
1697
|
+
{
|
|
1698
|
+
size: "$5",
|
|
1699
|
+
flex: 1,
|
|
1700
|
+
color: item.destructive ? "$red9" : "$color12",
|
|
1701
|
+
fontWeight: item.destructive ? "600" : "400",
|
|
1702
|
+
children: item.label
|
|
1703
|
+
}
|
|
1704
|
+
)
|
|
1705
|
+
]
|
|
1706
|
+
},
|
|
1707
|
+
item.id
|
|
1708
|
+
)) }),
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.YStack, { paddingHorizontal: "$3", paddingVertical: "$3", borderTopWidth: 1, borderTopColor: "$borderColor", marginTop: "$2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1710
|
+
import_tamagui40.XStack,
|
|
1711
|
+
{
|
|
1712
|
+
height: 48,
|
|
1713
|
+
alignItems: "center",
|
|
1714
|
+
justifyContent: "center",
|
|
1715
|
+
borderRadius: "$4",
|
|
1716
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1717
|
+
onPress: () => onOpenChange(false),
|
|
1718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.SizableText, { size: "$5", fontWeight: "600", color: "$color9", children: cancelLabel })
|
|
1719
|
+
}
|
|
1720
|
+
) })
|
|
1721
|
+
] })
|
|
1722
|
+
]
|
|
1723
|
+
}
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
// src/patterns/Skeleton.tsx
|
|
1728
|
+
var import_tamagui41 = require("tamagui");
|
|
1729
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1730
|
+
function Skeleton({ width, height, borderRadius, variant = "rectangular" }) {
|
|
1731
|
+
const size = variant === "circular" ? height ?? 40 : height;
|
|
1732
|
+
const w = variant === "text" ? width ?? "100%" : width;
|
|
1733
|
+
const h = variant === "text" ? height ?? 16 : size;
|
|
1734
|
+
const r = variant === "circular" ? 9999 : borderRadius ?? 8;
|
|
1735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1736
|
+
import_tamagui41.YStack,
|
|
1737
|
+
{
|
|
1738
|
+
width: w,
|
|
1739
|
+
height: h,
|
|
1740
|
+
borderRadius: r,
|
|
1741
|
+
backgroundColor: "$color3",
|
|
1742
|
+
opacity: 0.6,
|
|
1743
|
+
animation: "slow",
|
|
1744
|
+
enterStyle: { opacity: 0.3 },
|
|
1745
|
+
exitStyle: { opacity: 0.3 }
|
|
1746
|
+
}
|
|
1747
|
+
);
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
// src/patterns/NotificationBanner.tsx
|
|
1751
|
+
var import_tamagui42 = require("tamagui");
|
|
1752
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1753
|
+
var variantColors2 = {
|
|
1754
|
+
info: { bg: "$blue3", text: "$blue11" },
|
|
1755
|
+
success: { bg: "$green3", text: "$green11" },
|
|
1756
|
+
warning: { bg: "$yellow3", text: "$yellow11" },
|
|
1757
|
+
error: { bg: "$red3", text: "$red11" }
|
|
1758
|
+
};
|
|
1759
|
+
function NotificationBanner({
|
|
1760
|
+
title,
|
|
1761
|
+
message,
|
|
1762
|
+
variant = "info",
|
|
1763
|
+
onPress,
|
|
1764
|
+
onDismiss,
|
|
1765
|
+
icon
|
|
1766
|
+
}) {
|
|
1767
|
+
const colors = variantColors2[variant];
|
|
1768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1769
|
+
import_tamagui42.XStack,
|
|
1770
|
+
{
|
|
1771
|
+
backgroundColor: colors.bg,
|
|
1772
|
+
padding: "$3",
|
|
1773
|
+
borderRadius: "$4",
|
|
1774
|
+
gap: "$3",
|
|
1775
|
+
alignItems: "flex-start",
|
|
1776
|
+
onPress,
|
|
1777
|
+
pressStyle: onPress ? { opacity: 0.8 } : void 0,
|
|
1778
|
+
children: [
|
|
1779
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.YStack, { paddingTop: "$0.5", children: icon }),
|
|
1780
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_tamagui42.YStack, { flex: 1, gap: "$1", children: [
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.SizableText, { size: "$4", fontWeight: "600", color: colors.text, children: title }),
|
|
1782
|
+
message && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.SizableText, { size: "$3", color: colors.text, opacity: 0.8, children: message })
|
|
1783
|
+
] }),
|
|
1784
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.SizableText, { size: "$3", color: colors.text, opacity: 0.6, onPress: onDismiss, padding: "$1", children: "\u2715" })
|
|
1785
|
+
]
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
// src/patterns/ProgressSteps.tsx
|
|
1791
|
+
var import_tamagui43 = require("tamagui");
|
|
1792
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1793
|
+
function ProgressSteps({ steps, currentStep, variant = "dots" }) {
|
|
1794
|
+
if (variant === "bar") {
|
|
1795
|
+
const progress = steps.length > 1 ? currentStep / (steps.length - 1) * 100 : 100;
|
|
1796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_tamagui43.YStack, { gap: "$2", children: [
|
|
1797
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.YStack, { height: 4, backgroundColor: "$color4", borderRadius: 2, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.YStack, { height: 4, width: `${progress}%`, backgroundColor: "$color9", borderRadius: 2, animation: "quick" }) }),
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.XStack, { justifyContent: "space-between", children: steps.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.SizableText, { size: "$2", color: i <= currentStep ? "$color9" : "$color8", children: label }, i)) })
|
|
1799
|
+
] });
|
|
1800
|
+
}
|
|
1801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.XStack, { alignItems: "center", justifyContent: "center", gap: "$0", children: steps.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_tamagui43.XStack, { alignItems: "center", gap: "$0", children: [
|
|
1802
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_tamagui43.YStack, { alignItems: "center", gap: "$1.5", children: [
|
|
1803
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1804
|
+
import_tamagui43.Circle,
|
|
1805
|
+
{
|
|
1806
|
+
size: variant === "numbered" ? 28 : 10,
|
|
1807
|
+
backgroundColor: i <= currentStep ? "$color9" : "$color4",
|
|
1808
|
+
animation: "quick",
|
|
1809
|
+
children: variant === "numbered" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.SizableText, { size: "$2", fontWeight: "600", color: i <= currentStep ? "$color1" : "$color8", children: i + 1 })
|
|
1810
|
+
}
|
|
1811
|
+
),
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.SizableText, { size: "$1", color: i <= currentStep ? "$color11" : "$color8", numberOfLines: 1, children: label })
|
|
1813
|
+
] }),
|
|
1814
|
+
i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1815
|
+
import_tamagui43.YStack,
|
|
1816
|
+
{
|
|
1817
|
+
height: 2,
|
|
1818
|
+
width: 32,
|
|
1819
|
+
backgroundColor: i < currentStep ? "$color9" : "$color4",
|
|
1820
|
+
marginBottom: "$4"
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
] }, i)) });
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
// src/patterns/SwipeableRow.tsx
|
|
1827
|
+
var import_react8 = require("react");
|
|
1828
|
+
var import_tamagui44 = require("tamagui");
|
|
1829
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1830
|
+
function SwipeableRow({ children, leftActions, rightActions }) {
|
|
1831
|
+
const [showActions, setShowActions] = (0, import_react8.useState)(false);
|
|
1832
|
+
const actions = [...leftActions ?? [], ...rightActions ?? []];
|
|
1833
|
+
if (actions.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
|
|
1834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_tamagui44.YStack, { children: [
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1836
|
+
import_tamagui44.YStack,
|
|
1837
|
+
{
|
|
1838
|
+
onLongPress: () => setShowActions((v) => !v),
|
|
1839
|
+
pressStyle: { opacity: 0.9 },
|
|
1840
|
+
children
|
|
1841
|
+
}
|
|
1842
|
+
),
|
|
1843
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_tamagui44.XStack, { gap: "$2", padding: "$2", animation: "quick", enterStyle: { opacity: 0, scale: 0.95 }, children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1844
|
+
import_tamagui44.Button,
|
|
1845
|
+
{
|
|
1846
|
+
flex: 1,
|
|
1847
|
+
size: "$3",
|
|
1848
|
+
backgroundColor: action.color,
|
|
1849
|
+
borderRadius: "$3",
|
|
1850
|
+
onPress: () => {
|
|
1851
|
+
action.onPress();
|
|
1852
|
+
setShowActions(false);
|
|
1853
|
+
},
|
|
1854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_tamagui44.SizableText, { size: "$2", fontWeight: "600", color: "white", children: action.label })
|
|
1855
|
+
},
|
|
1856
|
+
action.id
|
|
1857
|
+
)) })
|
|
1858
|
+
] });
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
// src/patterns/MediaCard.tsx
|
|
1862
|
+
var import_tamagui45 = require("tamagui");
|
|
1863
|
+
var import_linear_gradient = require("tamagui/linear-gradient");
|
|
1864
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1865
|
+
function MediaCard({
|
|
1866
|
+
image,
|
|
1867
|
+
title,
|
|
1868
|
+
subtitle,
|
|
1869
|
+
overlay = "gradient",
|
|
1870
|
+
aspectRatio = 16 / 9,
|
|
1871
|
+
onPress,
|
|
1872
|
+
badge
|
|
1873
|
+
}) {
|
|
1874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1875
|
+
import_tamagui45.YStack,
|
|
1876
|
+
{
|
|
1877
|
+
borderRadius: "$4",
|
|
1878
|
+
overflow: "hidden",
|
|
1879
|
+
onPress,
|
|
1880
|
+
pressStyle: onPress ? { scale: 0.98, opacity: 0.9 } : void 0,
|
|
1881
|
+
animation: "quick",
|
|
1882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_tamagui45.YStack, { aspectRatio, children: [
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.Image, { source: { uri: image }, width: "100%", height: "100%", objectFit: "cover" }),
|
|
1884
|
+
overlay === "gradient" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1885
|
+
import_linear_gradient.LinearGradient,
|
|
1886
|
+
{
|
|
1887
|
+
colors: ["transparent", "rgba(0,0,0,0.7)"],
|
|
1888
|
+
start: [0, 0],
|
|
1889
|
+
end: [0, 1],
|
|
1890
|
+
position: "absolute",
|
|
1891
|
+
bottom: 0,
|
|
1892
|
+
left: 0,
|
|
1893
|
+
right: 0,
|
|
1894
|
+
height: "60%"
|
|
1895
|
+
}
|
|
1896
|
+
),
|
|
1897
|
+
overlay === "dark" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.YStack, { position: "absolute", fullscreen: true, backgroundColor: "rgba(0,0,0,0.4)" }),
|
|
1898
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.XStack, { position: "absolute", top: "$2", right: "$2", backgroundColor: "$color9", paddingHorizontal: "$2", paddingVertical: "$1", borderRadius: "$2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.SizableText, { size: "$1", fontWeight: "600", color: "$color1", children: badge }) }),
|
|
1899
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_tamagui45.YStack, { position: "absolute", bottom: 0, left: 0, right: 0, padding: "$3", gap: "$1", children: [
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.SizableText, { size: "$5", fontWeight: "600", color: "white", children: title }),
|
|
1901
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.SizableText, { size: "$3", color: "rgba(255,255,255,0.8)", children: subtitle })
|
|
1902
|
+
] })
|
|
1903
|
+
] })
|
|
1904
|
+
}
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
// src/patterns/Carousel.tsx
|
|
1909
|
+
var import_react9 = require("react");
|
|
1910
|
+
var import_tamagui46 = require("tamagui");
|
|
1911
|
+
var import_react_native3 = require("react-native");
|
|
1912
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1913
|
+
function Carousel({ children, gap = "$3", snapToInterval, showIndicators = false }) {
|
|
1914
|
+
const [activeIndex, setActiveIndex] = (0, import_react9.useState)(0);
|
|
1915
|
+
const count = import_react9.Children.count(children);
|
|
1916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_tamagui46.YStack, { gap: "$3", children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1918
|
+
import_react_native3.ScrollView,
|
|
1919
|
+
{
|
|
1920
|
+
horizontal: true,
|
|
1921
|
+
showsHorizontalScrollIndicator: false,
|
|
1922
|
+
snapToInterval,
|
|
1923
|
+
decelerationRate: "fast",
|
|
1924
|
+
contentContainerStyle: { gap: gap === "$2" ? 8 : gap === "$3" ? 12 : 16, paddingHorizontal: 16 },
|
|
1925
|
+
onMomentumScrollEnd: (e) => {
|
|
1926
|
+
if (snapToInterval) {
|
|
1927
|
+
setActiveIndex(Math.round(e.nativeEvent.contentOffset.x / snapToInterval));
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
children
|
|
1931
|
+
}
|
|
1932
|
+
),
|
|
1933
|
+
showIndicators && count > 1 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_tamagui46.XStack, { justifyContent: "center", gap: "$1.5", children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1934
|
+
import_tamagui46.Circle,
|
|
1935
|
+
{
|
|
1936
|
+
size: 6,
|
|
1937
|
+
backgroundColor: i === activeIndex ? "$color9" : "$color4",
|
|
1938
|
+
animation: "quick"
|
|
1939
|
+
},
|
|
1940
|
+
i
|
|
1941
|
+
)) })
|
|
1942
|
+
] });
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
// src/patterns/PullToRefresh.tsx
|
|
1946
|
+
var import_tamagui47 = require("tamagui");
|
|
1947
|
+
var import_react_native4 = require("react-native");
|
|
1948
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1949
|
+
function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
1950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1951
|
+
import_react_native4.ScrollView,
|
|
1952
|
+
{
|
|
1953
|
+
contentContainerStyle: { flexGrow: 1 },
|
|
1954
|
+
refreshControl: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native4.RefreshControl, { refreshing, onRefresh }),
|
|
1955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_tamagui47.YStack, { flex: 1, children })
|
|
1956
|
+
}
|
|
1957
|
+
);
|
|
1958
|
+
}
|
|
922
1959
|
// Annotate the CommonJS export names for ESM import in node:
|
|
923
1960
|
0 && (module.exports = {
|
|
1961
|
+
Accordion,
|
|
1962
|
+
ActionSheet,
|
|
924
1963
|
AlertDialog,
|
|
1964
|
+
AppHeader,
|
|
925
1965
|
Avatar,
|
|
926
1966
|
Badge,
|
|
927
1967
|
BlinkAvatar,
|
|
@@ -929,26 +1969,38 @@ function ProfileHeader({ name, subtitle, avatar, stats, actions }) {
|
|
|
929
1969
|
BlinkCard,
|
|
930
1970
|
BlinkInput,
|
|
931
1971
|
BlinkText,
|
|
1972
|
+
BlinkTooltip,
|
|
1973
|
+
BottomSheet,
|
|
932
1974
|
Button,
|
|
933
1975
|
Card,
|
|
1976
|
+
Carousel,
|
|
934
1977
|
ChatBubble,
|
|
935
1978
|
Checkbox,
|
|
936
1979
|
Circle,
|
|
1980
|
+
Container,
|
|
937
1981
|
Dialog,
|
|
938
1982
|
DialogProvider,
|
|
939
1983
|
Divider,
|
|
940
1984
|
EmptyState,
|
|
1985
|
+
FloatingActionButton,
|
|
1986
|
+
FormField,
|
|
1987
|
+
Grid,
|
|
941
1988
|
H1,
|
|
942
1989
|
H2,
|
|
943
1990
|
H3,
|
|
944
1991
|
H4,
|
|
945
1992
|
H5,
|
|
946
1993
|
H6,
|
|
1994
|
+
ICONS,
|
|
1995
|
+
Icon,
|
|
947
1996
|
Image,
|
|
948
1997
|
Input,
|
|
949
1998
|
KeyboardStickyFooter,
|
|
950
1999
|
Label,
|
|
951
2000
|
ListItem,
|
|
2001
|
+
LoginScreen,
|
|
2002
|
+
MediaCard,
|
|
2003
|
+
NotificationBanner,
|
|
952
2004
|
OnboardingCarousel,
|
|
953
2005
|
PageContainer,
|
|
954
2006
|
PageMainContainer,
|
|
@@ -958,9 +2010,13 @@ function ProfileHeader({ name, subtitle, avatar, stats, actions }) {
|
|
|
958
2010
|
Pressable,
|
|
959
2011
|
ProfileHeader,
|
|
960
2012
|
Progress,
|
|
2013
|
+
ProgressSteps,
|
|
2014
|
+
PullToRefresh,
|
|
961
2015
|
RadioGroup,
|
|
2016
|
+
SafeArea,
|
|
962
2017
|
ScreenLayout,
|
|
963
2018
|
ScrollView,
|
|
2019
|
+
SearchBar,
|
|
964
2020
|
Section,
|
|
965
2021
|
Select,
|
|
966
2022
|
SepHeading,
|
|
@@ -968,16 +2024,22 @@ function ProfileHeader({ name, subtitle, avatar, stats, actions }) {
|
|
|
968
2024
|
SettingsScreen,
|
|
969
2025
|
Sheet,
|
|
970
2026
|
SizableText,
|
|
2027
|
+
Skeleton,
|
|
971
2028
|
Slider,
|
|
972
2029
|
Spinner,
|
|
973
2030
|
StepPageLayout,
|
|
974
2031
|
SubHeading,
|
|
2032
|
+
SwipeableRow,
|
|
975
2033
|
Switch,
|
|
2034
|
+
TabBar,
|
|
2035
|
+
Tabs,
|
|
976
2036
|
TamaguiImage,
|
|
977
2037
|
TamaguiProvider,
|
|
978
2038
|
Text,
|
|
979
2039
|
TextArea,
|
|
980
2040
|
Theme,
|
|
2041
|
+
ToastProvider,
|
|
2042
|
+
ToggleGroup,
|
|
981
2043
|
Tooltip,
|
|
982
2044
|
View,
|
|
983
2045
|
XStack,
|
|
@@ -987,9 +2049,11 @@ function ProfileHeader({ name, subtitle, avatar, stats, actions }) {
|
|
|
987
2049
|
dialogConfirm,
|
|
988
2050
|
showError,
|
|
989
2051
|
styled,
|
|
2052
|
+
toast,
|
|
990
2053
|
useMedia,
|
|
991
2054
|
useTheme,
|
|
992
2055
|
useThemeName,
|
|
2056
|
+
useToast,
|
|
993
2057
|
withStaticProperties
|
|
994
2058
|
});
|
|
995
2059
|
//# sourceMappingURL=index.js.map
|