@vvedantb/native-ui 0.17.2 → 0.18.0
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/AlertDialog.jsx +123 -0
- package/dist/AmbientBackground.jsx +73 -0
- package/dist/ArtifactList.jsx +59 -0
- package/dist/Avatar.jsx +285 -0
- package/dist/Badge.jsx +154 -0
- package/dist/BottomSheetContainer.jsx +208 -0
- package/dist/BulkActionBar.jsx +717 -0
- package/dist/Button.jsx +344 -0
- package/dist/CaptureButton.jsx +104 -0
- package/dist/Card.jsx +371 -0
- package/dist/Checkbox.jsx +177 -0
- package/dist/Chip.jsx +79 -0
- package/dist/ColorSwatches.jsx +159 -0
- package/dist/ConfirmDialog.jsx +157 -0
- package/dist/DateTimeField.jsx +204 -0
- package/dist/Dialog.jsx +614 -0
- package/dist/DividedList.jsx +120 -0
- package/dist/DropdownMenu.jsx +849 -0
- package/dist/EmptyState.jsx +434 -0
- package/dist/ExpoWebRoot.jsx +134 -0
- package/dist/FloatingFAB.jsx +95 -0
- package/dist/FloatingSurface.jsx +226 -0
- package/dist/FloatingTabBar.jsx +403 -0
- package/dist/HeaderIconButton.jsx +53 -0
- package/dist/IconButton.jsx +157 -0
- package/dist/Input.jsx +96 -0
- package/dist/Label.jsx +96 -0
- package/dist/LabeledSwitchRow.jsx +170 -0
- package/dist/LiquidGlass.jsx +2 -0
- package/dist/ListRow.jsx +281 -0
- package/dist/LoadingState.jsx +205 -0
- package/dist/PageIndicator.jsx +128 -0
- package/dist/PageTitle.jsx +205 -0
- package/dist/Pager.jsx +105 -0
- package/dist/PasswordInput.jsx +120 -0
- package/dist/PillTabs.jsx +300 -0
- package/dist/PinnedBotTile.jsx +212 -0
- package/dist/Progress.jsx +147 -0
- package/dist/SafeAreaContainer.jsx +38 -0
- package/dist/ScreenContainer.jsx +117 -0
- package/dist/SearchInput.jsx +150 -0
- package/dist/SectionLabel.jsx +128 -0
- package/dist/Select.jsx +223 -0
- package/dist/Separator.jsx +95 -0
- package/dist/Sheet.jsx +343 -0
- package/dist/SheetRow.jsx +198 -0
- package/dist/Skeleton.jsx +311 -0
- package/dist/Spinner.jsx +195 -0
- package/dist/StackPageHeader.jsx +160 -0
- package/dist/StatGrid.jsx +74 -0
- package/dist/StatusDot.jsx +129 -0
- package/dist/SurfaceRow.jsx +143 -0
- package/dist/SwipeableRow.jsx +50 -0
- package/dist/Switch.jsx +130 -0
- package/dist/Tabs.jsx +385 -0
- package/dist/Textarea.jsx +103 -0
- package/dist/ThemeToggle.jsx +78 -0
- package/dist/Toast.jsx +396 -0
- package/dist/ai/activity-step-detail.jsx +179 -0
- package/dist/ai/activity-step-label.js +816 -0
- package/dist/ai/activity-step-types.js +14 -0
- package/dist/ai/activity-step.jsx +98 -0
- package/dist/ai/activity-tasks-utils.js +172 -0
- package/dist/ai/activity-timeline.js +47 -0
- package/dist/ai/attachments.jsx +258 -0
- package/dist/ai/card-button.jsx +188 -0
- package/dist/ai/chain-of-thought.jsx +459 -0
- package/dist/ai/chat-jump-rail.jsx +57 -0
- package/dist/ai/chat-text.js +44 -0
- package/dist/ai/chat-thread.jsx +135 -0
- package/dist/ai/choice-question.jsx +925 -0
- package/dist/ai/code-block.jsx +574 -0
- package/dist/ai/collapsible.jsx +275 -0
- package/dist/ai/conversation.jsx +723 -0
- package/dist/ai/file-chip.jsx +198 -0
- package/dist/ai/icon-button.jsx +179 -0
- package/dist/ai/index.js +37 -0
- package/dist/ai/message-action-sheet.jsx +408 -0
- package/dist/ai/message-quote.jsx +241 -0
- package/dist/ai/message.jsx +739 -0
- package/dist/ai/prompt-input-menu.jsx +365 -0
- package/dist/ai/prompt-input.jsx +626 -0
- package/dist/ai/reasoning.jsx +446 -0
- package/dist/ai/reply-quote-chip.jsx +278 -0
- package/dist/ai/response-text.jsx +130 -0
- package/dist/ai/shimmer.jsx +149 -0
- package/dist/ai/sources.jsx +260 -0
- package/dist/ai/subagent-cards.jsx +645 -0
- package/dist/ai/suggestion.jsx +186 -0
- package/dist/ai/tool-approval-card.jsx +359 -0
- package/dist/ai/trace.jsx +728 -0
- package/dist/ai/unified-diff.jsx +280 -0
- package/dist/ai/use-streaming-disclosure.js +70 -0
- package/dist/auth/AuthProviders.jsx +27 -0
- package/dist/auth/AuthScreen.jsx +292 -0
- package/dist/auth/GoogleSignInButton.jsx +188 -0
- package/dist/auth/SecondFactorScreen.jsx +133 -0
- package/dist/auth/SignInScreen.jsx +482 -0
- package/dist/auth/authErrors.js +131 -0
- package/dist/auth/index.js +11 -0
- package/dist/auth/totp.js +378 -0
- package/dist/blur.js +36 -0
- package/dist/brand/AppIcons.jsx +118 -0
- package/dist/brand/AppMark.jsx +128 -0
- package/dist/brand/AppWordmark.jsx +138 -0
- package/dist/brand/GoogleMark.jsx +71 -0
- package/dist/brand/ProviderIcon.jsx +192 -0
- package/dist/brand/familyApps.js +33 -0
- package/dist/brand/index.js +11 -0
- package/dist/brand/svg.js +252 -0
- package/dist/brand/vProAppBenefits.js +19 -0
- package/dist/cn.js +5 -0
- package/dist/colors.js +15 -0
- package/dist/configureTheme.js +72 -0
- package/dist/controlStyles.js +520 -0
- package/dist/definiteSize.js +12 -0
- package/dist/dialogLayout.js +18 -0
- package/dist/entries/ai.js +4 -0
- package/dist/entries/ambient.js +3 -0
- package/dist/entries/auth.js +5 -0
- package/dist/entries/bottom-sheet.js +2 -0
- package/dist/entries/brand.js +2 -0
- package/dist/entries/button.js +2 -0
- package/dist/entries/date-time.js +3 -0
- package/dist/entries/expo-router.js +4 -0
- package/dist/entries/expo-web-root.js +3 -0
- package/dist/entries/floating.js +7 -0
- package/dist/entries/gesture-handler.js +4 -0
- package/dist/entries/keyboard-controller.js +4 -0
- package/dist/entries/layout.js +16 -0
- package/dist/entries/markdown.js +4 -0
- package/dist/entries/marketing.js +3 -0
- package/dist/entries/page-title.js +7 -0
- package/dist/entries/password-input.js +3 -0
- package/dist/entries/primitives.js +57 -0
- package/dist/entries/search-input.js +3 -0
- package/dist/entries/tab-bar.js +4 -0
- package/dist/entries/theme.js +7 -0
- package/dist/entries/toast.js +5 -0
- package/dist/entries/video.js +3 -0
- package/dist/entries/webview.js +4 -0
- package/dist/examples/AiChatGallery.jsx +509 -0
- package/dist/examples/ParityGallery.jsx +1307 -0
- package/dist/floating.js +62 -0
- package/dist/glassBlur.jsx +145 -0
- package/dist/gradient.js +17 -0
- package/dist/haptics.js +44 -0
- package/dist/highlight.js +382 -0
- package/dist/index.js +85 -0
- package/dist/initials.js +4 -0
- package/dist/loadingGrid.js +81 -0
- package/dist/markdown/Markdown.jsx +515 -0
- package/dist/markdown/MarkdownTable.jsx +443 -0
- package/dist/markdown/tableText.js +68 -0
- package/dist/marketing/PricingModal.jsx +608 -0
- package/dist/marketing/UpgradeToProCard.jsx +164 -0
- package/dist/marketing/pricing.js +34 -0
- package/dist/media/ImageGallery.jsx +580 -0
- package/dist/media/MediaCard.jsx +162 -0
- package/dist/media/imageGrid.js +54 -0
- package/dist/motion.js +33 -0
- package/dist/pagerSwipe.js +104 -0
- package/dist/palette.js +104 -0
- package/dist/primitives/button.jsx +127 -0
- package/dist/primitives/card.jsx +249 -0
- package/dist/primitives/icon.jsx +37 -0
- package/dist/primitives/input.jsx +56 -0
- package/dist/primitives/keyboard-controller.jsx +207 -0
- package/dist/primitives/keyboard-parts.jsx +75 -0
- package/dist/primitives/native-only-animated-view.jsx +68 -0
- package/dist/primitives/overlay.jsx +391 -0
- package/dist/primitives/pager-gesture.jsx +131 -0
- package/dist/primitives/select-host.jsx +103 -0
- package/dist/primitives/select.jsx +555 -0
- package/dist/primitives/sheet-drag.jsx +420 -0
- package/dist/primitives/sheet-gesture.jsx +219 -0
- package/dist/primitives/swipe-row-gesture.jsx +341 -0
- package/dist/primitives/switch.jsx +105 -0
- package/dist/primitives/text.jsx +145 -0
- package/dist/primitives/toast-drag-gesture.jsx +94 -0
- package/dist/primitives/use-controllable-state.js +40 -0
- package/dist/primitives/web-click-guard.js +69 -0
- package/dist/push.js +166 -0
- package/dist/relativeTime.js +70 -0
- package/dist/router/RouterStackPageHeader.jsx +53 -0
- package/dist/selectA11y.js +32 -0
- package/dist/settings/MoreFromProjectV.jsx +168 -0
- package/dist/settings/SettingsEmptyState.jsx +102 -0
- package/dist/settings/SettingsField.jsx +49 -0
- package/dist/settings/SettingsSection.jsx +101 -0
- package/dist/settings/SettingsStack.jsx +17 -0
- package/dist/settings/SettingsToggleRow.jsx +163 -0
- package/dist/settings/projectVMobileApps.js +126 -0
- package/dist/settings/relaxedSizeStyle.js +11 -0
- package/dist/sheetDrag.js +76 -0
- package/dist/svgA11y.js +46 -0
- package/dist/swipeRow.js +161 -0
- package/dist/tabBarRoutes.js +41 -0
- package/dist/tabIndicator.js +139 -0
- package/dist/tailwind-preset.cjs +255 -0
- package/dist/tailwind-preset.d.cts +55 -0
- package/dist/theme.jsx +62 -0
- package/dist/toastChrome.js +110 -0
- package/dist/toastDrag.js +51 -0
- package/dist/toastStore.js +54 -0
- package/dist/tokens.js +70 -0
- package/dist/typography.js +40 -0
- package/dist/useReduceMotion.js +32 -0
- package/dist/useReduceTransparency.js +27 -0
- package/dist/useScheme.js +15 -0
- package/dist/video/InlineVideo.jsx +115 -0
- package/dist/webview/HtmlView.jsx +169 -0
- package/dist/webview/HtmlView.web.jsx +63 -0
- package/dist/webview/htmlView.js +43 -0
- package/package.json +70 -33
- package/src/DropdownMenu.tsx +28 -16
- package/src/FloatingTabBar.tsx +78 -41
- package/src/ai/conversation.tsx +12 -8
- package/src/glassBlur.tsx +47 -22
- package/src/primitives/swipe-row-gesture.tsx +11 -2
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Modal, Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
3
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
|
+
import { IconCheck, IconX } from "@tabler/icons-react-native";
|
|
5
|
+
import { APP_ICONS, IconProjectV } from "../brand/AppIcons";
|
|
6
|
+
import { familyApp } from "../brand/familyApps";
|
|
7
|
+
import { Button } from "../Button";
|
|
8
|
+
import { cn } from "../cn";
|
|
9
|
+
import { typeStyle } from "../controlStyles";
|
|
10
|
+
import { palette, withAlpha } from "../palette";
|
|
11
|
+
import { tokens } from "../tokens";
|
|
12
|
+
import { useLargerText } from "../theme";
|
|
13
|
+
import { useReduceMotion } from "../useReduceMotion";
|
|
14
|
+
import { useScheme } from "../useScheme";
|
|
15
|
+
import { useControllableState } from "../primitives/use-controllable-state";
|
|
16
|
+
import { isEmphasised, planAppBenefits, planButton, sortAppBenefits } from "./pricing";
|
|
17
|
+
/**
|
|
18
|
+
* Upgrade sheet, the native counterpart of the web `PricingModal` multi-plan
|
|
19
|
+
* layout: a page sheet on iOS (full screen on Android) with a Monthly / Annual
|
|
20
|
+
* switch and stacked plan cards. The web single-plan layout (logo URLs and a
|
|
21
|
+
* Michroma wordmark) is not ported: pass one plan instead.
|
|
22
|
+
*/
|
|
23
|
+
export function PricingModal(t0) {
|
|
24
|
+
const $ = _c(74);
|
|
25
|
+
const {
|
|
26
|
+
open,
|
|
27
|
+
onClose,
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
plans,
|
|
31
|
+
apps,
|
|
32
|
+
currentApp,
|
|
33
|
+
headline,
|
|
34
|
+
finePrint,
|
|
35
|
+
billingPeriod,
|
|
36
|
+
onBillingPeriodChange,
|
|
37
|
+
defaultBillingPeriod: t1,
|
|
38
|
+
onCheckout,
|
|
39
|
+
renderCheckout,
|
|
40
|
+
onAppPress,
|
|
41
|
+
testID
|
|
42
|
+
} = t0;
|
|
43
|
+
const defaultBillingPeriod = t1 === undefined ? "month" : t1;
|
|
44
|
+
const scheme = useScheme();
|
|
45
|
+
const largerText = useLargerText();
|
|
46
|
+
const insets = useSafeAreaInsets();
|
|
47
|
+
const reduceMotion = useReduceMotion();
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[0] !== billingPeriod || $[1] !== defaultBillingPeriod || $[2] !== onBillingPeriodChange) {
|
|
50
|
+
t2 = {
|
|
51
|
+
value: billingPeriod,
|
|
52
|
+
defaultValue: defaultBillingPeriod,
|
|
53
|
+
onChange: onBillingPeriodChange
|
|
54
|
+
};
|
|
55
|
+
$[0] = billingPeriod;
|
|
56
|
+
$[1] = defaultBillingPeriod;
|
|
57
|
+
$[2] = onBillingPeriodChange;
|
|
58
|
+
$[3] = t2;
|
|
59
|
+
} else {
|
|
60
|
+
t2 = $[3];
|
|
61
|
+
}
|
|
62
|
+
const [period, setPeriod] = useControllableState(t2);
|
|
63
|
+
const fg = tokens.color.foreground[scheme];
|
|
64
|
+
const muted = tokens.color.muted[scheme];
|
|
65
|
+
const t3 = reduceMotion ? "none" : "slide";
|
|
66
|
+
const t4 = tokens.color.background[scheme];
|
|
67
|
+
let t5;
|
|
68
|
+
if ($[4] !== insets.bottom || $[5] !== t4) {
|
|
69
|
+
t5 = {
|
|
70
|
+
backgroundColor: t4,
|
|
71
|
+
paddingBottom: insets.bottom
|
|
72
|
+
};
|
|
73
|
+
$[4] = insets.bottom;
|
|
74
|
+
$[5] = t4;
|
|
75
|
+
$[6] = t5;
|
|
76
|
+
} else {
|
|
77
|
+
t5 = $[6];
|
|
78
|
+
}
|
|
79
|
+
let t6;
|
|
80
|
+
if ($[7] !== description || $[8] !== title) {
|
|
81
|
+
t6 = <View accessible={true} accessibilityRole="header" accessibilityLabel={title} accessibilityHint={description} style={styles.srOnly} />;
|
|
82
|
+
$[7] = description;
|
|
83
|
+
$[8] = title;
|
|
84
|
+
$[9] = t6;
|
|
85
|
+
} else {
|
|
86
|
+
t6 = $[9];
|
|
87
|
+
}
|
|
88
|
+
let t7;
|
|
89
|
+
if ($[10] !== apps || $[11] !== fg || $[12] !== onAppPress) {
|
|
90
|
+
t7 = apps?.map(app => {
|
|
91
|
+
const Icon = APP_ICONS[app];
|
|
92
|
+
const {
|
|
93
|
+
name,
|
|
94
|
+
url
|
|
95
|
+
} = familyApp(app);
|
|
96
|
+
return onAppPress ? <Pressable key={app} accessibilityRole="link" accessibilityLabel={name} hitSlop={8} onPress={() => onAppPress(app, url)} className="active:opacity-70"><Icon size={22} color={fg} /></Pressable> : <Icon key={app} size={22} color={fg} title={name} />;
|
|
97
|
+
});
|
|
98
|
+
$[10] = apps;
|
|
99
|
+
$[11] = fg;
|
|
100
|
+
$[12] = onAppPress;
|
|
101
|
+
$[13] = t7;
|
|
102
|
+
} else {
|
|
103
|
+
t7 = $[13];
|
|
104
|
+
}
|
|
105
|
+
let t8;
|
|
106
|
+
if ($[14] !== t7) {
|
|
107
|
+
t8 = <View className="flex-row items-center gap-3">{t7}</View>;
|
|
108
|
+
$[14] = t7;
|
|
109
|
+
$[15] = t8;
|
|
110
|
+
} else {
|
|
111
|
+
t8 = $[15];
|
|
112
|
+
}
|
|
113
|
+
const t9 = palette.surfaceTertiary[scheme];
|
|
114
|
+
let t10;
|
|
115
|
+
if ($[16] !== t9) {
|
|
116
|
+
t10 = {
|
|
117
|
+
backgroundColor: t9
|
|
118
|
+
};
|
|
119
|
+
$[16] = t9;
|
|
120
|
+
$[17] = t10;
|
|
121
|
+
} else {
|
|
122
|
+
t10 = $[17];
|
|
123
|
+
}
|
|
124
|
+
let t11;
|
|
125
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
|
+
t11 = ["month", "year"];
|
|
127
|
+
$[18] = t11;
|
|
128
|
+
} else {
|
|
129
|
+
t11 = $[18];
|
|
130
|
+
}
|
|
131
|
+
let t12;
|
|
132
|
+
if ($[19] !== largerText || $[20] !== muted || $[21] !== period || $[22] !== scheme || $[23] !== setPeriod || $[24] !== testID) {
|
|
133
|
+
t12 = t11.map(value => {
|
|
134
|
+
const selected = period === value;
|
|
135
|
+
return <Pressable key={value} testID={testID ? `${testID}-period-${value}` : undefined} accessibilityRole="button" accessibilityState={{
|
|
136
|
+
selected
|
|
137
|
+
}} hitSlop={6} onPress={() => setPeriod(value)} className="rounded-full px-3 py-1.5" style={selected ? {
|
|
138
|
+
backgroundColor: palette.segment[scheme]
|
|
139
|
+
} : null}><Text className={cn("font-instrument-sans-medium", largerText ? "text-base" : "text-sm")} style={[{
|
|
140
|
+
color: selected ? palette.segmentForeground[scheme] : muted
|
|
141
|
+
}, typeStyle("medium")]}>{value === "month" ? "Monthly" : "Annual"}</Text></Pressable>;
|
|
142
|
+
});
|
|
143
|
+
$[19] = largerText;
|
|
144
|
+
$[20] = muted;
|
|
145
|
+
$[21] = period;
|
|
146
|
+
$[22] = scheme;
|
|
147
|
+
$[23] = setPeriod;
|
|
148
|
+
$[24] = testID;
|
|
149
|
+
$[25] = t12;
|
|
150
|
+
} else {
|
|
151
|
+
t12 = $[25];
|
|
152
|
+
}
|
|
153
|
+
let t13;
|
|
154
|
+
if ($[26] !== t10 || $[27] !== t12) {
|
|
155
|
+
t13 = <View accessibilityLabel="Billing period" className="flex-row rounded-full p-0.5" style={t10}>{t12}</View>;
|
|
156
|
+
$[26] = t10;
|
|
157
|
+
$[27] = t12;
|
|
158
|
+
$[28] = t13;
|
|
159
|
+
} else {
|
|
160
|
+
t13 = $[28];
|
|
161
|
+
}
|
|
162
|
+
const t14 = testID ? `${testID}-close` : undefined;
|
|
163
|
+
let t15;
|
|
164
|
+
if ($[29] !== muted) {
|
|
165
|
+
t15 = <IconX size={22} color={muted} />;
|
|
166
|
+
$[29] = muted;
|
|
167
|
+
$[30] = t15;
|
|
168
|
+
} else {
|
|
169
|
+
t15 = $[30];
|
|
170
|
+
}
|
|
171
|
+
let t16;
|
|
172
|
+
if ($[31] !== onClose || $[32] !== t14 || $[33] !== t15) {
|
|
173
|
+
t16 = <Pressable testID={t14} accessibilityRole="button" accessibilityLabel="Close" hitSlop={8} onPress={onClose} className="h-10 w-10 items-center justify-center rounded-full active:opacity-70">{t15}</Pressable>;
|
|
174
|
+
$[31] = onClose;
|
|
175
|
+
$[32] = t14;
|
|
176
|
+
$[33] = t15;
|
|
177
|
+
$[34] = t16;
|
|
178
|
+
} else {
|
|
179
|
+
t16 = $[34];
|
|
180
|
+
}
|
|
181
|
+
let t17;
|
|
182
|
+
if ($[35] !== t13 || $[36] !== t16) {
|
|
183
|
+
t17 = <View className="flex-row items-center gap-2">{t13}{t16}</View>;
|
|
184
|
+
$[35] = t13;
|
|
185
|
+
$[36] = t16;
|
|
186
|
+
$[37] = t17;
|
|
187
|
+
} else {
|
|
188
|
+
t17 = $[37];
|
|
189
|
+
}
|
|
190
|
+
let t18;
|
|
191
|
+
if ($[38] !== t17 || $[39] !== t8) {
|
|
192
|
+
t18 = <View className="flex-row items-center justify-between gap-3 px-4 pb-3 pt-4">{t8}{t17}</View>;
|
|
193
|
+
$[38] = t17;
|
|
194
|
+
$[39] = t8;
|
|
195
|
+
$[40] = t18;
|
|
196
|
+
} else {
|
|
197
|
+
t18 = $[40];
|
|
198
|
+
}
|
|
199
|
+
let t19;
|
|
200
|
+
if ($[41] !== fg || $[42] !== headline || $[43] !== largerText) {
|
|
201
|
+
t19 = headline ? <Text className={cn("pb-2 text-center font-instrument-sans-medium", largerText ? "text-3xl" : "text-2xl")} style={[{
|
|
202
|
+
color: fg
|
|
203
|
+
}, typeStyle("medium")]}>{headline}</Text> : null;
|
|
204
|
+
$[41] = fg;
|
|
205
|
+
$[42] = headline;
|
|
206
|
+
$[43] = largerText;
|
|
207
|
+
$[44] = t19;
|
|
208
|
+
} else {
|
|
209
|
+
t19 = $[44];
|
|
210
|
+
}
|
|
211
|
+
let t20;
|
|
212
|
+
if ($[45] !== currentApp || $[46] !== onCheckout || $[47] !== period || $[48] !== plans || $[49] !== renderCheckout) {
|
|
213
|
+
let t21;
|
|
214
|
+
if ($[51] !== currentApp || $[52] !== onCheckout || $[53] !== period || $[54] !== renderCheckout) {
|
|
215
|
+
t21 = plan => <PlanCard key={plan.id} plan={plan} period={period} currentApp={currentApp} onCheckout={onCheckout} renderCheckout={renderCheckout} />;
|
|
216
|
+
$[51] = currentApp;
|
|
217
|
+
$[52] = onCheckout;
|
|
218
|
+
$[53] = period;
|
|
219
|
+
$[54] = renderCheckout;
|
|
220
|
+
$[55] = t21;
|
|
221
|
+
} else {
|
|
222
|
+
t21 = $[55];
|
|
223
|
+
}
|
|
224
|
+
t20 = plans.map(t21);
|
|
225
|
+
$[45] = currentApp;
|
|
226
|
+
$[46] = onCheckout;
|
|
227
|
+
$[47] = period;
|
|
228
|
+
$[48] = plans;
|
|
229
|
+
$[49] = renderCheckout;
|
|
230
|
+
$[50] = t20;
|
|
231
|
+
} else {
|
|
232
|
+
t20 = $[50];
|
|
233
|
+
}
|
|
234
|
+
let t21;
|
|
235
|
+
if ($[56] !== finePrint || $[57] !== muted) {
|
|
236
|
+
t21 = finePrint ? <Text className="px-1 pt-1 font-instrument-sans text-sm" style={{
|
|
237
|
+
color: muted
|
|
238
|
+
}}>{finePrint}</Text> : null;
|
|
239
|
+
$[56] = finePrint;
|
|
240
|
+
$[57] = muted;
|
|
241
|
+
$[58] = t21;
|
|
242
|
+
} else {
|
|
243
|
+
t21 = $[58];
|
|
244
|
+
}
|
|
245
|
+
let t22;
|
|
246
|
+
if ($[59] !== t19 || $[60] !== t20 || $[61] !== t21) {
|
|
247
|
+
t22 = <ScrollView className="flex-1" contentContainerClassName="gap-3 px-4 pb-6" showsVerticalScrollIndicator={false}>{t19}{t20}{t21}</ScrollView>;
|
|
248
|
+
$[59] = t19;
|
|
249
|
+
$[60] = t20;
|
|
250
|
+
$[61] = t21;
|
|
251
|
+
$[62] = t22;
|
|
252
|
+
} else {
|
|
253
|
+
t22 = $[62];
|
|
254
|
+
}
|
|
255
|
+
let t23;
|
|
256
|
+
if ($[63] !== t18 || $[64] !== t22 || $[65] !== t5 || $[66] !== t6) {
|
|
257
|
+
t23 = <View className="flex-1" style={t5}>{t6}{t18}{t22}</View>;
|
|
258
|
+
$[63] = t18;
|
|
259
|
+
$[64] = t22;
|
|
260
|
+
$[65] = t5;
|
|
261
|
+
$[66] = t6;
|
|
262
|
+
$[67] = t23;
|
|
263
|
+
} else {
|
|
264
|
+
t23 = $[67];
|
|
265
|
+
}
|
|
266
|
+
let t24;
|
|
267
|
+
if ($[68] !== onClose || $[69] !== open || $[70] !== t23 || $[71] !== t3 || $[72] !== testID) {
|
|
268
|
+
t24 = <Modal visible={open} animationType={t3} presentationStyle="pageSheet" onRequestClose={onClose} testID={testID}>{t23}</Modal>;
|
|
269
|
+
$[68] = onClose;
|
|
270
|
+
$[69] = open;
|
|
271
|
+
$[70] = t23;
|
|
272
|
+
$[71] = t3;
|
|
273
|
+
$[72] = testID;
|
|
274
|
+
$[73] = t24;
|
|
275
|
+
} else {
|
|
276
|
+
t24 = $[73];
|
|
277
|
+
}
|
|
278
|
+
return t24;
|
|
279
|
+
}
|
|
280
|
+
function PlanCard(t0) {
|
|
281
|
+
const $ = _c(90);
|
|
282
|
+
const {
|
|
283
|
+
plan,
|
|
284
|
+
period,
|
|
285
|
+
currentApp,
|
|
286
|
+
onCheckout,
|
|
287
|
+
renderCheckout
|
|
288
|
+
} = t0;
|
|
289
|
+
const scheme = useScheme();
|
|
290
|
+
const largerText = useLargerText();
|
|
291
|
+
const fg = tokens.color.foreground[scheme];
|
|
292
|
+
const muted = tokens.color.muted[scheme];
|
|
293
|
+
const separator = tokens.color.separator[scheme];
|
|
294
|
+
let t1;
|
|
295
|
+
if ($[0] !== plan) {
|
|
296
|
+
t1 = isEmphasised(plan);
|
|
297
|
+
$[0] = plan;
|
|
298
|
+
$[1] = t1;
|
|
299
|
+
} else {
|
|
300
|
+
t1 = $[1];
|
|
301
|
+
}
|
|
302
|
+
const emphasised = t1;
|
|
303
|
+
let t2;
|
|
304
|
+
if ($[2] !== currentApp || $[3] !== emphasised || $[4] !== fg || $[5] !== largerText || $[6] !== muted || $[7] !== onCheckout || $[8] !== period || $[9] !== plan || $[10] !== renderCheckout || $[11] !== scheme || $[12] !== separator) {
|
|
305
|
+
const appBenefits = planAppBenefits(plan);
|
|
306
|
+
let t3;
|
|
307
|
+
if ($[14] !== plan) {
|
|
308
|
+
t3 = planButton(plan);
|
|
309
|
+
$[14] = plan;
|
|
310
|
+
$[15] = t3;
|
|
311
|
+
} else {
|
|
312
|
+
t3 = $[15];
|
|
313
|
+
}
|
|
314
|
+
const cta = t3;
|
|
315
|
+
const bodyText = largerText ? "text-lg" : "text-base";
|
|
316
|
+
let t4;
|
|
317
|
+
if ($[16] !== onCheckout || $[17] !== period || $[18] !== plan) {
|
|
318
|
+
t4 = () => onCheckout?.(plan, period);
|
|
319
|
+
$[16] = onCheckout;
|
|
320
|
+
$[17] = period;
|
|
321
|
+
$[18] = plan;
|
|
322
|
+
$[19] = t4;
|
|
323
|
+
} else {
|
|
324
|
+
t4 = $[19];
|
|
325
|
+
}
|
|
326
|
+
let t5;
|
|
327
|
+
if ($[20] !== cta.disabled || $[21] !== cta.label || $[22] !== cta.variant || $[23] !== t4) {
|
|
328
|
+
t5 = <Button variant={cta.variant} disabled={cta.disabled} shadowType="flat" onPress={t4}>{cta.label}</Button>;
|
|
329
|
+
$[20] = cta.disabled;
|
|
330
|
+
$[21] = cta.label;
|
|
331
|
+
$[22] = cta.variant;
|
|
332
|
+
$[23] = t4;
|
|
333
|
+
$[24] = t5;
|
|
334
|
+
} else {
|
|
335
|
+
t5 = $[24];
|
|
336
|
+
}
|
|
337
|
+
const button = t5;
|
|
338
|
+
let t6;
|
|
339
|
+
if ($[25] !== emphasised || $[26] !== fg || $[27] !== separator) {
|
|
340
|
+
t6 = emphasised ? withAlpha(fg, 0.25) : separator;
|
|
341
|
+
$[25] = emphasised;
|
|
342
|
+
$[26] = fg;
|
|
343
|
+
$[27] = separator;
|
|
344
|
+
$[28] = t6;
|
|
345
|
+
} else {
|
|
346
|
+
t6 = $[28];
|
|
347
|
+
}
|
|
348
|
+
const t7 = tokens.color.surfaceSecondary[scheme];
|
|
349
|
+
let t8;
|
|
350
|
+
if ($[29] !== t6 || $[30] !== t7) {
|
|
351
|
+
t8 = {
|
|
352
|
+
borderRadius: tokens.radius.card,
|
|
353
|
+
borderWidth: 1,
|
|
354
|
+
borderColor: t6,
|
|
355
|
+
backgroundColor: t7
|
|
356
|
+
};
|
|
357
|
+
$[29] = t6;
|
|
358
|
+
$[30] = t7;
|
|
359
|
+
$[31] = t8;
|
|
360
|
+
} else {
|
|
361
|
+
t8 = $[31];
|
|
362
|
+
}
|
|
363
|
+
let t9;
|
|
364
|
+
if ($[32] !== emphasised || $[33] !== fg) {
|
|
365
|
+
t9 = emphasised ? <IconProjectV size={16} color={fg} /> : null;
|
|
366
|
+
$[32] = emphasised;
|
|
367
|
+
$[33] = fg;
|
|
368
|
+
$[34] = t9;
|
|
369
|
+
} else {
|
|
370
|
+
t9 = $[34];
|
|
371
|
+
}
|
|
372
|
+
let t10;
|
|
373
|
+
if ($[35] !== bodyText) {
|
|
374
|
+
t10 = cn("font-instrument-sans-medium", bodyText);
|
|
375
|
+
$[35] = bodyText;
|
|
376
|
+
$[36] = t10;
|
|
377
|
+
} else {
|
|
378
|
+
t10 = $[36];
|
|
379
|
+
}
|
|
380
|
+
let t11;
|
|
381
|
+
if ($[37] !== fg) {
|
|
382
|
+
t11 = {
|
|
383
|
+
color: fg
|
|
384
|
+
};
|
|
385
|
+
$[37] = fg;
|
|
386
|
+
$[38] = t11;
|
|
387
|
+
} else {
|
|
388
|
+
t11 = $[38];
|
|
389
|
+
}
|
|
390
|
+
let t12;
|
|
391
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
392
|
+
t12 = typeStyle("medium");
|
|
393
|
+
$[39] = t12;
|
|
394
|
+
} else {
|
|
395
|
+
t12 = $[39];
|
|
396
|
+
}
|
|
397
|
+
let t13;
|
|
398
|
+
if ($[40] !== t11) {
|
|
399
|
+
t13 = [t11, t12];
|
|
400
|
+
$[40] = t11;
|
|
401
|
+
$[41] = t13;
|
|
402
|
+
} else {
|
|
403
|
+
t13 = $[41];
|
|
404
|
+
}
|
|
405
|
+
let t14;
|
|
406
|
+
if ($[42] !== plan.name || $[43] !== t10 || $[44] !== t13) {
|
|
407
|
+
t14 = <Text accessibilityRole="header" className={t10} style={t13}>{plan.name}</Text>;
|
|
408
|
+
$[42] = plan.name;
|
|
409
|
+
$[43] = t10;
|
|
410
|
+
$[44] = t13;
|
|
411
|
+
$[45] = t14;
|
|
412
|
+
} else {
|
|
413
|
+
t14 = $[45];
|
|
414
|
+
}
|
|
415
|
+
let t15;
|
|
416
|
+
if ($[46] !== t14 || $[47] !== t9) {
|
|
417
|
+
t15 = <View className="flex-row items-center gap-2">{t9}{t14}</View>;
|
|
418
|
+
$[46] = t14;
|
|
419
|
+
$[47] = t9;
|
|
420
|
+
$[48] = t15;
|
|
421
|
+
} else {
|
|
422
|
+
t15 = $[48];
|
|
423
|
+
}
|
|
424
|
+
let t16;
|
|
425
|
+
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
426
|
+
t16 = ["tabular-nums"];
|
|
427
|
+
$[49] = t16;
|
|
428
|
+
} else {
|
|
429
|
+
t16 = $[49];
|
|
430
|
+
}
|
|
431
|
+
let t17;
|
|
432
|
+
if ($[50] !== fg) {
|
|
433
|
+
t17 = {
|
|
434
|
+
color: fg,
|
|
435
|
+
fontSize: 48,
|
|
436
|
+
lineHeight: 52,
|
|
437
|
+
letterSpacing: -0.5,
|
|
438
|
+
fontVariant: t16
|
|
439
|
+
};
|
|
440
|
+
$[50] = fg;
|
|
441
|
+
$[51] = t17;
|
|
442
|
+
} else {
|
|
443
|
+
t17 = $[51];
|
|
444
|
+
}
|
|
445
|
+
let t18;
|
|
446
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
447
|
+
t18 = typeStyle("medium");
|
|
448
|
+
$[52] = t18;
|
|
449
|
+
} else {
|
|
450
|
+
t18 = $[52];
|
|
451
|
+
}
|
|
452
|
+
let t19;
|
|
453
|
+
if ($[53] !== t17) {
|
|
454
|
+
t19 = [t17, t18];
|
|
455
|
+
$[53] = t17;
|
|
456
|
+
$[54] = t19;
|
|
457
|
+
} else {
|
|
458
|
+
t19 = $[54];
|
|
459
|
+
}
|
|
460
|
+
const t20 = plan.price[period];
|
|
461
|
+
let t21;
|
|
462
|
+
if ($[55] !== t19 || $[56] !== t20) {
|
|
463
|
+
t21 = <Text className="font-instrument-sans-medium" style={t19}>{t20}</Text>;
|
|
464
|
+
$[55] = t19;
|
|
465
|
+
$[56] = t20;
|
|
466
|
+
$[57] = t21;
|
|
467
|
+
} else {
|
|
468
|
+
t21 = $[57];
|
|
469
|
+
}
|
|
470
|
+
let t22;
|
|
471
|
+
if ($[58] !== bodyText) {
|
|
472
|
+
t22 = cn("font-instrument-sans", bodyText);
|
|
473
|
+
$[58] = bodyText;
|
|
474
|
+
$[59] = t22;
|
|
475
|
+
} else {
|
|
476
|
+
t22 = $[59];
|
|
477
|
+
}
|
|
478
|
+
let t23;
|
|
479
|
+
if ($[60] !== muted) {
|
|
480
|
+
t23 = {
|
|
481
|
+
color: muted
|
|
482
|
+
};
|
|
483
|
+
$[60] = muted;
|
|
484
|
+
$[61] = t23;
|
|
485
|
+
} else {
|
|
486
|
+
t23 = $[61];
|
|
487
|
+
}
|
|
488
|
+
const t24 = plan.periodSuffix ?? "/month";
|
|
489
|
+
let t25;
|
|
490
|
+
if ($[62] !== t22 || $[63] !== t23 || $[64] !== t24) {
|
|
491
|
+
t25 = <Text className={t22} style={t23}>{t24}</Text>;
|
|
492
|
+
$[62] = t22;
|
|
493
|
+
$[63] = t23;
|
|
494
|
+
$[64] = t24;
|
|
495
|
+
$[65] = t25;
|
|
496
|
+
} else {
|
|
497
|
+
t25 = $[65];
|
|
498
|
+
}
|
|
499
|
+
let t26;
|
|
500
|
+
if ($[66] !== t21 || $[67] !== t25) {
|
|
501
|
+
t26 = <View className="mt-4 flex-row items-baseline gap-1">{t21}{t25}</View>;
|
|
502
|
+
$[66] = t21;
|
|
503
|
+
$[67] = t25;
|
|
504
|
+
$[68] = t26;
|
|
505
|
+
} else {
|
|
506
|
+
t26 = $[68];
|
|
507
|
+
}
|
|
508
|
+
let t27;
|
|
509
|
+
if ($[69] !== button || $[70] !== period || $[71] !== plan || $[72] !== renderCheckout) {
|
|
510
|
+
t27 = plan.current || !renderCheckout ? button : renderCheckout(button, plan, period);
|
|
511
|
+
$[69] = button;
|
|
512
|
+
$[70] = period;
|
|
513
|
+
$[71] = plan;
|
|
514
|
+
$[72] = renderCheckout;
|
|
515
|
+
$[73] = t27;
|
|
516
|
+
} else {
|
|
517
|
+
t27 = $[73];
|
|
518
|
+
}
|
|
519
|
+
let t28;
|
|
520
|
+
if ($[74] !== t27) {
|
|
521
|
+
t28 = <View className="mt-5">{t27}</View>;
|
|
522
|
+
$[74] = t27;
|
|
523
|
+
$[75] = t28;
|
|
524
|
+
} else {
|
|
525
|
+
t28 = $[75];
|
|
526
|
+
}
|
|
527
|
+
let t29;
|
|
528
|
+
if ($[76] !== bodyText || $[77] !== muted || $[78] !== plan.intro) {
|
|
529
|
+
t29 = plan.intro ? <Text className={cn("mt-6 font-instrument-sans", bodyText)} style={{
|
|
530
|
+
color: muted
|
|
531
|
+
}}>{plan.intro}</Text> : null;
|
|
532
|
+
$[76] = bodyText;
|
|
533
|
+
$[77] = muted;
|
|
534
|
+
$[78] = plan.intro;
|
|
535
|
+
$[79] = t29;
|
|
536
|
+
} else {
|
|
537
|
+
t29 = $[79];
|
|
538
|
+
}
|
|
539
|
+
let t30;
|
|
540
|
+
if ($[80] !== bodyText || $[81] !== fg || $[82] !== plan.highlight) {
|
|
541
|
+
t30 = plan.highlight ? <View className="mt-3"><Text className="font-instrument-sans-medium text-2xl" style={[{
|
|
542
|
+
color: fg
|
|
543
|
+
}, typeStyle("medium")]}>{plan.highlight.title}</Text><Text className={cn("font-instrument-sans", bodyText)} style={{
|
|
544
|
+
color: fg
|
|
545
|
+
}}>{plan.highlight.description}</Text></View> : null;
|
|
546
|
+
$[80] = bodyText;
|
|
547
|
+
$[81] = fg;
|
|
548
|
+
$[82] = plan.highlight;
|
|
549
|
+
$[83] = t30;
|
|
550
|
+
} else {
|
|
551
|
+
t30 = $[83];
|
|
552
|
+
}
|
|
553
|
+
let t31;
|
|
554
|
+
if ($[84] !== bodyText || $[85] !== fg || $[86] !== muted || $[87] !== plan.benefits || $[88] !== separator) {
|
|
555
|
+
t31 = plan.benefits?.length ? <View className="mt-5 gap-2.5 pt-4" style={{
|
|
556
|
+
borderTopWidth: StyleSheet.hairlineWidth,
|
|
557
|
+
borderTopColor: separator
|
|
558
|
+
}}>{plan.benefits.map((benefit, index) => {
|
|
559
|
+
const BenefitIcon = benefit.icon && benefit.icon !== "check" ? APP_ICONS[benefit.icon] : null;
|
|
560
|
+
return <View key={index} className="flex-row items-start gap-2.5"><View className="mt-1 h-4 w-5 items-center justify-center">{BenefitIcon ? <BenefitIcon size={14} color={benefit.muted ? muted : fg} /> : <IconCheck size={16} strokeWidth={2} color={benefit.muted ? muted : fg} />}</View><Text className={cn("min-w-0 flex-1 font-instrument-sans", bodyText)} style={{
|
|
561
|
+
color: benefit.muted ? muted : fg
|
|
562
|
+
}}>{benefit.label}</Text></View>;
|
|
563
|
+
})}</View> : null;
|
|
564
|
+
$[84] = bodyText;
|
|
565
|
+
$[85] = fg;
|
|
566
|
+
$[86] = muted;
|
|
567
|
+
$[87] = plan.benefits;
|
|
568
|
+
$[88] = separator;
|
|
569
|
+
$[89] = t31;
|
|
570
|
+
} else {
|
|
571
|
+
t31 = $[89];
|
|
572
|
+
}
|
|
573
|
+
t2 = <View className="p-5" style={t8}>{t15}{t26}{t28}{t29}{t30}{t31}{appBenefits?.length ? <View className="mt-4 gap-3 pt-3" style={{
|
|
574
|
+
borderTopWidth: StyleSheet.hairlineWidth,
|
|
575
|
+
borderTopColor: separator
|
|
576
|
+
}}>{sortAppBenefits(appBenefits, currentApp).map(group => {
|
|
577
|
+
const GroupIcon = APP_ICONS[group.app];
|
|
578
|
+
return <View key={group.app}><View className="flex-row items-center gap-2"><GroupIcon size={14} color={fg} /><Text className="font-instrument-sans-medium text-sm" style={[{
|
|
579
|
+
color: fg
|
|
580
|
+
}, typeStyle("medium")]}>{familyApp(group.app).name}</Text></View><View className="mt-1 gap-0.5 pl-[22px]">{group.items.map((item, index_0) => <Text key={index_0} className={cn("font-instrument-sans", bodyText)} style={{
|
|
581
|
+
color: fg
|
|
582
|
+
}}>{item}</Text>)}</View></View>;
|
|
583
|
+
})}</View> : null}</View>;
|
|
584
|
+
$[2] = currentApp;
|
|
585
|
+
$[3] = emphasised;
|
|
586
|
+
$[4] = fg;
|
|
587
|
+
$[5] = largerText;
|
|
588
|
+
$[6] = muted;
|
|
589
|
+
$[7] = onCheckout;
|
|
590
|
+
$[8] = period;
|
|
591
|
+
$[9] = plan;
|
|
592
|
+
$[10] = renderCheckout;
|
|
593
|
+
$[11] = scheme;
|
|
594
|
+
$[12] = separator;
|
|
595
|
+
$[13] = t2;
|
|
596
|
+
} else {
|
|
597
|
+
t2 = $[13];
|
|
598
|
+
}
|
|
599
|
+
return t2;
|
|
600
|
+
}
|
|
601
|
+
const styles = StyleSheet.create({
|
|
602
|
+
srOnly: {
|
|
603
|
+
position: "absolute",
|
|
604
|
+
width: 1,
|
|
605
|
+
height: 1,
|
|
606
|
+
opacity: 0
|
|
607
|
+
}
|
|
608
|
+
});
|