@blinkdotnew/mobile-ui 2.0.0-alpha.1 → 2.0.0-alpha.11
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 +591 -417
- package/dist/index.d.ts +591 -417
- package/dist/index.js +1834 -412
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1783 -410
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -20,359 +20,267 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
23
|
+
Accordion: () => import_tamagui49.Accordion,
|
|
24
|
+
ActionSheet: () => ActionSheet,
|
|
25
|
+
Adapt: () => import_tamagui49.Adapt,
|
|
26
|
+
AlertDialog: () => import_tamagui49.AlertDialog,
|
|
27
|
+
Anchor: () => import_tamagui49.Anchor,
|
|
28
|
+
AnimatePresence: () => import_tamagui49.AnimatePresence,
|
|
29
|
+
AppHeader: () => AppHeader,
|
|
30
|
+
Article: () => import_tamagui49.Article,
|
|
31
|
+
Aside: () => import_tamagui49.Aside,
|
|
32
|
+
Avatar: () => import_tamagui49.Avatar,
|
|
33
|
+
Badge: () => Badge,
|
|
34
|
+
BlinkAccordion: () => BlinkAccordion,
|
|
35
|
+
BlinkAvatar: () => Avatar,
|
|
36
|
+
BlinkButton: () => Button,
|
|
37
|
+
BlinkCard: () => Card,
|
|
38
|
+
BlinkInput: () => Input,
|
|
39
|
+
BlinkProvider: () => import_tamagui49.TamaguiProvider,
|
|
40
|
+
BlinkTabs: () => BlinkTabs,
|
|
24
41
|
BlinkText: () => BlinkText,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
BlinkToastProvider: () => BlinkToastProvider,
|
|
43
|
+
BlinkToggleGroup: () => BlinkToggleGroup,
|
|
44
|
+
BlinkTooltip: () => BlinkTooltip,
|
|
45
|
+
BottomSheet: () => BottomSheet,
|
|
46
|
+
Button: () => import_tamagui49.Button,
|
|
47
|
+
Card: () => import_tamagui49.Card,
|
|
48
|
+
Carousel: () => Carousel,
|
|
49
|
+
ChatBubble: () => ChatBubble,
|
|
50
|
+
Checkbox: () => import_tamagui49.Checkbox,
|
|
51
|
+
Circle: () => import_tamagui49.Circle,
|
|
52
|
+
Container: () => Container,
|
|
53
|
+
Dialog: () => import_tamagui49.Dialog,
|
|
54
|
+
DialogProvider: () => DialogProvider,
|
|
55
|
+
Divider: () => Divider,
|
|
56
|
+
EmptyState: () => EmptyState,
|
|
57
|
+
EnsureFlexed: () => import_tamagui49.EnsureFlexed,
|
|
58
|
+
Fieldset: () => import_tamagui49.Fieldset,
|
|
59
|
+
FloatingActionButton: () => FloatingActionButton,
|
|
60
|
+
Footer: () => import_tamagui49.Footer,
|
|
61
|
+
Form: () => import_tamagui49.Form,
|
|
62
|
+
FormField: () => FormField,
|
|
63
|
+
Frame: () => import_tamagui49.Frame,
|
|
64
|
+
Grid: () => Grid,
|
|
65
|
+
Group: () => import_tamagui49.Group,
|
|
66
|
+
H1: () => import_tamagui49.H1,
|
|
67
|
+
H2: () => import_tamagui49.H2,
|
|
68
|
+
H3: () => import_tamagui49.H3,
|
|
69
|
+
H4: () => import_tamagui49.H4,
|
|
70
|
+
H5: () => import_tamagui49.H5,
|
|
71
|
+
H6: () => import_tamagui49.H6,
|
|
72
|
+
Header: () => import_tamagui49.Header,
|
|
73
|
+
Heading: () => import_tamagui49.Heading,
|
|
74
|
+
ICONS: () => ICONS,
|
|
75
|
+
Icon: () => Icon,
|
|
76
|
+
Image: () => Image2,
|
|
77
|
+
Input: () => import_tamagui49.Input,
|
|
78
|
+
KeyboardStickyFooter: () => KeyboardStickyFooter,
|
|
79
|
+
Label: () => import_tamagui49.Label,
|
|
80
|
+
ListItem: () => ListItem,
|
|
81
|
+
LoginScreen: () => LoginScreen,
|
|
82
|
+
Main: () => import_tamagui49.Main,
|
|
83
|
+
MediaCard: () => MediaCard,
|
|
84
|
+
Nav: () => import_tamagui49.Nav,
|
|
85
|
+
NotificationBanner: () => NotificationBanner,
|
|
86
|
+
OnboardingCarousel: () => OnboardingCarousel,
|
|
87
|
+
PageContainer: () => PageContainer,
|
|
88
|
+
PageMainContainer: () => PageMainContainer,
|
|
89
|
+
Paragraph: () => import_tamagui49.Paragraph,
|
|
90
|
+
PaywallScreen: () => PaywallScreen,
|
|
91
|
+
Popover: () => import_tamagui49.Popover,
|
|
92
|
+
Portal: () => import_tamagui49.Portal,
|
|
93
|
+
PortalHost: () => import_tamagui49.PortalHost,
|
|
94
|
+
PortalItem: () => import_tamagui49.PortalItem,
|
|
95
|
+
PortalProvider: () => import_tamagui49.PortalProvider,
|
|
96
|
+
Pressable: () => Pressable,
|
|
97
|
+
ProfileHeader: () => ProfileHeader,
|
|
98
|
+
Progress: () => import_tamagui49.Progress,
|
|
99
|
+
ProgressSteps: () => ProgressSteps,
|
|
100
|
+
PullToRefresh: () => PullToRefresh,
|
|
101
|
+
RadioGroup: () => import_tamagui49.RadioGroup,
|
|
102
|
+
SafeArea: () => SafeArea,
|
|
103
|
+
ScreenLayout: () => ScreenLayout,
|
|
104
|
+
ScrollView: () => import_tamagui49.ScrollView,
|
|
105
|
+
SearchBar: () => SearchBar,
|
|
106
|
+
Section: () => Section,
|
|
107
|
+
Select: () => import_tamagui49.Select,
|
|
108
|
+
SepHeading: () => SepHeading,
|
|
109
|
+
Separator: () => import_tamagui49.Separator,
|
|
110
|
+
SettingsScreen: () => SettingsScreen,
|
|
111
|
+
Sheet: () => import_tamagui49.Sheet,
|
|
112
|
+
SizableStack: () => import_tamagui49.SizableStack,
|
|
113
|
+
SizableText: () => import_tamagui49.SizableText,
|
|
114
|
+
Skeleton: () => Skeleton,
|
|
115
|
+
Slider: () => import_tamagui49.Slider,
|
|
116
|
+
Spacer: () => import_tamagui49.Spacer,
|
|
117
|
+
Spinner: () => import_tamagui49.Spinner,
|
|
118
|
+
Square: () => import_tamagui49.Square,
|
|
119
|
+
Stack: () => import_tamagui49.Stack,
|
|
120
|
+
StepPageLayout: () => StepPageLayout,
|
|
121
|
+
SubHeading: () => SubHeading,
|
|
122
|
+
SwipeableRow: () => SwipeableRow,
|
|
123
|
+
Switch: () => import_tamagui49.Switch,
|
|
124
|
+
TabBar: () => TabBar,
|
|
125
|
+
Tabs: () => import_tamagui49.Tabs,
|
|
126
|
+
TamaguiImage: () => import_tamagui49.Image,
|
|
127
|
+
TamaguiListItem: () => import_tamagui49.ListItem,
|
|
128
|
+
TamaguiProvider: () => import_tamagui49.TamaguiProvider,
|
|
129
|
+
Text: () => import_tamagui49.Text,
|
|
130
|
+
TextArea: () => import_tamagui49.TextArea,
|
|
131
|
+
Theme: () => import_tamagui49.Theme,
|
|
132
|
+
ThemeableStack: () => import_tamagui49.ThemeableStack,
|
|
133
|
+
ToggleGroup: () => import_tamagui49.ToggleGroup,
|
|
134
|
+
Tooltip: () => import_tamagui49.Tooltip,
|
|
135
|
+
TooltipSimple: () => import_tamagui49.TooltipSimple,
|
|
136
|
+
Unspaced: () => import_tamagui49.Unspaced,
|
|
137
|
+
View: () => import_tamagui49.View,
|
|
138
|
+
VisuallyHidden: () => import_tamagui49.VisuallyHidden,
|
|
139
|
+
XGroup: () => import_tamagui49.XGroup,
|
|
140
|
+
XStack: () => import_tamagui49.XStack,
|
|
141
|
+
YGroup: () => import_tamagui49.YGroup,
|
|
142
|
+
YStack: () => import_tamagui49.YStack,
|
|
143
|
+
ZStack: () => import_tamagui49.ZStack,
|
|
144
|
+
addTheme: () => import_tamagui49.addTheme,
|
|
145
|
+
blinkConfig: () => blinkConfig,
|
|
146
|
+
composeEventHandlers: () => import_tamagui49.composeEventHandlers,
|
|
147
|
+
composeRefs: () => import_tamagui49.composeRefs,
|
|
148
|
+
createFont: () => import_tamagui49.createFont,
|
|
149
|
+
createMedia: () => import_tamagui49.createMedia,
|
|
150
|
+
createStyledContext: () => import_tamagui49.createStyledContext,
|
|
151
|
+
createTamagui: () => import_tamagui49.createTamagui,
|
|
152
|
+
createTheme: () => import_tamagui49.createTheme,
|
|
153
|
+
createTokens: () => import_tamagui49.createTokens,
|
|
154
|
+
createVariable: () => import_tamagui49.createVariable,
|
|
155
|
+
dialogConfirm: () => dialogConfirm,
|
|
156
|
+
getConfig: () => import_tamagui49.getConfig,
|
|
157
|
+
getToken: () => import_tamagui49.getToken,
|
|
158
|
+
getTokenValue: () => import_tamagui49.getTokenValue,
|
|
159
|
+
getTokens: () => import_tamagui49.getTokens,
|
|
160
|
+
isClient: () => import_tamagui49.isClient,
|
|
161
|
+
isWeb: () => import_tamagui49.isWeb,
|
|
162
|
+
replaceTheme: () => import_tamagui49.replaceTheme,
|
|
163
|
+
showError: () => showError,
|
|
164
|
+
styled: () => import_tamagui49.styled,
|
|
165
|
+
tamaguiDefaultConfig: () => import_v52.defaultConfig,
|
|
166
|
+
toast: () => toast,
|
|
167
|
+
updateTheme: () => import_tamagui49.updateTheme,
|
|
168
|
+
useBlinkToast: () => useBlinkToast,
|
|
169
|
+
useComposedRefs: () => import_tamagui49.useComposedRefs,
|
|
170
|
+
useControllableState: () => import_tamagui49.useControllableState,
|
|
171
|
+
useDebounce: () => import_tamagui49.useDebounce,
|
|
172
|
+
useDebounceValue: () => import_tamagui49.useDebounceValue,
|
|
173
|
+
useDidFinishSSR: () => import_tamagui49.useDidFinishSSR,
|
|
174
|
+
useEvent: () => import_tamagui49.useEvent,
|
|
175
|
+
useForceUpdate: () => import_tamagui49.useForceUpdate,
|
|
176
|
+
useIsPresent: () => import_tamagui49.useIsPresent,
|
|
177
|
+
useIsomorphicLayoutEffect: () => import_tamagui49.useIsomorphicLayoutEffect,
|
|
178
|
+
useMedia: () => import_tamagui49.useMedia,
|
|
179
|
+
usePresence: () => import_tamagui49.usePresence,
|
|
180
|
+
useTheme: () => import_tamagui49.useTheme,
|
|
181
|
+
useThemeName: () => import_tamagui49.useThemeName,
|
|
182
|
+
useWindowDimensions: () => import_tamagui49.useWindowDimensions,
|
|
183
|
+
withStaticProperties: () => import_tamagui49.withStaticProperties
|
|
29
184
|
});
|
|
30
185
|
module.exports = __toCommonJS(index_exports);
|
|
31
186
|
|
|
32
187
|
// src/config/tamagui.config.ts
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
// src/config/tokens.ts
|
|
188
|
+
var import_v5 = require("@tamagui/config/v5");
|
|
36
189
|
var import_tamagui = require("tamagui");
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
white: "#FFFFFF",
|
|
40
|
-
black: "#000000",
|
|
41
|
-
transparent: "transparent"
|
|
42
|
-
},
|
|
43
|
-
space: {
|
|
44
|
-
0: 0,
|
|
45
|
-
0.5: 2,
|
|
46
|
-
1: 4,
|
|
47
|
-
1.5: 6,
|
|
48
|
-
2: 8,
|
|
49
|
-
2.5: 10,
|
|
50
|
-
3: 12,
|
|
51
|
-
3.5: 14,
|
|
52
|
-
4: 16,
|
|
53
|
-
5: 20,
|
|
54
|
-
6: 24,
|
|
55
|
-
7: 28,
|
|
56
|
-
8: 32,
|
|
57
|
-
9: 36,
|
|
58
|
-
10: 40,
|
|
59
|
-
12: 48,
|
|
60
|
-
16: 64,
|
|
61
|
-
true: 16,
|
|
62
|
-
"-1": -4,
|
|
63
|
-
"-2": -8,
|
|
64
|
-
"-3": -12,
|
|
65
|
-
"-4": -16
|
|
66
|
-
},
|
|
67
|
-
size: {
|
|
68
|
-
0: 0,
|
|
69
|
-
1: 4,
|
|
70
|
-
2: 8,
|
|
71
|
-
3: 12,
|
|
72
|
-
4: 16,
|
|
73
|
-
5: 20,
|
|
74
|
-
6: 24,
|
|
75
|
-
7: 28,
|
|
76
|
-
8: 32,
|
|
77
|
-
9: 36,
|
|
78
|
-
10: 40,
|
|
79
|
-
11: 44,
|
|
80
|
-
12: 48,
|
|
81
|
-
14: 56,
|
|
82
|
-
16: 64,
|
|
83
|
-
20: 80,
|
|
84
|
-
true: 44
|
|
85
|
-
},
|
|
86
|
-
radius: {
|
|
87
|
-
0: 0,
|
|
88
|
-
1: 2,
|
|
89
|
-
2: 4,
|
|
90
|
-
3: 6,
|
|
91
|
-
4: 8,
|
|
92
|
-
5: 10,
|
|
93
|
-
6: 12,
|
|
94
|
-
7: 16,
|
|
95
|
-
8: 20,
|
|
96
|
-
9: 24,
|
|
97
|
-
10: 9999,
|
|
98
|
-
true: 12
|
|
99
|
-
},
|
|
100
|
-
zIndex: {
|
|
101
|
-
0: 0,
|
|
102
|
-
1: 100,
|
|
103
|
-
2: 200,
|
|
104
|
-
3: 300,
|
|
105
|
-
4: 400,
|
|
106
|
-
5: 500
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// src/config/themes.ts
|
|
111
|
-
var oceanLight = {
|
|
112
|
-
background: "#FFFFFF",
|
|
113
|
-
backgroundHover: "#F8FAFC",
|
|
114
|
-
backgroundPress: "#F1F5F9",
|
|
115
|
-
color: "#0F172A",
|
|
116
|
-
colorHover: "#1E293B",
|
|
117
|
-
colorPress: "#334155",
|
|
118
|
-
primary: "#0D9488",
|
|
119
|
-
primaryHover: "#0F766E",
|
|
120
|
-
primaryPress: "#115E59",
|
|
121
|
-
secondary: "#F0F9FF",
|
|
122
|
-
secondaryHover: "#E0F2FE",
|
|
123
|
-
secondaryPress: "#BAE6FD",
|
|
124
|
-
accent: "#2DD4BF",
|
|
125
|
-
surface: "#F8FAFC",
|
|
126
|
-
surfaceHover: "#F1F5F9",
|
|
127
|
-
card: "#FFFFFF",
|
|
128
|
-
cardHover: "#F8FAFC",
|
|
129
|
-
border: "#E2E8F0",
|
|
130
|
-
borderHover: "#CBD5E1",
|
|
131
|
-
textPrimary: "#0F172A",
|
|
132
|
-
textSecondary: "#475569",
|
|
133
|
-
textMuted: "#94A3B8",
|
|
134
|
-
textInverse: "#FFFFFF",
|
|
135
|
-
error: "#EF4444",
|
|
136
|
-
errorHover: "#DC2626",
|
|
137
|
-
success: "#10B981",
|
|
138
|
-
successHover: "#059669",
|
|
139
|
-
warning: "#F59E0B",
|
|
140
|
-
warningHover: "#D97706",
|
|
141
|
-
highlight: "#0D9488",
|
|
142
|
-
overlay: "rgba(0,0,0,0.5)",
|
|
143
|
-
shadowColor: "rgba(0,0,0,0.1)"
|
|
144
|
-
};
|
|
145
|
-
var oceanDark = {
|
|
146
|
-
background: "#0F172A",
|
|
147
|
-
backgroundHover: "#1E293B",
|
|
148
|
-
backgroundPress: "#334155",
|
|
149
|
-
color: "#F8FAFC",
|
|
150
|
-
colorHover: "#E2E8F0",
|
|
151
|
-
colorPress: "#CBD5E1",
|
|
152
|
-
primary: "#14B8A6",
|
|
153
|
-
primaryHover: "#2DD4BF",
|
|
154
|
-
primaryPress: "#0D9488",
|
|
155
|
-
secondary: "#1E293B",
|
|
156
|
-
secondaryHover: "#334155",
|
|
157
|
-
secondaryPress: "#475569",
|
|
158
|
-
accent: "#2DD4BF",
|
|
159
|
-
surface: "#1E293B",
|
|
160
|
-
surfaceHover: "#334155",
|
|
161
|
-
card: "#1E293B",
|
|
162
|
-
cardHover: "#334155",
|
|
163
|
-
border: "#334155",
|
|
164
|
-
borderHover: "#475569",
|
|
165
|
-
textPrimary: "#F8FAFC",
|
|
166
|
-
textSecondary: "#94A3B8",
|
|
167
|
-
textMuted: "#64748B",
|
|
168
|
-
textInverse: "#0F172A",
|
|
169
|
-
error: "#F87171",
|
|
170
|
-
errorHover: "#EF4444",
|
|
171
|
-
success: "#34D399",
|
|
172
|
-
successHover: "#10B981",
|
|
173
|
-
warning: "#FBBF24",
|
|
174
|
-
warningHover: "#F59E0B",
|
|
175
|
-
highlight: "#14B8A6",
|
|
176
|
-
overlay: "rgba(0,0,0,0.7)",
|
|
177
|
-
shadowColor: "rgba(0,0,0,0.3)"
|
|
178
|
-
};
|
|
179
|
-
var themes = {
|
|
180
|
-
light: oceanLight,
|
|
181
|
-
dark: oceanDark
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
// src/config/fonts.ts
|
|
185
|
-
var import_tamagui2 = require("tamagui");
|
|
186
|
-
var outfitFont = (0, import_tamagui2.createFont)({
|
|
187
|
-
family: "Outfit, System",
|
|
188
|
-
size: {
|
|
189
|
-
1: 11,
|
|
190
|
-
2: 12,
|
|
191
|
-
3: 13,
|
|
192
|
-
4: 14,
|
|
193
|
-
5: 15,
|
|
194
|
-
6: 16,
|
|
195
|
-
7: 18,
|
|
196
|
-
8: 20,
|
|
197
|
-
9: 22,
|
|
198
|
-
10: 28,
|
|
199
|
-
11: 36,
|
|
200
|
-
12: 48,
|
|
201
|
-
true: 15
|
|
202
|
-
},
|
|
203
|
-
lineHeight: {
|
|
204
|
-
1: 16,
|
|
205
|
-
2: 18,
|
|
206
|
-
3: 20,
|
|
207
|
-
4: 22,
|
|
208
|
-
5: 23,
|
|
209
|
-
6: 24,
|
|
210
|
-
7: 26,
|
|
211
|
-
8: 28,
|
|
212
|
-
9: 30,
|
|
213
|
-
10: 36,
|
|
214
|
-
11: 44,
|
|
215
|
-
12: 56,
|
|
216
|
-
true: 23
|
|
217
|
-
},
|
|
218
|
-
weight: {
|
|
219
|
-
1: "400",
|
|
220
|
-
2: "500",
|
|
221
|
-
3: "600",
|
|
222
|
-
4: "700",
|
|
223
|
-
5: "800",
|
|
224
|
-
true: "400"
|
|
225
|
-
},
|
|
226
|
-
letterSpacing: {
|
|
227
|
-
1: 0,
|
|
228
|
-
2: -0.2,
|
|
229
|
-
3: -0.4,
|
|
230
|
-
4: -0.6,
|
|
231
|
-
true: 0
|
|
232
|
-
}
|
|
190
|
+
var blinkConfig = (0, import_tamagui.createTamagui)({
|
|
191
|
+
...import_v5.defaultConfig
|
|
233
192
|
});
|
|
234
193
|
|
|
235
|
-
// src/
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
themes,
|
|
239
|
-
fonts: {
|
|
240
|
-
heading: outfitFont,
|
|
241
|
-
body: outfitFont
|
|
242
|
-
},
|
|
243
|
-
media: {
|
|
244
|
-
xs: { maxWidth: 660 },
|
|
245
|
-
sm: { maxWidth: 860 },
|
|
246
|
-
md: { maxWidth: 980 },
|
|
247
|
-
lg: { maxWidth: 1120 },
|
|
248
|
-
gtSm: { minWidth: 861 },
|
|
249
|
-
short: { maxHeight: 820 }
|
|
250
|
-
},
|
|
251
|
-
shorthands: {
|
|
252
|
-
px: "paddingHorizontal",
|
|
253
|
-
py: "paddingVertical",
|
|
254
|
-
mx: "marginHorizontal",
|
|
255
|
-
my: "marginVertical",
|
|
256
|
-
bg: "backgroundColor",
|
|
257
|
-
br: "borderRadius",
|
|
258
|
-
f: "flex",
|
|
259
|
-
w: "width",
|
|
260
|
-
h: "height"
|
|
261
|
-
}
|
|
262
|
-
});
|
|
194
|
+
// src/index.ts
|
|
195
|
+
var import_v52 = require("@tamagui/config/v5");
|
|
196
|
+
var import_tamagui49 = require("tamagui");
|
|
263
197
|
|
|
264
198
|
// src/primitives/Button.tsx
|
|
265
|
-
var
|
|
266
|
-
var
|
|
267
|
-
|
|
268
|
-
tag: "button",
|
|
269
|
-
alignItems: "center",
|
|
270
|
-
justifyContent: "center",
|
|
271
|
-
flexDirection: "row",
|
|
272
|
-
gap: "$2",
|
|
199
|
+
var import_tamagui2 = require("tamagui");
|
|
200
|
+
var Button = (0, import_tamagui2.styled)(import_tamagui2.Button, {
|
|
201
|
+
borderWidth: 0,
|
|
273
202
|
cursor: "pointer",
|
|
274
|
-
|
|
203
|
+
focusVisibleStyle: {
|
|
204
|
+
outlineWidth: 2,
|
|
205
|
+
outlineStyle: "solid",
|
|
206
|
+
outlineColor: "$color8"
|
|
207
|
+
},
|
|
275
208
|
variants: {
|
|
276
209
|
variant: {
|
|
210
|
+
default: {
|
|
211
|
+
backgroundColor: "$color3",
|
|
212
|
+
hoverStyle: { backgroundColor: "$color4" },
|
|
213
|
+
pressStyle: { backgroundColor: "$color2", opacity: 0.8 }
|
|
214
|
+
},
|
|
277
215
|
primary: {
|
|
278
|
-
backgroundColor: "$
|
|
216
|
+
backgroundColor: "$color9",
|
|
217
|
+
color: "$color1",
|
|
218
|
+
hoverStyle: { backgroundColor: "$color10" },
|
|
219
|
+
pressStyle: { backgroundColor: "$color8", opacity: 0.9 }
|
|
279
220
|
},
|
|
280
|
-
|
|
281
|
-
backgroundColor: "
|
|
221
|
+
outlined: {
|
|
222
|
+
backgroundColor: "transparent",
|
|
223
|
+
borderWidth: 2,
|
|
224
|
+
borderColor: "$color6",
|
|
225
|
+
hoverStyle: { borderColor: "$color8" },
|
|
226
|
+
pressStyle: { borderColor: "$color4", opacity: 0.8 }
|
|
282
227
|
},
|
|
283
|
-
|
|
228
|
+
transparent: {
|
|
284
229
|
backgroundColor: "transparent",
|
|
285
|
-
|
|
286
|
-
|
|
230
|
+
hoverStyle: { backgroundColor: "$color2" },
|
|
231
|
+
pressStyle: { backgroundColor: "$color1", opacity: 0.8 }
|
|
287
232
|
},
|
|
288
|
-
|
|
289
|
-
backgroundColor: "
|
|
233
|
+
floating: {
|
|
234
|
+
backgroundColor: "$color4",
|
|
235
|
+
shadowColor: "$shadow2",
|
|
236
|
+
shadowRadius: 5,
|
|
237
|
+
shadowOffset: { height: 2, width: 0 },
|
|
238
|
+
hoverStyle: { backgroundColor: "$color5" },
|
|
239
|
+
pressStyle: { backgroundColor: "$color3", opacity: 0.9 }
|
|
290
240
|
},
|
|
291
241
|
destructive: {
|
|
292
|
-
backgroundColor: "$
|
|
242
|
+
backgroundColor: "$red9",
|
|
243
|
+
color: "$color1",
|
|
244
|
+
hoverStyle: { backgroundColor: "$red10" },
|
|
245
|
+
pressStyle: { backgroundColor: "$red8", opacity: 0.9 }
|
|
293
246
|
}
|
|
294
247
|
},
|
|
295
248
|
size: {
|
|
296
|
-
sm: {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
borderRadius: "$4"
|
|
300
|
-
},
|
|
301
|
-
md: {
|
|
302
|
-
height: "$11",
|
|
303
|
-
paddingHorizontal: "$4",
|
|
304
|
-
borderRadius: "$6"
|
|
305
|
-
},
|
|
306
|
-
lg: {
|
|
307
|
-
height: "$14",
|
|
308
|
-
paddingHorizontal: "$6",
|
|
309
|
-
borderRadius: "$7"
|
|
310
|
-
}
|
|
249
|
+
sm: { height: "$3", paddingHorizontal: "$3", borderRadius: "$3" },
|
|
250
|
+
md: { height: "$4", paddingHorizontal: "$4", borderRadius: "$4" },
|
|
251
|
+
lg: { height: "$5", paddingHorizontal: "$5", borderRadius: "$5" }
|
|
311
252
|
},
|
|
312
253
|
fullWidth: {
|
|
313
254
|
true: { width: "100%" }
|
|
314
|
-
},
|
|
315
|
-
disabled: {
|
|
316
|
-
true: { opacity: 0.5, pointerEvents: "none" }
|
|
317
255
|
}
|
|
318
256
|
},
|
|
319
257
|
defaultVariants: {
|
|
320
|
-
variant: "
|
|
258
|
+
variant: "default",
|
|
321
259
|
size: "md"
|
|
322
260
|
}
|
|
323
261
|
});
|
|
324
|
-
var ButtonText = (0, import_tamagui4.styled)(import_tamagui4.Text, {
|
|
325
|
-
name: "BlinkButtonText",
|
|
326
|
-
fontFamily: "$body",
|
|
327
|
-
fontWeight: "600",
|
|
328
|
-
textAlign: "center",
|
|
329
|
-
variants: {
|
|
330
|
-
variant: {
|
|
331
|
-
primary: { color: "$textInverse" },
|
|
332
|
-
secondary: { color: "$textPrimary" },
|
|
333
|
-
outline: { color: "$textPrimary" },
|
|
334
|
-
ghost: { color: "$textPrimary" },
|
|
335
|
-
destructive: { color: "$textInverse" }
|
|
336
|
-
},
|
|
337
|
-
size: {
|
|
338
|
-
sm: { fontSize: "$3" },
|
|
339
|
-
md: { fontSize: "$5" },
|
|
340
|
-
lg: { fontSize: "$6" }
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
defaultVariants: {
|
|
344
|
-
variant: "primary",
|
|
345
|
-
size: "md"
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
var Button = (0, import_tamagui4.withStaticProperties)(ButtonFrame, {
|
|
349
|
-
Text: ButtonText
|
|
350
|
-
});
|
|
351
262
|
|
|
352
263
|
// src/primitives/Text.tsx
|
|
353
|
-
var
|
|
354
|
-
var BlinkText = (0,
|
|
264
|
+
var import_tamagui3 = require("tamagui");
|
|
265
|
+
var BlinkText = (0, import_tamagui3.styled)(import_tamagui3.SizableText, {
|
|
355
266
|
name: "BlinkText",
|
|
356
|
-
fontFamily: "$body",
|
|
357
|
-
color: "$color",
|
|
358
267
|
variants: {
|
|
359
268
|
variant: {
|
|
360
|
-
display: {
|
|
361
|
-
h1: {
|
|
362
|
-
h2: {
|
|
363
|
-
h3: {
|
|
364
|
-
h4: {
|
|
365
|
-
body: {
|
|
366
|
-
bodySmall: {
|
|
367
|
-
caption: {
|
|
368
|
-
small: {
|
|
369
|
-
tiny: { fontSize: "$1", fontWeight: "400", color: "$textMuted" }
|
|
269
|
+
display: { size: "$10", fontWeight: "800" },
|
|
270
|
+
h1: { size: "$9", fontWeight: "700" },
|
|
271
|
+
h2: { size: "$8", fontWeight: "700" },
|
|
272
|
+
h3: { size: "$7", fontWeight: "600" },
|
|
273
|
+
h4: { size: "$6", fontWeight: "600" },
|
|
274
|
+
body: { size: "$5", fontWeight: "400" },
|
|
275
|
+
bodySmall: { size: "$4", fontWeight: "400" },
|
|
276
|
+
caption: { size: "$3", fontWeight: "400", color: "$color10" },
|
|
277
|
+
small: { size: "$2", fontWeight: "400", color: "$color9" }
|
|
370
278
|
},
|
|
371
279
|
muted: {
|
|
372
|
-
true: { color: "$
|
|
280
|
+
true: { color: "$color9" }
|
|
373
281
|
},
|
|
374
282
|
secondary: {
|
|
375
|
-
true: { color: "$
|
|
283
|
+
true: { color: "$color10" }
|
|
376
284
|
},
|
|
377
285
|
center: {
|
|
378
286
|
true: { textAlign: "center" }
|
|
@@ -387,30 +295,30 @@ var BlinkText = (0, import_tamagui5.styled)(import_tamagui5.Text, {
|
|
|
387
295
|
});
|
|
388
296
|
|
|
389
297
|
// src/primitives/Card.tsx
|
|
390
|
-
var
|
|
391
|
-
var CardFrame = (0,
|
|
298
|
+
var import_tamagui4 = require("tamagui");
|
|
299
|
+
var CardFrame = (0, import_tamagui4.styled)(import_tamagui4.View, {
|
|
392
300
|
name: "BlinkCard",
|
|
393
|
-
backgroundColor: "$
|
|
301
|
+
backgroundColor: "$color2",
|
|
302
|
+
borderRadius: "$4",
|
|
394
303
|
overflow: "hidden",
|
|
395
304
|
variants: {
|
|
396
305
|
variant: {
|
|
397
306
|
flat: {},
|
|
398
307
|
elevated: {
|
|
399
|
-
shadowColor: "$
|
|
308
|
+
shadowColor: "$shadow2",
|
|
400
309
|
shadowOffset: { width: 0, height: 2 },
|
|
401
|
-
shadowOpacity: 0.1,
|
|
402
310
|
shadowRadius: 8,
|
|
403
311
|
elevation: 3
|
|
404
312
|
},
|
|
405
313
|
outlined: {
|
|
406
314
|
borderWidth: 1,
|
|
407
|
-
borderColor: "$
|
|
315
|
+
borderColor: "$color5"
|
|
408
316
|
}
|
|
409
317
|
},
|
|
410
318
|
size: {
|
|
411
|
-
sm: { borderRadius: "$
|
|
412
|
-
md: { borderRadius: "$
|
|
413
|
-
lg: { borderRadius: "$
|
|
319
|
+
sm: { borderRadius: "$3", padding: "$3" },
|
|
320
|
+
md: { borderRadius: "$4", padding: "$4" },
|
|
321
|
+
lg: { borderRadius: "$5", padding: "$5" }
|
|
414
322
|
},
|
|
415
323
|
pressable: {
|
|
416
324
|
true: {
|
|
@@ -424,88 +332,71 @@ var CardFrame = (0, import_tamagui6.styled)(import_tamagui6.View, {
|
|
|
424
332
|
size: "md"
|
|
425
333
|
}
|
|
426
334
|
});
|
|
427
|
-
var CardHeader = (0,
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
});
|
|
431
|
-
var CardContent = (0, import_tamagui6.styled)(import_tamagui6.View, {
|
|
432
|
-
name: "BlinkCardContent"
|
|
433
|
-
});
|
|
434
|
-
var CardFooter = (0, import_tamagui6.styled)(import_tamagui6.View, {
|
|
335
|
+
var CardHeader = (0, import_tamagui4.styled)(import_tamagui4.View, { name: "BlinkCardHeader", paddingBottom: "$3" });
|
|
336
|
+
var CardContent = (0, import_tamagui4.styled)(import_tamagui4.View, { name: "BlinkCardContent" });
|
|
337
|
+
var CardFooter = (0, import_tamagui4.styled)(import_tamagui4.View, {
|
|
435
338
|
name: "BlinkCardFooter",
|
|
436
339
|
paddingTop: "$3",
|
|
437
340
|
flexDirection: "row",
|
|
438
341
|
alignItems: "center",
|
|
439
342
|
gap: "$2"
|
|
440
343
|
});
|
|
441
|
-
var Card = (0,
|
|
344
|
+
var Card = (0, import_tamagui4.withStaticProperties)(CardFrame, {
|
|
442
345
|
Header: CardHeader,
|
|
443
346
|
Content: CardContent,
|
|
444
347
|
Footer: CardFooter
|
|
445
348
|
});
|
|
446
349
|
|
|
447
350
|
// src/primitives/Input.tsx
|
|
448
|
-
var
|
|
351
|
+
var import_tamagui5 = require("tamagui");
|
|
449
352
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
450
|
-
var InputFrame = (0,
|
|
353
|
+
var InputFrame = (0, import_tamagui5.styled)(import_tamagui5.View, {
|
|
451
354
|
name: "BlinkInputFrame",
|
|
452
355
|
gap: "$1.5"
|
|
453
356
|
});
|
|
454
|
-
var InputLabel = (0,
|
|
357
|
+
var InputLabel = (0, import_tamagui5.styled)(import_tamagui5.SizableText, {
|
|
455
358
|
name: "BlinkInputLabel",
|
|
456
|
-
|
|
457
|
-
fontSize: "$4",
|
|
359
|
+
size: "$4",
|
|
458
360
|
fontWeight: "500",
|
|
459
|
-
color: "$
|
|
361
|
+
color: "$color11"
|
|
460
362
|
});
|
|
461
|
-
var InputField = (0,
|
|
363
|
+
var InputField = (0, import_tamagui5.styled)(import_tamagui5.Input, {
|
|
462
364
|
name: "BlinkInput",
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
borderWidth:
|
|
365
|
+
height: 50,
|
|
366
|
+
size: "$5",
|
|
367
|
+
borderWidth: 0.5,
|
|
368
|
+
borderColor: "$color5",
|
|
369
|
+
borderRadius: "$4",
|
|
370
|
+
backgroundColor: "$color1",
|
|
371
|
+
placeholderTextColor: "$color8",
|
|
372
|
+
focusVisibleStyle: {
|
|
373
|
+
outlineWidth: 3,
|
|
374
|
+
outlineStyle: "solid",
|
|
375
|
+
outlineColor: "$background04",
|
|
376
|
+
outlineOffset: 1,
|
|
377
|
+
borderWidth: 0.5,
|
|
378
|
+
borderColor: "$color7"
|
|
476
379
|
},
|
|
477
380
|
variants: {
|
|
478
381
|
hasError: {
|
|
479
382
|
true: {
|
|
480
|
-
borderColor: "$
|
|
481
|
-
|
|
383
|
+
borderColor: "$red9",
|
|
384
|
+
focusVisibleStyle: { borderColor: "$red9" }
|
|
482
385
|
}
|
|
483
386
|
},
|
|
484
387
|
variant: {
|
|
485
388
|
default: {},
|
|
486
389
|
filled: {
|
|
487
|
-
backgroundColor: "$
|
|
390
|
+
backgroundColor: "$color2",
|
|
488
391
|
borderColor: "transparent",
|
|
489
|
-
|
|
392
|
+
focusVisibleStyle: { borderColor: "$color7" }
|
|
490
393
|
}
|
|
491
394
|
}
|
|
492
395
|
},
|
|
493
|
-
defaultVariants: {
|
|
494
|
-
variant: "default"
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
var InputError = (0, import_tamagui7.styled)(import_tamagui7.Text, {
|
|
498
|
-
name: "BlinkInputError",
|
|
499
|
-
fontFamily: "$body",
|
|
500
|
-
fontSize: "$2",
|
|
501
|
-
color: "$error"
|
|
502
|
-
});
|
|
503
|
-
var InputHint = (0, import_tamagui7.styled)(import_tamagui7.Text, {
|
|
504
|
-
name: "BlinkInputHint",
|
|
505
|
-
fontFamily: "$body",
|
|
506
|
-
fontSize: "$2",
|
|
507
|
-
color: "$textMuted"
|
|
396
|
+
defaultVariants: { variant: "default" }
|
|
508
397
|
});
|
|
398
|
+
var InputError = (0, import_tamagui5.styled)(import_tamagui5.SizableText, { name: "BlinkInputError", size: "$2", color: "$red10" });
|
|
399
|
+
var InputHint = (0, import_tamagui5.styled)(import_tamagui5.SizableText, { name: "BlinkInputHint", size: "$2", color: "$color9" });
|
|
509
400
|
function Input({ label, error, hint, ...props }) {
|
|
510
401
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(InputFrame, { children: [
|
|
511
402
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputLabel, { children: label }),
|
|
@@ -516,70 +407,1601 @@ function Input({ label, error, hint, ...props }) {
|
|
|
516
407
|
}
|
|
517
408
|
|
|
518
409
|
// src/primitives/Avatar.tsx
|
|
519
|
-
var
|
|
410
|
+
var import_react = require("react");
|
|
411
|
+
var import_tamagui6 = require("tamagui");
|
|
520
412
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
521
|
-
var
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
413
|
+
var simpleSizes = {
|
|
414
|
+
xs: 24,
|
|
415
|
+
sm: 32,
|
|
416
|
+
md: 40,
|
|
417
|
+
lg: 48,
|
|
418
|
+
xl: 64
|
|
419
|
+
};
|
|
420
|
+
function getSize(size) {
|
|
421
|
+
if (typeof size === "number") return size;
|
|
422
|
+
return simpleSizes[size] ?? 40;
|
|
423
|
+
}
|
|
424
|
+
var Avatar = (0, import_react.memo)(({ uri, name, size: sizeIn = "md" }) => {
|
|
425
|
+
const size = getSize(sizeIn);
|
|
426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
427
|
+
import_tamagui6.Circle,
|
|
428
|
+
{
|
|
429
|
+
size,
|
|
430
|
+
overflow: "hidden",
|
|
431
|
+
backgroundColor: "$color4",
|
|
432
|
+
alignItems: "center",
|
|
433
|
+
justifyContent: "center",
|
|
434
|
+
children: uri ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
435
|
+
import_tamagui6.Image,
|
|
436
|
+
{
|
|
437
|
+
source: { uri },
|
|
438
|
+
width: size,
|
|
439
|
+
height: size,
|
|
440
|
+
objectFit: "cover"
|
|
441
|
+
}
|
|
442
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
443
|
+
import_tamagui6.SizableText,
|
|
444
|
+
{
|
|
445
|
+
size: "$3",
|
|
446
|
+
fontWeight: "600",
|
|
447
|
+
color: "$color11",
|
|
448
|
+
children: name ? name.split(" ").map((p) => p[0]).join("").toUpperCase().slice(0, 2) : "?"
|
|
449
|
+
}
|
|
450
|
+
)
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
// src/interface/Headings.tsx
|
|
456
|
+
var import_tamagui7 = require("tamagui");
|
|
457
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
458
|
+
var H1 = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
459
|
+
name: "BlinkH1",
|
|
460
|
+
role: "heading",
|
|
461
|
+
fontFamily: "$heading",
|
|
462
|
+
size: "$10",
|
|
463
|
+
fontWeight: "700"
|
|
464
|
+
});
|
|
465
|
+
var H2 = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
466
|
+
name: "BlinkH2",
|
|
467
|
+
role: "heading",
|
|
468
|
+
fontFamily: "$heading",
|
|
469
|
+
size: "$9",
|
|
470
|
+
fontWeight: "700"
|
|
471
|
+
});
|
|
472
|
+
var H3 = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
473
|
+
name: "BlinkH3",
|
|
474
|
+
role: "heading",
|
|
475
|
+
fontFamily: "$heading",
|
|
476
|
+
size: "$8",
|
|
477
|
+
fontWeight: "600"
|
|
478
|
+
});
|
|
479
|
+
var H4 = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
480
|
+
name: "BlinkH4",
|
|
481
|
+
role: "heading",
|
|
482
|
+
fontFamily: "$heading",
|
|
483
|
+
size: "$6",
|
|
484
|
+
fontWeight: "600"
|
|
485
|
+
});
|
|
486
|
+
var H5 = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
487
|
+
name: "BlinkH5",
|
|
488
|
+
role: "heading",
|
|
489
|
+
fontFamily: "$heading",
|
|
490
|
+
size: "$5",
|
|
491
|
+
fontWeight: "500"
|
|
492
|
+
});
|
|
493
|
+
var H6 = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
494
|
+
name: "BlinkH6",
|
|
495
|
+
role: "heading",
|
|
496
|
+
fontFamily: "$heading",
|
|
497
|
+
size: "$4",
|
|
498
|
+
fontWeight: "500"
|
|
499
|
+
});
|
|
500
|
+
var SubHeading = (0, import_tamagui7.styled)(import_tamagui7.SizableText, {
|
|
501
|
+
name: "BlinkSubHeading",
|
|
502
|
+
size: "$5",
|
|
503
|
+
color: "$color10",
|
|
504
|
+
fontWeight: "300",
|
|
505
|
+
$lg: { size: "$6" }
|
|
506
|
+
});
|
|
507
|
+
function SepHeading({ children }) {
|
|
508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_tamagui7.XStack, { marginTop: "$6", marginBottom: "$4", alignItems: "center", gap: "$6", children: [
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(H3, { size: "$4", color: "$color10", children }),
|
|
510
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_tamagui7.Separator, { opacity: 0.5 })
|
|
511
|
+
] });
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// src/interface/PageContainer.tsx
|
|
515
|
+
var import_tamagui8 = require("tamagui");
|
|
516
|
+
var PageContainer = (0, import_tamagui8.styled)(import_tamagui8.YStack, {
|
|
517
|
+
name: "BlinkPageContainer",
|
|
518
|
+
position: "relative",
|
|
519
|
+
marginHorizontal: "auto",
|
|
520
|
+
flex: 1,
|
|
521
|
+
flexBasis: "auto",
|
|
522
|
+
paddingHorizontal: "$4",
|
|
523
|
+
width: "100%",
|
|
524
|
+
minWidth: 380,
|
|
525
|
+
$md: { maxWidth: 760 },
|
|
526
|
+
$lg: { maxWidth: 860 },
|
|
527
|
+
$xl: { maxWidth: 1140 }
|
|
528
|
+
});
|
|
529
|
+
var PageMainContainer = (0, import_tamagui8.styled)(PageContainer, {
|
|
530
|
+
name: "BlinkPageMainContainer",
|
|
531
|
+
role: "main"
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
// src/interface/Dialog.tsx
|
|
535
|
+
var import_react2 = require("react");
|
|
536
|
+
var import_tamagui9 = require("tamagui");
|
|
537
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
538
|
+
var globalShowDialog = null;
|
|
539
|
+
function DialogProvider({ children }) {
|
|
540
|
+
const [state, setState] = (0, import_react2.useState)({
|
|
541
|
+
type: null,
|
|
542
|
+
title: "",
|
|
543
|
+
description: ""
|
|
544
|
+
});
|
|
545
|
+
(0, import_react2.useEffect)(() => {
|
|
546
|
+
globalShowDialog = (newState) => setState({ ...newState, resolve: newState.resolve });
|
|
547
|
+
return () => {
|
|
548
|
+
globalShowDialog = null;
|
|
549
|
+
};
|
|
550
|
+
}, []);
|
|
551
|
+
const handleClose = (confirmed) => {
|
|
552
|
+
if (!state.resolve) return;
|
|
553
|
+
const resolve = state.resolve;
|
|
554
|
+
setState({ type: null, title: "", description: "" });
|
|
555
|
+
resolve(confirmed);
|
|
556
|
+
};
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
558
|
+
children,
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
560
|
+
import_tamagui9.AlertDialog,
|
|
561
|
+
{
|
|
562
|
+
open: state.type !== null,
|
|
563
|
+
onOpenChange: (open) => {
|
|
564
|
+
if (!open && state.type !== null) handleClose(false);
|
|
565
|
+
},
|
|
566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_tamagui9.AlertDialog.Portal, { children: [
|
|
567
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
568
|
+
import_tamagui9.AlertDialog.Overlay,
|
|
569
|
+
{
|
|
570
|
+
opacity: 0.5,
|
|
571
|
+
enterStyle: { opacity: 0 },
|
|
572
|
+
exitStyle: { opacity: 0 }
|
|
573
|
+
},
|
|
574
|
+
"overlay"
|
|
575
|
+
),
|
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
577
|
+
import_tamagui9.AlertDialog.Content,
|
|
578
|
+
{
|
|
579
|
+
bordered: true,
|
|
580
|
+
elevate: true,
|
|
581
|
+
enterStyle: { x: 0, y: -20, opacity: 0, scale: 0.9 },
|
|
582
|
+
exitStyle: { x: 0, y: 10, opacity: 0, scale: 0.95 },
|
|
583
|
+
x: 0,
|
|
584
|
+
scale: 1,
|
|
585
|
+
opacity: 1,
|
|
586
|
+
y: 0,
|
|
587
|
+
width: "90%",
|
|
588
|
+
maxWidth: 400,
|
|
589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_tamagui9.YStack, { gap: "$4", children: [
|
|
590
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tamagui9.AlertDialog.Title, { size: "$6", children: state.title }),
|
|
591
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tamagui9.AlertDialog.Description, { size: "$3", color: "$color11", children: state.description }),
|
|
592
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tamagui9.XStack, { gap: "$3", justifyContent: "flex-end", children: state.type === "confirm" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tamagui9.Button, { onPress: () => handleClose(false), children: "Cancel" }),
|
|
594
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tamagui9.Button, { theme: "blue", onPress: () => handleClose(true), children: "Confirm" })
|
|
595
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_tamagui9.Button, { theme: "blue", onPress: () => handleClose(false), children: "OK" }) })
|
|
596
|
+
] })
|
|
597
|
+
},
|
|
598
|
+
"content"
|
|
599
|
+
)
|
|
600
|
+
] })
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
] });
|
|
604
|
+
}
|
|
605
|
+
var showError = (error, title = "Error") => {
|
|
606
|
+
let description = "An unexpected error occurred";
|
|
607
|
+
if (error instanceof Error) description = error.message;
|
|
608
|
+
else if (typeof error === "string") description = error;
|
|
609
|
+
else if (error && typeof error === "object" && "message" in error)
|
|
610
|
+
description = String(error.message);
|
|
611
|
+
if (globalShowDialog) globalShowDialog({ type: "error", title, description });
|
|
612
|
+
else console.error(`${title}: ${description}`);
|
|
613
|
+
};
|
|
614
|
+
var dialogConfirm = async (props) => {
|
|
615
|
+
const { title = "Confirm", description = "Are you sure?" } = props;
|
|
616
|
+
if (!globalShowDialog) {
|
|
617
|
+
console.error("DialogProvider not mounted");
|
|
618
|
+
return false;
|
|
619
|
+
}
|
|
620
|
+
return new Promise((resolve) => {
|
|
621
|
+
globalShowDialog({ type: "confirm", title, description, resolve });
|
|
622
|
+
});
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
// src/interface/Pressable.tsx
|
|
626
|
+
var import_tamagui10 = require("tamagui");
|
|
627
|
+
var Pressable = (0, import_tamagui10.styled)(import_tamagui10.View, {
|
|
628
|
+
name: "BlinkPressable",
|
|
629
|
+
hitSlop: 10,
|
|
630
|
+
pressStyle: { opacity: 0.5 }
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
// src/interface/Image.tsx
|
|
634
|
+
var import_tamagui11 = require("tamagui");
|
|
635
|
+
var Image2 = (0, import_tamagui11.styled)(import_tamagui11.Image, {
|
|
636
|
+
name: "BlinkImage"
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
// src/interface/Badge.tsx
|
|
640
|
+
var import_tamagui12 = require("tamagui");
|
|
641
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
642
|
+
var BadgeFrame = (0, import_tamagui12.styled)(import_tamagui12.View, {
|
|
643
|
+
name: "BlinkBadge",
|
|
644
|
+
paddingHorizontal: "$2",
|
|
645
|
+
paddingVertical: "$1",
|
|
646
|
+
borderRadius: "$10",
|
|
647
|
+
backgroundColor: "$color3",
|
|
648
|
+
alignSelf: "flex-start",
|
|
527
649
|
variants: {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
xxl: { width: 80, height: 80, borderRadius: 40 }
|
|
650
|
+
variant: {
|
|
651
|
+
default: { backgroundColor: "$color3" },
|
|
652
|
+
success: { backgroundColor: "$green3" },
|
|
653
|
+
warning: { backgroundColor: "$yellow3" },
|
|
654
|
+
error: { backgroundColor: "$red3" },
|
|
655
|
+
info: { backgroundColor: "$blue3" }
|
|
535
656
|
}
|
|
536
657
|
},
|
|
537
|
-
defaultVariants: {
|
|
538
|
-
size: "md"
|
|
539
|
-
}
|
|
658
|
+
defaultVariants: { variant: "default" }
|
|
540
659
|
});
|
|
541
|
-
var
|
|
542
|
-
name: "
|
|
543
|
-
|
|
660
|
+
var BadgeText = (0, import_tamagui12.styled)(import_tamagui12.SizableText, {
|
|
661
|
+
name: "BlinkBadgeText",
|
|
662
|
+
size: "$2",
|
|
544
663
|
fontWeight: "600",
|
|
545
|
-
color: "$
|
|
664
|
+
color: "$color11"
|
|
665
|
+
});
|
|
666
|
+
function Badge({ children, variant = "default" }) {
|
|
667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BadgeFrame, { variant, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BadgeText, { children }) });
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// src/interface/Icon.tsx
|
|
671
|
+
var import_tamagui13 = require("tamagui");
|
|
672
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
673
|
+
var ICONS = {
|
|
674
|
+
home: "\u2302",
|
|
675
|
+
search: "\u2315",
|
|
676
|
+
back: "\u2039",
|
|
677
|
+
forward: "\u203A",
|
|
678
|
+
close: "\u2715",
|
|
679
|
+
menu: "\u2630",
|
|
680
|
+
more: "\u22EF",
|
|
681
|
+
plus: "+",
|
|
682
|
+
minus: "\u2212",
|
|
683
|
+
check: "\u2713",
|
|
684
|
+
star: "\u2605",
|
|
685
|
+
starOutline: "\u2606",
|
|
686
|
+
heart: "\u2665",
|
|
687
|
+
heartOutline: "\u2661",
|
|
688
|
+
share: "\u2934",
|
|
689
|
+
edit: "\u270E",
|
|
690
|
+
trash: "\u232B",
|
|
691
|
+
copy: "\u2398",
|
|
692
|
+
chat: "\u{1F4AC}",
|
|
693
|
+
mail: "\u2709",
|
|
694
|
+
bell: "\u{1F514}",
|
|
695
|
+
bellOff: "\u{1F515}",
|
|
696
|
+
send: "\u27A4",
|
|
697
|
+
play: "\u25B6",
|
|
698
|
+
pause: "\u23F8",
|
|
699
|
+
camera: "\u{1F4F7}",
|
|
700
|
+
image: "\u{1F5BC}",
|
|
701
|
+
info: "\u2139",
|
|
702
|
+
warning: "\u26A0",
|
|
703
|
+
error: "\u2715",
|
|
704
|
+
success: "\u2713",
|
|
705
|
+
loading: "\u27F3",
|
|
706
|
+
user: "\u{1F464}",
|
|
707
|
+
users: "\u{1F465}",
|
|
708
|
+
settings: "\u2699",
|
|
709
|
+
lock: "\u{1F512}",
|
|
710
|
+
unlock: "\u{1F513}",
|
|
711
|
+
arrowUp: "\u2191",
|
|
712
|
+
arrowDown: "\u2193",
|
|
713
|
+
arrowLeft: "\u2190",
|
|
714
|
+
arrowRight: "\u2192",
|
|
715
|
+
chevronUp: "\u2303",
|
|
716
|
+
chevronDown: "\u2304",
|
|
717
|
+
chevronLeft: "\u2039",
|
|
718
|
+
chevronRight: "\u203A"
|
|
719
|
+
};
|
|
720
|
+
function Icon({ name, size = 20, color = "$color12" }) {
|
|
721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_tamagui13.SizableText, { fontSize: size, lineHeight: size, color, textAlign: "center", width: size, height: size, children: ICONS[name] });
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
// src/interface/BlinkAccordion.tsx
|
|
725
|
+
var import_react3 = require("react");
|
|
726
|
+
var import_tamagui14 = require("tamagui");
|
|
727
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
728
|
+
function BlinkAccordion({ items, defaultOpen, allowMultiple = false }) {
|
|
729
|
+
const [openIds, setOpenIds] = (0, import_react3.useState)(defaultOpen ?? []);
|
|
730
|
+
const toggle = (id) => {
|
|
731
|
+
setOpenIds((prev) => {
|
|
732
|
+
if (prev.includes(id)) return prev.filter((i) => i !== id);
|
|
733
|
+
return allowMultiple ? [...prev, id] : [id];
|
|
734
|
+
});
|
|
735
|
+
};
|
|
736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.YStack, { children: items.map((item, index) => {
|
|
737
|
+
const isOpen = openIds.includes(item.id);
|
|
738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_tamagui14.YStack, { children: [
|
|
739
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.Separator, { borderColor: "$borderColor" }),
|
|
740
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
741
|
+
import_tamagui14.XStack,
|
|
742
|
+
{
|
|
743
|
+
paddingVertical: "$3",
|
|
744
|
+
paddingHorizontal: "$2",
|
|
745
|
+
justifyContent: "space-between",
|
|
746
|
+
alignItems: "center",
|
|
747
|
+
pressStyle: { opacity: 0.7 },
|
|
748
|
+
onPress: () => toggle(item.id),
|
|
749
|
+
cursor: "pointer",
|
|
750
|
+
children: [
|
|
751
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.SizableText, { size: "$4", fontWeight: "600", children: item.title }),
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.SizableText, { size: "$3", color: "$color10", children: isOpen ? "\u2303" : "\u2304" })
|
|
753
|
+
]
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_tamagui14.YStack, { paddingHorizontal: "$2", paddingBottom: "$3", children: item.content })
|
|
757
|
+
] }, item.id);
|
|
758
|
+
}) });
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// src/interface/BlinkTabs.tsx
|
|
762
|
+
var import_react4 = require("react");
|
|
763
|
+
var import_react_native = require("react-native");
|
|
764
|
+
var import_tamagui15 = require("tamagui");
|
|
765
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
766
|
+
function BlinkTabs({ tabs, activeTab, onTabChange, variant = "underline" }) {
|
|
767
|
+
const [internalActive, setInternalActive] = (0, import_react4.useState)(tabs[0]?.key ?? "");
|
|
768
|
+
const current = activeTab ?? internalActive;
|
|
769
|
+
const handlePress = (key) => {
|
|
770
|
+
if (!activeTab) setInternalActive(key);
|
|
771
|
+
onTabChange?.(key);
|
|
772
|
+
};
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tamagui15.YStack, { children: /* @__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) => {
|
|
774
|
+
const isActive = tab.key === current;
|
|
775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
776
|
+
import_tamagui15.YStack,
|
|
777
|
+
{
|
|
778
|
+
paddingVertical: "$2",
|
|
779
|
+
paddingHorizontal: "$3",
|
|
780
|
+
borderRadius: variant === "pill" ? "$4" : "$0",
|
|
781
|
+
backgroundColor: variant === "pill" && isActive ? "$color9" : "transparent",
|
|
782
|
+
borderBottomWidth: variant === "underline" ? 2 : 0,
|
|
783
|
+
borderBottomColor: variant === "underline" && isActive ? "$color9" : "transparent",
|
|
784
|
+
pressStyle: { opacity: 0.7 },
|
|
785
|
+
onPress: () => handlePress(tab.key),
|
|
786
|
+
cursor: "pointer",
|
|
787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
788
|
+
import_tamagui15.SizableText,
|
|
789
|
+
{
|
|
790
|
+
size: "$3",
|
|
791
|
+
fontWeight: isActive ? "600" : "400",
|
|
792
|
+
color: variant === "pill" && isActive ? "$color1" : isActive ? "$color12" : "$color10",
|
|
793
|
+
children: tab.label
|
|
794
|
+
}
|
|
795
|
+
)
|
|
796
|
+
},
|
|
797
|
+
tab.key
|
|
798
|
+
);
|
|
799
|
+
}) }) }) });
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// src/interface/BlinkToggleGroup.tsx
|
|
803
|
+
var import_tamagui16 = require("tamagui");
|
|
804
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
805
|
+
var sizeMap = { sm: "$2", md: "$3", lg: "$4" };
|
|
806
|
+
function BlinkToggleGroup({ options, value, onValueChange, size = "md" }) {
|
|
807
|
+
const textSize = sizeMap[size];
|
|
808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tamagui16.XStack, { borderRadius: "$4", overflow: "hidden", backgroundColor: "$color2", children: options.map((option, index) => {
|
|
809
|
+
const isActive = option.value === value;
|
|
810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
811
|
+
import_tamagui16.XStack,
|
|
812
|
+
{
|
|
813
|
+
flex: 1,
|
|
814
|
+
justifyContent: "center",
|
|
815
|
+
alignItems: "center",
|
|
816
|
+
paddingVertical: "$2",
|
|
817
|
+
paddingHorizontal: "$3",
|
|
818
|
+
backgroundColor: isActive ? "$color9" : "$color2",
|
|
819
|
+
borderLeftWidth: index > 0 ? 1 : 0,
|
|
820
|
+
borderLeftColor: isActive ? "$color9" : "$color4",
|
|
821
|
+
pressStyle: { opacity: 0.7 },
|
|
822
|
+
onPress: () => onValueChange(option.value),
|
|
823
|
+
cursor: "pointer",
|
|
824
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tamagui16.SizableText, { size: textSize, fontWeight: isActive ? "600" : "400", color: isActive ? "$color1" : "$color11", children: option.label })
|
|
825
|
+
},
|
|
826
|
+
option.value
|
|
827
|
+
);
|
|
828
|
+
}) });
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
// src/interface/BlinkToast.tsx
|
|
832
|
+
var import_react5 = require("react");
|
|
833
|
+
var import_tamagui17 = require("tamagui");
|
|
834
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
835
|
+
var ToastContext = (0, import_react5.createContext)(null);
|
|
836
|
+
var variantStyles = {
|
|
837
|
+
default: { bg: "$color3", border: "$color6", icon: "\u2139" },
|
|
838
|
+
success: { bg: "$green2", border: "$green7", icon: "\u2713" },
|
|
839
|
+
error: { bg: "$red2", border: "$red7", icon: "\u2715" },
|
|
840
|
+
warning: { bg: "$yellow2", border: "$yellow7", icon: "!" }
|
|
841
|
+
};
|
|
842
|
+
var globalToastShow = null;
|
|
843
|
+
var toast = (title, options) => {
|
|
844
|
+
const opts = typeof options === "string" ? { variant: options } : options;
|
|
845
|
+
if (globalToastShow) globalToastShow(title, opts);
|
|
846
|
+
else console.warn("BlinkToastProvider not mounted");
|
|
847
|
+
};
|
|
848
|
+
function BlinkToastProvider({ children }) {
|
|
849
|
+
const [toasts, setToasts] = (0, import_react5.useState)([]);
|
|
850
|
+
const show = (0, import_react5.useCallback)((title, options) => {
|
|
851
|
+
const id = Math.random().toString(36).slice(2, 9);
|
|
852
|
+
const entry = {
|
|
853
|
+
id,
|
|
854
|
+
title,
|
|
855
|
+
message: options?.message,
|
|
856
|
+
variant: options?.variant ?? "default",
|
|
857
|
+
duration: options?.duration ?? 3e3
|
|
858
|
+
};
|
|
859
|
+
setToasts((prev) => [...prev, entry]);
|
|
860
|
+
setTimeout(() => setToasts((prev) => prev.filter((t) => t.id !== id)), entry.duration);
|
|
861
|
+
}, []);
|
|
862
|
+
(0, import_react5.useEffect)(() => {
|
|
863
|
+
globalToastShow = show;
|
|
864
|
+
return () => {
|
|
865
|
+
globalToastShow = null;
|
|
866
|
+
};
|
|
867
|
+
}, [show]);
|
|
868
|
+
const dismiss = (0, import_react5.useCallback)((id) => {
|
|
869
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
870
|
+
}, []);
|
|
871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ToastContext.Provider, { value: { show }, children: [
|
|
872
|
+
children,
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
874
|
+
import_tamagui17.YStack,
|
|
875
|
+
{
|
|
876
|
+
position: "absolute",
|
|
877
|
+
top: 50,
|
|
878
|
+
left: 0,
|
|
879
|
+
right: 0,
|
|
880
|
+
alignItems: "center",
|
|
881
|
+
gap: "$2",
|
|
882
|
+
pointerEvents: "box-none",
|
|
883
|
+
zIndex: 1e5,
|
|
884
|
+
paddingHorizontal: "$4",
|
|
885
|
+
children: toasts.map((t) => {
|
|
886
|
+
const style = variantStyles[t.variant ?? "default"];
|
|
887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
888
|
+
import_tamagui17.XStack,
|
|
889
|
+
{
|
|
890
|
+
width: "100%",
|
|
891
|
+
maxWidth: 400,
|
|
892
|
+
backgroundColor: style.bg,
|
|
893
|
+
borderWidth: 1,
|
|
894
|
+
borderColor: style.border,
|
|
895
|
+
borderRadius: "$4",
|
|
896
|
+
paddingHorizontal: "$4",
|
|
897
|
+
paddingVertical: "$3",
|
|
898
|
+
gap: "$3",
|
|
899
|
+
alignItems: "flex-start",
|
|
900
|
+
enterStyle: { opacity: 0, y: -20, scale: 0.95 },
|
|
901
|
+
exitStyle: { opacity: 0, y: -20, scale: 0.95 },
|
|
902
|
+
opacity: 1,
|
|
903
|
+
y: 0,
|
|
904
|
+
scale: 1,
|
|
905
|
+
animation: "quick",
|
|
906
|
+
pointerEvents: "auto",
|
|
907
|
+
elevation: 4,
|
|
908
|
+
children: [
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$4", fontWeight: "700", marginTop: "$0.5", children: style.icon }),
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_tamagui17.YStack, { flex: 1, gap: "$1", children: [
|
|
911
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$4", fontWeight: "600", color: "$color12", children: t.title }),
|
|
912
|
+
t.message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$3", color: "$color10", children: t.message })
|
|
913
|
+
] }),
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
915
|
+
import_tamagui17.SizableText,
|
|
916
|
+
{
|
|
917
|
+
size: "$3",
|
|
918
|
+
color: "$color8",
|
|
919
|
+
fontWeight: "600",
|
|
920
|
+
pressStyle: { opacity: 0.5 },
|
|
921
|
+
onPress: () => dismiss(t.id),
|
|
922
|
+
cursor: "pointer",
|
|
923
|
+
marginTop: "$0.5",
|
|
924
|
+
children: "\u2715"
|
|
925
|
+
}
|
|
926
|
+
)
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
t.id
|
|
930
|
+
);
|
|
931
|
+
})
|
|
932
|
+
}
|
|
933
|
+
)
|
|
934
|
+
] });
|
|
935
|
+
}
|
|
936
|
+
function useBlinkToast() {
|
|
937
|
+
const ctx = (0, import_react5.useContext)(ToastContext);
|
|
938
|
+
if (!ctx) throw new Error("useBlinkToast must be used within BlinkToastProvider");
|
|
939
|
+
return ctx;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// src/interface/FormField.tsx
|
|
943
|
+
var import_tamagui18 = require("tamagui");
|
|
944
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
945
|
+
function FormField({ label, error, helperText, required, children }) {
|
|
946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_tamagui18.YStack, { gap: "$1.5", children: [
|
|
947
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_tamagui18.SizableText, { size: "$3", fontWeight: "600", color: "$color11", children: [
|
|
948
|
+
label,
|
|
949
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui18.SizableText, { color: "$red9", children: " *" })
|
|
950
|
+
] }),
|
|
951
|
+
children,
|
|
952
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui18.SizableText, { size: "$2", color: "$color9", children: helperText }),
|
|
953
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tamagui18.SizableText, { size: "$2", color: "$red9", children: error })
|
|
954
|
+
] });
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// src/interface/Tooltip.tsx
|
|
958
|
+
var import_tamagui19 = require("tamagui");
|
|
959
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
960
|
+
function BlinkTooltip({ content, children, side = "top" }) {
|
|
961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_tamagui19.Popover, { size: "$2", placement: side, children: [
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tamagui19.Popover.Trigger, { asChild: true, children }),
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
964
|
+
import_tamagui19.Popover.Content,
|
|
965
|
+
{
|
|
966
|
+
backgroundColor: "$color11",
|
|
967
|
+
borderRadius: "$2",
|
|
968
|
+
paddingHorizontal: "$2.5",
|
|
969
|
+
paddingVertical: "$1.5",
|
|
970
|
+
elevate: true,
|
|
971
|
+
enterStyle: { opacity: 0, y: side === "bottom" ? -4 : 4 },
|
|
972
|
+
exitStyle: { opacity: 0, y: side === "bottom" ? -4 : 4 },
|
|
973
|
+
opacity: 1,
|
|
974
|
+
y: 0,
|
|
975
|
+
animation: "quick",
|
|
976
|
+
children: [
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tamagui19.Popover.Arrow, { backgroundColor: "$color11", size: "$1" }),
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tamagui19.SizableText, { size: "$2", color: "$color1", children: content })
|
|
979
|
+
]
|
|
980
|
+
}
|
|
981
|
+
)
|
|
982
|
+
] });
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
// src/layouts/StepPageLayout.tsx
|
|
986
|
+
var import_tamagui20 = require("tamagui");
|
|
987
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
988
|
+
function StepPageLayout({ title, description, children, bottom }) {
|
|
989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_tamagui20.YStack, { flex: 1, padding: "$4", maxWidth: 500, marginHorizontal: "auto", width: "100%", children: [
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.YStack, { gap: "$5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_tamagui20.YStack, { gap: "$2", children: [
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.SizableText, { size: "$8", fontWeight: "700", children: title }),
|
|
992
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.SizableText, { size: "$5", fontWeight: "400", color: "$color10", children: description })
|
|
993
|
+
] }) }),
|
|
994
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.YStack, { paddingTop: "$5", gap: "$4", children }),
|
|
995
|
+
bottom && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tamagui20.YStack, { paddingTop: "$4", children: bottom })
|
|
996
|
+
] });
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// src/layouts/ScreenLayout.tsx
|
|
1000
|
+
var import_tamagui21 = require("tamagui");
|
|
1001
|
+
var ScreenLayout = (0, import_tamagui21.styled)(import_tamagui21.YStack, {
|
|
1002
|
+
name: "BlinkScreenLayout",
|
|
1003
|
+
flex: 1,
|
|
1004
|
+
backgroundColor: "$background",
|
|
546
1005
|
variants: {
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
1006
|
+
padded: {
|
|
1007
|
+
true: { padding: "$4" }
|
|
1008
|
+
},
|
|
1009
|
+
centered: {
|
|
1010
|
+
true: { alignItems: "center", justifyContent: "center" }
|
|
1011
|
+
},
|
|
1012
|
+
safe: {
|
|
1013
|
+
true: { paddingTop: "$6" }
|
|
554
1014
|
}
|
|
555
|
-
},
|
|
556
|
-
defaultVariants: {
|
|
557
|
-
size: "md"
|
|
558
1015
|
}
|
|
559
1016
|
});
|
|
560
|
-
|
|
561
|
-
|
|
1017
|
+
|
|
1018
|
+
// src/layouts/Section.tsx
|
|
1019
|
+
var import_tamagui22 = require("tamagui");
|
|
1020
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1021
|
+
function Section({ title, description, children, gap = "$3" }) {
|
|
1022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_tamagui22.YStack, { gap, children: [
|
|
1023
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_tamagui22.YStack, { gap: "$1", children: [
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tamagui22.SizableText, { size: "$5", fontWeight: "600", color: "$color12", children: title }),
|
|
1025
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tamagui22.SizableText, { size: "$3", color: "$color9", children: description })
|
|
1026
|
+
] }),
|
|
1027
|
+
children
|
|
1028
|
+
] });
|
|
562
1029
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
1030
|
+
|
|
1031
|
+
// src/layouts/ListItem.tsx
|
|
1032
|
+
var import_tamagui23 = require("tamagui");
|
|
1033
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1034
|
+
var ListItemFrame = (0, import_tamagui23.styled)(import_tamagui23.XStack, {
|
|
1035
|
+
name: "BlinkListItem",
|
|
1036
|
+
alignItems: "center",
|
|
1037
|
+
gap: "$3",
|
|
1038
|
+
padding: "$3",
|
|
1039
|
+
borderRadius: "$3",
|
|
1040
|
+
variants: {
|
|
1041
|
+
pressable: {
|
|
1042
|
+
true: {
|
|
1043
|
+
cursor: "pointer",
|
|
1044
|
+
hoverStyle: { backgroundColor: "$color2" },
|
|
1045
|
+
pressStyle: { backgroundColor: "$color3", opacity: 0.9 }
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
function ListItem({ icon, title, subtitle, right, onPress }) {
|
|
1051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ListItemFrame, { pressable: !!onPress, onPress, children: [
|
|
1052
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tamagui23.View, { children: icon }),
|
|
1053
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_tamagui23.YStack, { flex: 1, gap: "$1", children: [
|
|
1054
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tamagui23.SizableText, { size: "$4", fontWeight: "500", color: "$color12", children: title }),
|
|
1055
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tamagui23.SizableText, { size: "$2", color: "$color9", children: subtitle })
|
|
1056
|
+
] }),
|
|
1057
|
+
right
|
|
1058
|
+
] });
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
// src/layouts/Divider.tsx
|
|
1062
|
+
var import_tamagui24 = require("tamagui");
|
|
1063
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1064
|
+
function Divider({ label }) {
|
|
1065
|
+
if (!label) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.Separator, { borderColor: "$color4" });
|
|
1066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_tamagui24.XStack, { alignItems: "center", gap: "$3", children: [
|
|
1067
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.Separator, { flex: 1, borderColor: "$color4" }),
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.SizableText, { size: "$2", color: "$color9", children: label }),
|
|
1069
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_tamagui24.Separator, { flex: 1, borderColor: "$color4" })
|
|
1070
|
+
] });
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
// src/layouts/KeyboardStickyFooter.tsx
|
|
1074
|
+
var import_tamagui25 = require("tamagui");
|
|
1075
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1076
|
+
function KeyboardStickyFooter({ children, offset }) {
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_tamagui25.YStack, { maxWidth: 500, alignSelf: "center", paddingTop: "$8", paddingBottom: "$4", style: { paddingBottom: offset }, children });
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
// src/layouts/SafeArea.tsx
|
|
1081
|
+
var import_tamagui26 = require("tamagui");
|
|
1082
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1083
|
+
function SafeArea({ children, edges = ["top", "bottom"] }) {
|
|
1084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1085
|
+
import_tamagui26.YStack,
|
|
1086
|
+
{
|
|
1087
|
+
flex: 1,
|
|
1088
|
+
backgroundColor: "$background",
|
|
1089
|
+
paddingTop: edges.includes("top") ? "$6" : void 0,
|
|
1090
|
+
paddingBottom: edges.includes("bottom") ? "$6" : void 0,
|
|
1091
|
+
paddingLeft: edges.includes("left") ? "$4" : void 0,
|
|
1092
|
+
paddingRight: edges.includes("right") ? "$4" : void 0,
|
|
1093
|
+
children
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
// src/layouts/Grid.tsx
|
|
1099
|
+
var import_react6 = require("react");
|
|
1100
|
+
var import_tamagui27 = require("tamagui");
|
|
1101
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1102
|
+
function Grid({ children, columns = 2, gap = "$3" }) {
|
|
1103
|
+
const items = import_react6.Children.toArray(children);
|
|
1104
|
+
const rows = [];
|
|
1105
|
+
for (let i = 0; i < items.length; i += columns) {
|
|
1106
|
+
rows.push(items.slice(i, i + columns));
|
|
1107
|
+
}
|
|
1108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { gap, children: rows.map((row, ri) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_tamagui27.XStack, { gap, children: [
|
|
1109
|
+
row.map((item, ci) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { flex: 1, children: item }, ci)),
|
|
1110
|
+
row.length < columns && Array.from({ length: columns - row.length }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { flex: 1 }, `pad-${i}`))
|
|
1111
|
+
] }, ri)) });
|
|
1112
|
+
}
|
|
1113
|
+
function Container({ children, maxWidth = 500, centered = true, padding = "$4" }) {
|
|
1114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: "100%", maxWidth, alignSelf: centered ? "center" : void 0, padding, children });
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
// src/patterns/PaywallScreen.tsx
|
|
1118
|
+
var import_tamagui28 = require("tamagui");
|
|
1119
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1120
|
+
function PaywallScreen({
|
|
1121
|
+
title = "Upgrade Your Experience",
|
|
1122
|
+
subtitle = "Choose the plan that works for you",
|
|
1123
|
+
plans,
|
|
1124
|
+
selectedPlan,
|
|
1125
|
+
onSelectPlan,
|
|
1126
|
+
onContinue,
|
|
1127
|
+
onRestore,
|
|
1128
|
+
continueLabel = "Continue"
|
|
1129
|
+
}) {
|
|
1130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { flex: 1, padding: "$4", gap: "$5", backgroundColor: "$background", children: [
|
|
1131
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { gap: "$2", paddingTop: "$6", children: [
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$9", fontWeight: "700", textAlign: "center", children: title }),
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$4", color: "$color10", textAlign: "center", children: subtitle })
|
|
1134
|
+
] }),
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.YStack, { gap: "$3", flex: 1, children: plans.map((plan) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1136
|
+
import_tamagui28.YStack,
|
|
567
1137
|
{
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
1138
|
+
padding: "$4",
|
|
1139
|
+
borderRadius: "$5",
|
|
1140
|
+
borderWidth: 2,
|
|
1141
|
+
borderColor: selectedPlan === plan.id ? "$color9" : "$color4",
|
|
1142
|
+
backgroundColor: selectedPlan === plan.id ? "$color2" : "$color1",
|
|
1143
|
+
pressStyle: { scale: 0.98 },
|
|
1144
|
+
onPress: () => onSelectPlan?.(plan.id),
|
|
1145
|
+
cursor: "pointer",
|
|
1146
|
+
children: [
|
|
1147
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.XStack, { justifyContent: "space-between", alignItems: "center", children: [
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { children: [
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$5", fontWeight: "600", children: plan.name }),
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.XStack, { alignItems: "baseline", gap: "$1", children: [
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$8", fontWeight: "700", children: plan.price }),
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.SizableText, { size: "$3", color: "$color9", children: [
|
|
1153
|
+
"/",
|
|
1154
|
+
plan.period
|
|
1155
|
+
] })
|
|
1156
|
+
] })
|
|
1157
|
+
] }),
|
|
1158
|
+
plan.popular && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.YStack, { backgroundColor: "$color9", paddingHorizontal: "$2", paddingVertical: "$1", borderRadius: "$10", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$1", color: "$color1", fontWeight: "600", children: "POPULAR" }) })
|
|
1159
|
+
] }),
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.YStack, { gap: "$2", paddingTop: "$3", children: plan.features.map((feature, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.XStack, { gap: "$2", alignItems: "center", children: [
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.Circle, { size: 6, backgroundColor: "$green9" }),
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$3", color: "$color11", children: feature })
|
|
1163
|
+
] }, i)) })
|
|
1164
|
+
]
|
|
1165
|
+
},
|
|
1166
|
+
plan.id
|
|
1167
|
+
)) }),
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_tamagui28.YStack, { gap: "$3", paddingBottom: "$4", children: [
|
|
1169
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1170
|
+
import_tamagui28.Button,
|
|
1171
|
+
{
|
|
1172
|
+
size: "$5",
|
|
1173
|
+
backgroundColor: "$color9",
|
|
1174
|
+
color: "$color1",
|
|
1175
|
+
onPress: onContinue,
|
|
1176
|
+
hoverStyle: { backgroundColor: "$color10" },
|
|
1177
|
+
pressStyle: { backgroundColor: "$color8" },
|
|
1178
|
+
borderRadius: "$5",
|
|
1179
|
+
children: continueLabel
|
|
1180
|
+
}
|
|
1181
|
+
),
|
|
1182
|
+
onRestore && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.Button, { size: "$3", chromeless: true, onPress: onRestore, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_tamagui28.SizableText, { size: "$3", color: "$color9", children: "Restore Purchases" }) })
|
|
1183
|
+
] })
|
|
1184
|
+
] });
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
// src/patterns/OnboardingCarousel.tsx
|
|
1188
|
+
var import_react7 = require("react");
|
|
1189
|
+
var import_tamagui29 = require("tamagui");
|
|
1190
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1191
|
+
function OnboardingCarousel({
|
|
1192
|
+
steps,
|
|
1193
|
+
onComplete,
|
|
1194
|
+
onSkip,
|
|
1195
|
+
completeLabel = "Get Started",
|
|
1196
|
+
skipLabel = "Skip",
|
|
1197
|
+
nextLabel = "Next"
|
|
1198
|
+
}) {
|
|
1199
|
+
const [current, setCurrent] = (0, import_react7.useState)(0);
|
|
1200
|
+
const isLast = current === steps.length - 1;
|
|
1201
|
+
const step = steps[current];
|
|
1202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { flex: 1, backgroundColor: "$background", padding: "$4", justifyContent: "space-between", children: [
|
|
1203
|
+
/* @__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 }) }) }),
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { flex: 1, alignItems: "center", justifyContent: "center", gap: "$5", paddingHorizontal: "$4", children: [
|
|
1205
|
+
step?.icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.Circle, { size: 120, backgroundColor: "$color2", alignItems: "center", justifyContent: "center", children: step.icon }),
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { gap: "$3", alignItems: "center", children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.SizableText, { size: "$9", fontWeight: "700", textAlign: "center", children: step?.title }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.SizableText, { size: "$4", color: "$color10", textAlign: "center", maxWidth: 300, children: step?.description })
|
|
1209
|
+
] })
|
|
1210
|
+
] }),
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { gap: "$3", paddingBottom: "$2", children: [
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_tamagui29.XStack, { justifyContent: "center", gap: "$2", children: steps.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1213
|
+
import_tamagui29.Circle,
|
|
1214
|
+
{
|
|
1215
|
+
size: 8,
|
|
1216
|
+
backgroundColor: i === current ? "$color9" : "$color4",
|
|
1217
|
+
animation: "quick"
|
|
1218
|
+
},
|
|
1219
|
+
i
|
|
1220
|
+
)) }),
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1222
|
+
import_tamagui29.Button,
|
|
1223
|
+
{
|
|
1224
|
+
size: "$5",
|
|
1225
|
+
backgroundColor: "$color9",
|
|
1226
|
+
color: "$color1",
|
|
1227
|
+
borderRadius: "$5",
|
|
1228
|
+
hoverStyle: { backgroundColor: "$color10" },
|
|
1229
|
+
pressStyle: { backgroundColor: "$color8" },
|
|
1230
|
+
onPress: () => isLast ? onComplete?.() : setCurrent((c) => c + 1),
|
|
1231
|
+
children: isLast ? completeLabel : nextLabel
|
|
1232
|
+
}
|
|
1233
|
+
)
|
|
1234
|
+
] })
|
|
1235
|
+
] });
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
// src/patterns/ChatBubble.tsx
|
|
1239
|
+
var import_tamagui30 = require("tamagui");
|
|
1240
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1241
|
+
function ChatBubble({ message, showAvatar = true }) {
|
|
1242
|
+
const isUser = message.sender === "user";
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1244
|
+
import_tamagui30.XStack,
|
|
1245
|
+
{
|
|
1246
|
+
alignSelf: isUser ? "flex-end" : "flex-start",
|
|
1247
|
+
maxWidth: "75%",
|
|
1248
|
+
gap: "$2",
|
|
1249
|
+
flexDirection: isUser ? "row-reverse" : "row",
|
|
1250
|
+
children: [
|
|
1251
|
+
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() ?? "?" }) }),
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1253
|
+
import_tamagui30.YStack,
|
|
1254
|
+
{
|
|
1255
|
+
backgroundColor: isUser ? "$color9" : "$color3",
|
|
1256
|
+
paddingHorizontal: "$3",
|
|
1257
|
+
paddingVertical: "$2.5",
|
|
1258
|
+
borderRadius: "$5",
|
|
1259
|
+
borderBottomRightRadius: isUser ? "$2" : "$5",
|
|
1260
|
+
borderBottomLeftRadius: isUser ? "$5" : "$2",
|
|
1261
|
+
gap: "$1",
|
|
1262
|
+
children: [
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.SizableText, { size: "$3", color: isUser ? "$color1" : "$color12", children: message.text }),
|
|
1264
|
+
message.timestamp && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_tamagui30.SizableText, { size: "$1", color: isUser ? "$color3" : "$color9", alignSelf: "flex-end", children: message.timestamp })
|
|
1265
|
+
]
|
|
1266
|
+
}
|
|
1267
|
+
)
|
|
1268
|
+
]
|
|
1269
|
+
}
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// src/patterns/SettingsScreen.tsx
|
|
1274
|
+
var import_tamagui31 = require("tamagui");
|
|
1275
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1276
|
+
function SettingsItemRow({ item }) {
|
|
1277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1278
|
+
import_tamagui31.XStack,
|
|
1279
|
+
{
|
|
1280
|
+
alignItems: "center",
|
|
1281
|
+
gap: "$3",
|
|
1282
|
+
paddingVertical: "$3",
|
|
1283
|
+
paddingHorizontal: "$4",
|
|
1284
|
+
hoverStyle: item.onPress ? { backgroundColor: "$color2" } : void 0,
|
|
1285
|
+
pressStyle: item.onPress ? { backgroundColor: "$color3" } : void 0,
|
|
1286
|
+
onPress: item.onPress,
|
|
1287
|
+
cursor: item.onPress ? "pointer" : void 0,
|
|
1288
|
+
children: [
|
|
1289
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.YStack, { width: 24, alignItems: "center", children: item.icon }),
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_tamagui31.YStack, { flex: 1, gap: "$1", children: [
|
|
1291
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.SizableText, { size: "$4", fontWeight: "500", children: item.title }),
|
|
1292
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.SizableText, { size: "$2", color: "$color9", children: item.subtitle })
|
|
1293
|
+
] }),
|
|
1294
|
+
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" })
|
|
1295
|
+
]
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
function SettingsScreen({ sections, header }) {
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_tamagui31.YStack, { flex: 1, backgroundColor: "$background", children: [
|
|
1301
|
+
header,
|
|
1302
|
+
/* @__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: [
|
|
1303
|
+
section.title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1304
|
+
import_tamagui31.SizableText,
|
|
1305
|
+
{
|
|
1306
|
+
size: "$2",
|
|
1307
|
+
fontWeight: "600",
|
|
1308
|
+
color: "$color9",
|
|
1309
|
+
paddingHorizontal: "$4",
|
|
1310
|
+
paddingBottom: "$2",
|
|
1311
|
+
textTransform: "uppercase",
|
|
1312
|
+
children: section.title
|
|
1313
|
+
}
|
|
1314
|
+
),
|
|
1315
|
+
/* @__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: [
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SettingsItemRow, { item }),
|
|
1317
|
+
ii < section.items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_tamagui31.Separator, { borderColor: "$color3", marginLeft: "$12" })
|
|
1318
|
+
] }, item.id)) })
|
|
1319
|
+
] }, si)) })
|
|
1320
|
+
] });
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
// src/patterns/EmptyState.tsx
|
|
1324
|
+
var import_tamagui32 = require("tamagui");
|
|
1325
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1326
|
+
function EmptyState({ icon, title, description, actionLabel, onAction }) {
|
|
1327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_tamagui32.YStack, { flex: 1, alignItems: "center", justifyContent: "center", gap: "$4", padding: "$6", children: [
|
|
1328
|
+
icon,
|
|
1329
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_tamagui32.YStack, { gap: "$2", alignItems: "center", children: [
|
|
1330
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_tamagui32.SizableText, { size: "$6", fontWeight: "600", textAlign: "center", children: title }),
|
|
1331
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_tamagui32.SizableText, { size: "$4", color: "$color9", textAlign: "center", maxWidth: 280, children: description })
|
|
1332
|
+
] }),
|
|
1333
|
+
actionLabel && onAction && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1334
|
+
import_tamagui32.Button,
|
|
1335
|
+
{
|
|
1336
|
+
size: "$4",
|
|
1337
|
+
backgroundColor: "$color9",
|
|
1338
|
+
color: "$color1",
|
|
1339
|
+
borderRadius: "$4",
|
|
1340
|
+
hoverStyle: { backgroundColor: "$color10" },
|
|
1341
|
+
pressStyle: { backgroundColor: "$color8" },
|
|
1342
|
+
onPress: onAction,
|
|
1343
|
+
children: actionLabel
|
|
571
1344
|
}
|
|
572
|
-
)
|
|
1345
|
+
)
|
|
1346
|
+
] });
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
// src/patterns/ProfileHeader.tsx
|
|
1350
|
+
var import_tamagui33 = require("tamagui");
|
|
1351
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1352
|
+
function ProfileHeader({ name, subtitle, avatar, stats, actions }) {
|
|
1353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_tamagui33.YStack, { alignItems: "center", gap: "$4", paddingVertical: "$6", paddingHorizontal: "$4", children: [
|
|
1354
|
+
/* @__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() ?? "?" }) }),
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_tamagui33.YStack, { alignItems: "center", gap: "$1", children: [
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$7", fontWeight: "700", children: name }),
|
|
1357
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$4", color: "$color10", children: subtitle })
|
|
1358
|
+
] }),
|
|
1359
|
+
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: [
|
|
1360
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$6", fontWeight: "700", children: stat.value }),
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_tamagui33.SizableText, { size: "$2", color: "$color9", children: stat.label })
|
|
1362
|
+
] }, i)) }),
|
|
1363
|
+
actions
|
|
1364
|
+
] });
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
// src/patterns/AppHeader.tsx
|
|
1368
|
+
var import_tamagui34 = require("tamagui");
|
|
1369
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1370
|
+
function AppHeader({ title, subtitle, variant = "simple", onBack, avatar, left, right, transparent, borderless }) {
|
|
1371
|
+
const leftContent = (() => {
|
|
1372
|
+
if (variant === "back") return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_tamagui34.SizableText, { size: "$6", paddingRight: "$2", onPress: onBack, pressStyle: { opacity: 0.6 }, cursor: "pointer", children: "\u2039" });
|
|
1373
|
+
if (variant === "profile") return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Avatar, { uri: avatar, name: title, size: "sm" });
|
|
1374
|
+
if (variant === "centered") return left ?? null;
|
|
1375
|
+
return null;
|
|
1376
|
+
})();
|
|
1377
|
+
const rightContent = variant === "profile" || variant === "centered" ? right ?? null : null;
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1379
|
+
import_tamagui34.YStack,
|
|
1380
|
+
{
|
|
1381
|
+
paddingTop: "$6",
|
|
1382
|
+
backgroundColor: transparent ? "transparent" : "$background",
|
|
1383
|
+
borderBottomWidth: borderless ? 0 : 1,
|
|
1384
|
+
borderBottomColor: "$borderColor",
|
|
1385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_tamagui34.XStack, { height: 56, alignItems: "center", paddingHorizontal: "$4", gap: "$3", children: [
|
|
1386
|
+
leftContent,
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_tamagui34.YStack, { flex: 1, alignItems: variant === "centered" ? "center" : "flex-start", children: [
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_tamagui34.SizableText, { size: "$6", fontWeight: "700", numberOfLines: 1, children: title }),
|
|
1389
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_tamagui34.SizableText, { size: "$2", color: "$color9", numberOfLines: 1, children: subtitle })
|
|
1390
|
+
] }),
|
|
1391
|
+
rightContent
|
|
1392
|
+
] })
|
|
1393
|
+
}
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
// src/patterns/BottomSheet.tsx
|
|
1398
|
+
var import_tamagui35 = require("tamagui");
|
|
1399
|
+
var import_react_native2 = require("react-native");
|
|
1400
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1401
|
+
function BottomSheet({ open, onOpenChange, title, children, snapPoints = [85], dismissOnSnapToBottom = true, showHandle = true, showClose = false, zIndex = 1e5 }) {
|
|
1402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1403
|
+
import_tamagui35.Sheet,
|
|
1404
|
+
{
|
|
1405
|
+
modal: true,
|
|
1406
|
+
forceRemoveScrollEnabled: open,
|
|
1407
|
+
open,
|
|
1408
|
+
onOpenChange,
|
|
1409
|
+
snapPoints,
|
|
1410
|
+
dismissOnSnapToBottom,
|
|
1411
|
+
zIndex,
|
|
1412
|
+
animation: "medium",
|
|
1413
|
+
children: [
|
|
1414
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.Sheet.Overlay, { animation: "lazy", enterStyle: { opacity: 0 }, exitStyle: { opacity: 0 } }),
|
|
1415
|
+
showHandle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.Sheet.Handle, {}),
|
|
1416
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_tamagui35.Sheet.Frame, { children: [
|
|
1417
|
+
(title || showClose) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_tamagui35.XStack, { paddingHorizontal: "$4", paddingTop: "$3", paddingBottom: "$2", alignItems: "center", justifyContent: "space-between", children: [
|
|
1418
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.SizableText, { size: "$6", fontWeight: "600", flexShrink: 1, children: title }),
|
|
1419
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1420
|
+
import_tamagui35.XStack,
|
|
1421
|
+
{
|
|
1422
|
+
width: 28,
|
|
1423
|
+
height: 28,
|
|
1424
|
+
borderRadius: "$10",
|
|
1425
|
+
backgroundColor: "$color4",
|
|
1426
|
+
alignItems: "center",
|
|
1427
|
+
justifyContent: "center",
|
|
1428
|
+
pressStyle: { opacity: 0.7 },
|
|
1429
|
+
onPress: () => onOpenChange(false),
|
|
1430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_tamagui35.SizableText, { size: "$3", color: "$color10", fontWeight: "600", children: "\u2715" })
|
|
1431
|
+
}
|
|
1432
|
+
)
|
|
1433
|
+
] }),
|
|
1434
|
+
/* @__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 }) })
|
|
1435
|
+
] })
|
|
1436
|
+
]
|
|
1437
|
+
}
|
|
1438
|
+
);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
// src/patterns/LoginScreen.tsx
|
|
1442
|
+
var import_react8 = require("react");
|
|
1443
|
+
var import_tamagui36 = require("tamagui");
|
|
1444
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1445
|
+
function LoginScreen({ title = "Welcome", subtitle = "Sign in to continue", logo, providers = [], onProviderPress, showEmailForm, onEmailSubmit, onForgotPassword, onCreateAccount, onTerms, onPrivacy, loading }) {
|
|
1446
|
+
const [email, setEmail] = (0, import_react8.useState)("");
|
|
1447
|
+
const [password, setPassword] = (0, import_react8.useState)("");
|
|
1448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { flex: 1, padding: "$4", gap: "$5", backgroundColor: "$background", justifyContent: "center", children: [
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { alignItems: "center", gap: "$2", children: [
|
|
1450
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.YStack, { paddingBottom: "$3", children: logo }),
|
|
1451
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$9", fontWeight: "700", textAlign: "center", children: title }),
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$4", color: "$color10", textAlign: "center", children: subtitle })
|
|
1453
|
+
] }),
|
|
1454
|
+
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)(
|
|
1455
|
+
import_tamagui36.Button,
|
|
1456
|
+
{
|
|
1457
|
+
size: "$5",
|
|
1458
|
+
borderWidth: 1.5,
|
|
1459
|
+
borderColor: "$color5",
|
|
1460
|
+
backgroundColor: "$color1",
|
|
1461
|
+
borderRadius: "$4",
|
|
1462
|
+
disabled: loading,
|
|
1463
|
+
onPress: () => onProviderPress?.(p.id),
|
|
1464
|
+
hoverStyle: { backgroundColor: "$color2" },
|
|
1465
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.XStack, { alignItems: "center", gap: "$2", children: [
|
|
1467
|
+
p.icon,
|
|
1468
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$4", fontWeight: "500", children: p.name })
|
|
1469
|
+
] })
|
|
1470
|
+
},
|
|
1471
|
+
p.id
|
|
1472
|
+
)) }),
|
|
1473
|
+
showEmailForm && providers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Divider, { label: "or" }),
|
|
1474
|
+
showEmailForm && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { gap: "$3", children: [
|
|
1475
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Input, { label: "Email", placeholder: "your@email.com", value: email, onChangeText: setEmail, keyboardType: "email-address", autoCapitalize: "none" }),
|
|
1476
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Input, { label: "Password", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", value: password, onChangeText: setPassword, secureTextEntry: true }),
|
|
1477
|
+
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?" }) }),
|
|
1478
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1479
|
+
import_tamagui36.Button,
|
|
1480
|
+
{
|
|
1481
|
+
size: "$5",
|
|
1482
|
+
backgroundColor: "$color9",
|
|
1483
|
+
color: "$color1",
|
|
1484
|
+
borderRadius: "$5",
|
|
1485
|
+
disabled: loading,
|
|
1486
|
+
onPress: () => onEmailSubmit?.(email, password),
|
|
1487
|
+
hoverStyle: { backgroundColor: "$color10" },
|
|
1488
|
+
pressStyle: { backgroundColor: "$color8" },
|
|
1489
|
+
icon: loading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.Spinner, { size: "small", color: "$color1" }) : void 0,
|
|
1490
|
+
children: "Sign In"
|
|
1491
|
+
}
|
|
1492
|
+
),
|
|
1493
|
+
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" }) })
|
|
1494
|
+
] }),
|
|
1495
|
+
(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: [
|
|
1496
|
+
"By continuing you agree to our",
|
|
1497
|
+
" ",
|
|
1498
|
+
onTerms && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$2", color: "$color9", onPress: onTerms, children: "Terms of Service" }),
|
|
1499
|
+
onTerms && onPrivacy && " & ",
|
|
1500
|
+
onPrivacy && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.SizableText, { size: "$2", color: "$color9", onPress: onPrivacy, children: "Privacy Policy" })
|
|
1501
|
+
] }) })
|
|
1502
|
+
] });
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
// src/patterns/TabBar.tsx
|
|
1506
|
+
var import_tamagui37 = require("tamagui");
|
|
1507
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1508
|
+
function TabBar({ tabs, activeTab, onTabPress, showLabels = true }) {
|
|
1509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_tamagui37.XStack, { height: 56, borderTopWidth: 1, borderTopColor: "$borderColor", backgroundColor: "$background", paddingBottom: "$2", children: tabs.map((tab) => {
|
|
1510
|
+
const active = tab.id === activeTab;
|
|
1511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1512
|
+
import_tamagui37.YStack,
|
|
1513
|
+
{
|
|
1514
|
+
flex: 1,
|
|
1515
|
+
alignItems: "center",
|
|
1516
|
+
justifyContent: "center",
|
|
1517
|
+
gap: "$1",
|
|
1518
|
+
pressStyle: { opacity: 0.6 },
|
|
1519
|
+
onPress: () => onTabPress(tab.id),
|
|
1520
|
+
children: [
|
|
1521
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_tamagui37.SizableText, { size: "$5", color: active ? "$color9" : "$color8", children: tab.icon }),
|
|
1522
|
+
showLabels && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_tamagui37.SizableText, { size: "$1", color: active ? "$color9" : "$color8", fontWeight: active ? "600" : "400", children: tab.label })
|
|
1523
|
+
]
|
|
1524
|
+
},
|
|
1525
|
+
tab.id
|
|
1526
|
+
);
|
|
1527
|
+
}) });
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
// src/patterns/SearchBar.tsx
|
|
1531
|
+
var import_tamagui38 = require("tamagui");
|
|
1532
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1533
|
+
function SearchBar({ value, onChangeText, placeholder = "Search\u2026", onFilter, onCancel, autoFocus }) {
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_tamagui38.XStack, { height: 44, borderRadius: "$10", backgroundColor: "$color2", alignItems: "center", paddingHorizontal: "$3", gap: "$2", children: [
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_tamagui38.SizableText, { size: "$4", color: "$color8", children: "\u2315" }),
|
|
1536
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1537
|
+
import_tamagui38.Input,
|
|
1538
|
+
{
|
|
1539
|
+
flex: 1,
|
|
1540
|
+
size: "$4",
|
|
1541
|
+
value,
|
|
1542
|
+
onChangeText,
|
|
1543
|
+
placeholder,
|
|
1544
|
+
placeholderTextColor: "$color8",
|
|
1545
|
+
backgroundColor: "transparent",
|
|
1546
|
+
borderWidth: 0,
|
|
1547
|
+
autoFocus
|
|
1548
|
+
}
|
|
1549
|
+
),
|
|
1550
|
+
onFilter && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_tamagui38.SizableText, { size: "$4", color: "$color9", pressStyle: { opacity: 0.6 }, onPress: onFilter, children: "\u2ACF" }),
|
|
1551
|
+
onCancel && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_tamagui38.SizableText, { size: "$3", color: "$color9", pressStyle: { opacity: 0.6 }, onPress: onCancel, children: "Cancel" })
|
|
1552
|
+
] });
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
// src/patterns/FloatingActionButton.tsx
|
|
1556
|
+
var import_tamagui39 = require("tamagui");
|
|
1557
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1558
|
+
var sizes = { sm: 44, md: 56, lg: 68 };
|
|
1559
|
+
var positionStyles = {
|
|
1560
|
+
"bottom-right": { right: 20 },
|
|
1561
|
+
"bottom-center": { left: "50%", marginLeft: -28 },
|
|
1562
|
+
"bottom-left": { left: 20 }
|
|
1563
|
+
};
|
|
1564
|
+
function FloatingActionButton({ icon, label, onPress, position = "bottom-right", size = "md" }) {
|
|
1565
|
+
const dim = sizes[size];
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1567
|
+
import_tamagui39.XStack,
|
|
1568
|
+
{
|
|
1569
|
+
position: "absolute",
|
|
1570
|
+
bottom: 32,
|
|
1571
|
+
...positionStyles[position],
|
|
1572
|
+
height: dim,
|
|
1573
|
+
minWidth: dim,
|
|
1574
|
+
borderRadius: label ? "$6" : "$10",
|
|
1575
|
+
backgroundColor: "$color9",
|
|
1576
|
+
alignItems: "center",
|
|
1577
|
+
justifyContent: "center",
|
|
1578
|
+
gap: "$2",
|
|
1579
|
+
paddingHorizontal: label ? "$4" : 0,
|
|
1580
|
+
elevation: 4,
|
|
1581
|
+
pressStyle: { scale: 0.95, opacity: 0.9 },
|
|
1582
|
+
onPress,
|
|
1583
|
+
children: [
|
|
1584
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_tamagui39.SizableText, { color: "$color1", children: icon }),
|
|
1585
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_tamagui39.SizableText, { color: "$color1", size: "$4", fontWeight: "600", children: label })
|
|
1586
|
+
]
|
|
1587
|
+
}
|
|
1588
|
+
);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
// src/patterns/ActionSheet.tsx
|
|
1592
|
+
var import_tamagui40 = require("tamagui");
|
|
1593
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1594
|
+
function ActionSheet({ open, onOpenChange, title, items, onSelect, cancelLabel = "Cancel", zIndex = 1e5 }) {
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1596
|
+
import_tamagui40.Sheet,
|
|
1597
|
+
{
|
|
1598
|
+
modal: true,
|
|
1599
|
+
forceRemoveScrollEnabled: open,
|
|
1600
|
+
open,
|
|
1601
|
+
onOpenChange,
|
|
1602
|
+
snapPoints: [50],
|
|
1603
|
+
dismissOnSnapToBottom: true,
|
|
1604
|
+
zIndex,
|
|
1605
|
+
animation: "medium",
|
|
1606
|
+
children: [
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.Sheet.Overlay, { animation: "lazy", enterStyle: { opacity: 0 }, exitStyle: { opacity: 0 } }),
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.Sheet.Handle, {}),
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_tamagui40.Sheet.Frame, { children: [
|
|
1610
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.SizableText, { size: "$3", color: "$color8", textAlign: "center", paddingTop: "$3", paddingBottom: "$1", children: title }),
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.YStack, { paddingHorizontal: "$3", paddingTop: "$2", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1612
|
+
import_tamagui40.XStack,
|
|
1613
|
+
{
|
|
1614
|
+
height: 52,
|
|
1615
|
+
alignItems: "center",
|
|
1616
|
+
gap: "$3",
|
|
1617
|
+
paddingHorizontal: "$3",
|
|
1618
|
+
borderRadius: "$4",
|
|
1619
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1620
|
+
onPress: () => {
|
|
1621
|
+
onSelect(item.id);
|
|
1622
|
+
onOpenChange(false);
|
|
1623
|
+
},
|
|
1624
|
+
children: [
|
|
1625
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.SizableText, { size: "$5", children: item.icon }),
|
|
1626
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1627
|
+
import_tamagui40.SizableText,
|
|
1628
|
+
{
|
|
1629
|
+
size: "$5",
|
|
1630
|
+
flex: 1,
|
|
1631
|
+
color: item.destructive ? "$red9" : "$color12",
|
|
1632
|
+
fontWeight: item.destructive ? "600" : "400",
|
|
1633
|
+
children: item.label
|
|
1634
|
+
}
|
|
1635
|
+
)
|
|
1636
|
+
]
|
|
1637
|
+
},
|
|
1638
|
+
item.id
|
|
1639
|
+
)) }),
|
|
1640
|
+
/* @__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)(
|
|
1641
|
+
import_tamagui40.XStack,
|
|
1642
|
+
{
|
|
1643
|
+
height: 48,
|
|
1644
|
+
alignItems: "center",
|
|
1645
|
+
justifyContent: "center",
|
|
1646
|
+
borderRadius: "$4",
|
|
1647
|
+
pressStyle: { backgroundColor: "$color3" },
|
|
1648
|
+
onPress: () => onOpenChange(false),
|
|
1649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_tamagui40.SizableText, { size: "$5", fontWeight: "600", color: "$color9", children: cancelLabel })
|
|
1650
|
+
}
|
|
1651
|
+
) })
|
|
1652
|
+
] })
|
|
1653
|
+
]
|
|
1654
|
+
}
|
|
1655
|
+
);
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
// src/patterns/Skeleton.tsx
|
|
1659
|
+
var import_tamagui41 = require("tamagui");
|
|
1660
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1661
|
+
function Skeleton({ width, height, borderRadius, variant = "rectangular" }) {
|
|
1662
|
+
const size = variant === "circular" ? height ?? 40 : height;
|
|
1663
|
+
const w = variant === "text" ? width ?? "100%" : width;
|
|
1664
|
+
const h = variant === "text" ? height ?? 16 : size;
|
|
1665
|
+
const r = variant === "circular" ? 9999 : borderRadius ?? 8;
|
|
1666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_tamagui41.YStack, { width: w, height: h, borderRadius: r, backgroundColor: "$color3", opacity: 0.6, animation: "slow", enterStyle: { opacity: 0.3 }, exitStyle: { opacity: 0.3 } });
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
// src/patterns/NotificationBanner.tsx
|
|
1670
|
+
var import_tamagui42 = require("tamagui");
|
|
1671
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1672
|
+
var variantColors = {
|
|
1673
|
+
info: { bg: "$blue3", text: "$blue11" },
|
|
1674
|
+
success: { bg: "$green3", text: "$green11" },
|
|
1675
|
+
warning: { bg: "$yellow3", text: "$yellow11" },
|
|
1676
|
+
error: { bg: "$red3", text: "$red11" }
|
|
1677
|
+
};
|
|
1678
|
+
function NotificationBanner({ title, message, variant = "info", onPress, onDismiss, icon }) {
|
|
1679
|
+
const colors = variantColors[variant];
|
|
1680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1681
|
+
import_tamagui42.XStack,
|
|
1682
|
+
{
|
|
1683
|
+
backgroundColor: colors.bg,
|
|
1684
|
+
padding: "$3",
|
|
1685
|
+
borderRadius: "$4",
|
|
1686
|
+
gap: "$3",
|
|
1687
|
+
alignItems: "flex-start",
|
|
1688
|
+
onPress,
|
|
1689
|
+
pressStyle: onPress ? { opacity: 0.8 } : void 0,
|
|
1690
|
+
children: [
|
|
1691
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.YStack, { paddingTop: "$0.5", children: icon }),
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_tamagui42.YStack, { flex: 1, gap: "$1", children: [
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.SizableText, { size: "$4", fontWeight: "600", color: colors.text, children: title }),
|
|
1694
|
+
message && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.SizableText, { size: "$3", color: colors.text, opacity: 0.8, children: message })
|
|
1695
|
+
] }),
|
|
1696
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_tamagui42.SizableText, { size: "$3", color: colors.text, opacity: 0.6, onPress: onDismiss, padding: "$1", children: "\u2715" })
|
|
1697
|
+
]
|
|
1698
|
+
}
|
|
1699
|
+
);
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
// src/patterns/ProgressSteps.tsx
|
|
1703
|
+
var import_tamagui43 = require("tamagui");
|
|
1704
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1705
|
+
function ProgressSteps({ steps, currentStep, variant = "dots" }) {
|
|
1706
|
+
if (variant === "bar") {
|
|
1707
|
+
const progress = steps.length > 1 ? currentStep / (steps.length - 1) * 100 : 100;
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_tamagui43.YStack, { gap: "$2", children: [
|
|
1709
|
+
/* @__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" }) }),
|
|
1710
|
+
/* @__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)) })
|
|
1711
|
+
] });
|
|
573
1712
|
}
|
|
574
|
-
return /* @__PURE__ */ (0,
|
|
1713
|
+
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: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_tamagui43.YStack, { alignItems: "center", gap: "$1.5", children: [
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.Circle, { size: variant === "numbered" ? 28 : 10, backgroundColor: i <= currentStep ? "$color9" : "$color4", animation: "quick", children: variant === "numbered" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.SizableText, { size: "$2", fontWeight: "600", color: i <= currentStep ? "$color1" : "$color8", children: i + 1 }) }),
|
|
1716
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.SizableText, { size: "$1", color: i <= currentStep ? "$color11" : "$color8", numberOfLines: 1, children: label })
|
|
1717
|
+
] }),
|
|
1718
|
+
i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_tamagui43.YStack, { height: 2, width: 32, backgroundColor: i < currentStep ? "$color9" : "$color4", marginBottom: "$4" })
|
|
1719
|
+
] }, i)) });
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
// src/patterns/SwipeableRow.tsx
|
|
1723
|
+
var import_react9 = require("react");
|
|
1724
|
+
var import_tamagui44 = require("tamagui");
|
|
1725
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1726
|
+
function SwipeableRow({ children, leftActions, rightActions }) {
|
|
1727
|
+
const [showActions, setShowActions] = (0, import_react9.useState)(false);
|
|
1728
|
+
const actions = [...leftActions ?? [], ...rightActions ?? []];
|
|
1729
|
+
if (actions.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_tamagui44.YStack, { children: [
|
|
1731
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_tamagui44.YStack, { onLongPress: () => setShowActions((v) => !v), pressStyle: { opacity: 0.9 }, children }),
|
|
1732
|
+
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)(
|
|
1733
|
+
import_tamagui44.Button,
|
|
1734
|
+
{
|
|
1735
|
+
flex: 1,
|
|
1736
|
+
size: "$3",
|
|
1737
|
+
backgroundColor: action.color,
|
|
1738
|
+
borderRadius: "$3",
|
|
1739
|
+
onPress: () => {
|
|
1740
|
+
action.onPress();
|
|
1741
|
+
setShowActions(false);
|
|
1742
|
+
},
|
|
1743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_tamagui44.SizableText, { size: "$2", fontWeight: "600", color: "white", children: action.label })
|
|
1744
|
+
},
|
|
1745
|
+
action.id
|
|
1746
|
+
)) })
|
|
1747
|
+
] });
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
// src/patterns/MediaCard.tsx
|
|
1751
|
+
var import_tamagui45 = require("tamagui");
|
|
1752
|
+
var import_linear_gradient = require("tamagui/linear-gradient");
|
|
1753
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1754
|
+
function MediaCard({ image, title, subtitle, overlay = "gradient", aspectRatio = 16 / 9, onPress, badge }) {
|
|
1755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1756
|
+
import_tamagui45.YStack,
|
|
1757
|
+
{
|
|
1758
|
+
borderRadius: "$4",
|
|
1759
|
+
overflow: "hidden",
|
|
1760
|
+
onPress,
|
|
1761
|
+
pressStyle: onPress ? { scale: 0.98, opacity: 0.9 } : void 0,
|
|
1762
|
+
animation: "quick",
|
|
1763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_tamagui45.YStack, { aspectRatio, children: [
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.Image, { source: { uri: image }, width: "100%", height: "100%", objectFit: "cover" }),
|
|
1765
|
+
overlay === "gradient" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1766
|
+
import_linear_gradient.LinearGradient,
|
|
1767
|
+
{
|
|
1768
|
+
colors: ["transparent", "rgba(0,0,0,0.7)"],
|
|
1769
|
+
start: [0, 0],
|
|
1770
|
+
end: [0, 1],
|
|
1771
|
+
position: "absolute",
|
|
1772
|
+
bottom: 0,
|
|
1773
|
+
left: 0,
|
|
1774
|
+
right: 0,
|
|
1775
|
+
height: "60%"
|
|
1776
|
+
}
|
|
1777
|
+
),
|
|
1778
|
+
overlay === "dark" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.YStack, { position: "absolute", fullscreen: true, backgroundColor: "rgba(0,0,0,0.4)" }),
|
|
1779
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1780
|
+
import_tamagui45.XStack,
|
|
1781
|
+
{
|
|
1782
|
+
position: "absolute",
|
|
1783
|
+
top: "$2",
|
|
1784
|
+
right: "$2",
|
|
1785
|
+
backgroundColor: "$color9",
|
|
1786
|
+
paddingHorizontal: "$2",
|
|
1787
|
+
paddingVertical: "$1",
|
|
1788
|
+
borderRadius: "$2",
|
|
1789
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.SizableText, { size: "$1", fontWeight: "600", color: "$color1", children: badge })
|
|
1790
|
+
}
|
|
1791
|
+
),
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_tamagui45.YStack, { position: "absolute", bottom: 0, left: 0, right: 0, padding: "$3", gap: "$1", children: [
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.SizableText, { size: "$5", fontWeight: "600", color: "white", children: title }),
|
|
1794
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_tamagui45.SizableText, { size: "$3", color: "rgba(255,255,255,0.8)", children: subtitle })
|
|
1795
|
+
] })
|
|
1796
|
+
] })
|
|
1797
|
+
}
|
|
1798
|
+
);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
// src/patterns/Carousel.tsx
|
|
1802
|
+
var import_react10 = require("react");
|
|
1803
|
+
var import_tamagui46 = require("tamagui");
|
|
1804
|
+
var import_react_native3 = require("react-native");
|
|
1805
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1806
|
+
function Carousel({ children, gap = "$3", snapToInterval, showIndicators = false }) {
|
|
1807
|
+
const [activeIndex, setActiveIndex] = (0, import_react10.useState)(0);
|
|
1808
|
+
const count = import_react10.Children.count(children);
|
|
1809
|
+
const gapPx = gap === "$2" ? 8 : gap === "$3" ? 12 : 16;
|
|
1810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_tamagui46.YStack, { gap: "$3", children: [
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1812
|
+
import_react_native3.ScrollView,
|
|
1813
|
+
{
|
|
1814
|
+
horizontal: true,
|
|
1815
|
+
showsHorizontalScrollIndicator: false,
|
|
1816
|
+
snapToInterval,
|
|
1817
|
+
decelerationRate: "fast",
|
|
1818
|
+
contentContainerStyle: { gap: gapPx, paddingHorizontal: 16 },
|
|
1819
|
+
onMomentumScrollEnd: (e) => {
|
|
1820
|
+
if (snapToInterval) setActiveIndex(Math.round(e.nativeEvent.contentOffset.x / snapToInterval));
|
|
1821
|
+
},
|
|
1822
|
+
children
|
|
1823
|
+
}
|
|
1824
|
+
),
|
|
1825
|
+
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)(import_tamagui46.Circle, { size: 6, backgroundColor: i === activeIndex ? "$color9" : "$color4", animation: "quick" }, i)) })
|
|
1826
|
+
] });
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
// src/patterns/PullToRefresh.tsx
|
|
1830
|
+
var import_tamagui47 = require("tamagui");
|
|
1831
|
+
var import_react_native4 = require("react-native");
|
|
1832
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1833
|
+
function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
1834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1835
|
+
import_react_native4.ScrollView,
|
|
1836
|
+
{
|
|
1837
|
+
contentContainerStyle: { flexGrow: 1 },
|
|
1838
|
+
refreshControl: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native4.RefreshControl, { refreshing, onRefresh }),
|
|
1839
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_tamagui47.YStack, { flex: 1, children })
|
|
1840
|
+
}
|
|
1841
|
+
);
|
|
575
1842
|
}
|
|
576
1843
|
// Annotate the CommonJS export names for ESM import in node:
|
|
577
1844
|
0 && (module.exports = {
|
|
1845
|
+
Accordion,
|
|
1846
|
+
ActionSheet,
|
|
1847
|
+
Adapt,
|
|
1848
|
+
AlertDialog,
|
|
1849
|
+
Anchor,
|
|
1850
|
+
AnimatePresence,
|
|
1851
|
+
AppHeader,
|
|
1852
|
+
Article,
|
|
1853
|
+
Aside,
|
|
578
1854
|
Avatar,
|
|
1855
|
+
Badge,
|
|
1856
|
+
BlinkAccordion,
|
|
1857
|
+
BlinkAvatar,
|
|
1858
|
+
BlinkButton,
|
|
1859
|
+
BlinkCard,
|
|
1860
|
+
BlinkInput,
|
|
1861
|
+
BlinkProvider,
|
|
1862
|
+
BlinkTabs,
|
|
579
1863
|
BlinkText,
|
|
1864
|
+
BlinkToastProvider,
|
|
1865
|
+
BlinkToggleGroup,
|
|
1866
|
+
BlinkTooltip,
|
|
1867
|
+
BottomSheet,
|
|
580
1868
|
Button,
|
|
581
1869
|
Card,
|
|
1870
|
+
Carousel,
|
|
1871
|
+
ChatBubble,
|
|
1872
|
+
Checkbox,
|
|
1873
|
+
Circle,
|
|
1874
|
+
Container,
|
|
1875
|
+
Dialog,
|
|
1876
|
+
DialogProvider,
|
|
1877
|
+
Divider,
|
|
1878
|
+
EmptyState,
|
|
1879
|
+
EnsureFlexed,
|
|
1880
|
+
Fieldset,
|
|
1881
|
+
FloatingActionButton,
|
|
1882
|
+
Footer,
|
|
1883
|
+
Form,
|
|
1884
|
+
FormField,
|
|
1885
|
+
Frame,
|
|
1886
|
+
Grid,
|
|
1887
|
+
Group,
|
|
1888
|
+
H1,
|
|
1889
|
+
H2,
|
|
1890
|
+
H3,
|
|
1891
|
+
H4,
|
|
1892
|
+
H5,
|
|
1893
|
+
H6,
|
|
1894
|
+
Header,
|
|
1895
|
+
Heading,
|
|
1896
|
+
ICONS,
|
|
1897
|
+
Icon,
|
|
1898
|
+
Image,
|
|
582
1899
|
Input,
|
|
583
|
-
|
|
1900
|
+
KeyboardStickyFooter,
|
|
1901
|
+
Label,
|
|
1902
|
+
ListItem,
|
|
1903
|
+
LoginScreen,
|
|
1904
|
+
Main,
|
|
1905
|
+
MediaCard,
|
|
1906
|
+
Nav,
|
|
1907
|
+
NotificationBanner,
|
|
1908
|
+
OnboardingCarousel,
|
|
1909
|
+
PageContainer,
|
|
1910
|
+
PageMainContainer,
|
|
1911
|
+
Paragraph,
|
|
1912
|
+
PaywallScreen,
|
|
1913
|
+
Popover,
|
|
1914
|
+
Portal,
|
|
1915
|
+
PortalHost,
|
|
1916
|
+
PortalItem,
|
|
1917
|
+
PortalProvider,
|
|
1918
|
+
Pressable,
|
|
1919
|
+
ProfileHeader,
|
|
1920
|
+
Progress,
|
|
1921
|
+
ProgressSteps,
|
|
1922
|
+
PullToRefresh,
|
|
1923
|
+
RadioGroup,
|
|
1924
|
+
SafeArea,
|
|
1925
|
+
ScreenLayout,
|
|
1926
|
+
ScrollView,
|
|
1927
|
+
SearchBar,
|
|
1928
|
+
Section,
|
|
1929
|
+
Select,
|
|
1930
|
+
SepHeading,
|
|
1931
|
+
Separator,
|
|
1932
|
+
SettingsScreen,
|
|
1933
|
+
Sheet,
|
|
1934
|
+
SizableStack,
|
|
1935
|
+
SizableText,
|
|
1936
|
+
Skeleton,
|
|
1937
|
+
Slider,
|
|
1938
|
+
Spacer,
|
|
1939
|
+
Spinner,
|
|
1940
|
+
Square,
|
|
1941
|
+
Stack,
|
|
1942
|
+
StepPageLayout,
|
|
1943
|
+
SubHeading,
|
|
1944
|
+
SwipeableRow,
|
|
1945
|
+
Switch,
|
|
1946
|
+
TabBar,
|
|
1947
|
+
Tabs,
|
|
1948
|
+
TamaguiImage,
|
|
1949
|
+
TamaguiListItem,
|
|
1950
|
+
TamaguiProvider,
|
|
1951
|
+
Text,
|
|
1952
|
+
TextArea,
|
|
1953
|
+
Theme,
|
|
1954
|
+
ThemeableStack,
|
|
1955
|
+
ToggleGroup,
|
|
1956
|
+
Tooltip,
|
|
1957
|
+
TooltipSimple,
|
|
1958
|
+
Unspaced,
|
|
1959
|
+
View,
|
|
1960
|
+
VisuallyHidden,
|
|
1961
|
+
XGroup,
|
|
1962
|
+
XStack,
|
|
1963
|
+
YGroup,
|
|
1964
|
+
YStack,
|
|
1965
|
+
ZStack,
|
|
1966
|
+
addTheme,
|
|
1967
|
+
blinkConfig,
|
|
1968
|
+
composeEventHandlers,
|
|
1969
|
+
composeRefs,
|
|
1970
|
+
createFont,
|
|
1971
|
+
createMedia,
|
|
1972
|
+
createStyledContext,
|
|
1973
|
+
createTamagui,
|
|
1974
|
+
createTheme,
|
|
1975
|
+
createTokens,
|
|
1976
|
+
createVariable,
|
|
1977
|
+
dialogConfirm,
|
|
1978
|
+
getConfig,
|
|
1979
|
+
getToken,
|
|
1980
|
+
getTokenValue,
|
|
1981
|
+
getTokens,
|
|
1982
|
+
isClient,
|
|
1983
|
+
isWeb,
|
|
1984
|
+
replaceTheme,
|
|
1985
|
+
showError,
|
|
1986
|
+
styled,
|
|
1987
|
+
tamaguiDefaultConfig,
|
|
1988
|
+
toast,
|
|
1989
|
+
updateTheme,
|
|
1990
|
+
useBlinkToast,
|
|
1991
|
+
useComposedRefs,
|
|
1992
|
+
useControllableState,
|
|
1993
|
+
useDebounce,
|
|
1994
|
+
useDebounceValue,
|
|
1995
|
+
useDidFinishSSR,
|
|
1996
|
+
useEvent,
|
|
1997
|
+
useForceUpdate,
|
|
1998
|
+
useIsPresent,
|
|
1999
|
+
useIsomorphicLayoutEffect,
|
|
2000
|
+
useMedia,
|
|
2001
|
+
usePresence,
|
|
2002
|
+
useTheme,
|
|
2003
|
+
useThemeName,
|
|
2004
|
+
useWindowDimensions,
|
|
2005
|
+
withStaticProperties
|
|
584
2006
|
});
|
|
585
2007
|
//# sourceMappingURL=index.js.map
|