@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,925 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Pressable, ScrollView, Text, View } from "react-native";
|
|
4
|
+
import { IconArrowLeft, IconArrowRight, IconCheck, IconPencil } from "@tabler/icons-react-native";
|
|
5
|
+
import { Button } from "../Button";
|
|
6
|
+
import { Input } from "../Input";
|
|
7
|
+
import { buttonColors, sizeStyle, textStyle, trackingStyle, typeStyle } from "../controlStyles";
|
|
8
|
+
import { palette } from "../palette";
|
|
9
|
+
import { useLargerText } from "../theme";
|
|
10
|
+
import { tokens } from "../tokens";
|
|
11
|
+
import { useReduceMotion } from "../useReduceMotion";
|
|
12
|
+
import { useScheme } from "../useScheme";
|
|
13
|
+
import { chatTextSize } from "./chat-text";
|
|
14
|
+
|
|
15
|
+
/** One question, as an agent's AskUserQuestion sends it. */
|
|
16
|
+
|
|
17
|
+
const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
18
|
+
|
|
19
|
+
/** The structured answer for `onSubmit`. Exported for tests. */
|
|
20
|
+
export function choiceAnswers(questions, picked, other, otherOn) {
|
|
21
|
+
const result = {};
|
|
22
|
+
questions.forEach((question, index) => {
|
|
23
|
+
if (otherOn[index]) {
|
|
24
|
+
result[question.question] = (other[index] ?? "").trim();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const selected = picked[index] ?? [];
|
|
28
|
+
result[question.question] = question.multiSelect ? selected.join(", ") : selected[0] ?? "";
|
|
29
|
+
});
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* An agent's blocking multiple-choice question, as the web chat's question
|
|
35
|
+
* dock (`ChatQuestionDock` + `MultipleChoiceQuestion`): the question with its
|
|
36
|
+
* header badge and step count, lettered option rows with descriptions, an
|
|
37
|
+
* "Other..." row that opens a text field, then Back and Next or Submit. One
|
|
38
|
+
* question at a time.
|
|
39
|
+
*/
|
|
40
|
+
export function ChoiceQuestion(t0) {
|
|
41
|
+
const $ = _c(136);
|
|
42
|
+
const {
|
|
43
|
+
questions,
|
|
44
|
+
onSubmit,
|
|
45
|
+
loading: t1,
|
|
46
|
+
otherLabel: t2,
|
|
47
|
+
otherPlaceholder: t3,
|
|
48
|
+
framed: t4,
|
|
49
|
+
buttonWeight: t5
|
|
50
|
+
} = t0;
|
|
51
|
+
const loading = t1 === undefined ? false : t1;
|
|
52
|
+
const otherLabel = t2 === undefined ? "Other..." : t2;
|
|
53
|
+
const otherPlaceholder = t3 === undefined ? "Type your answer..." : t3;
|
|
54
|
+
const framed = t4 === undefined ? true : t4;
|
|
55
|
+
const buttonWeight = t5 === undefined ? "medium" : t5;
|
|
56
|
+
const scheme = useScheme();
|
|
57
|
+
const largerText = useLargerText();
|
|
58
|
+
const icon = largerText ? 18 : 15;
|
|
59
|
+
const buttonText = largerText ? "text-xl" : "text-sm";
|
|
60
|
+
let t6;
|
|
61
|
+
if ($[0] !== buttonText || $[1] !== buttonWeight || $[2] !== scheme) {
|
|
62
|
+
t6 = (text, variant) => buttonWeight === "medium" ? text : <Text className={`${buttonText} font-instrument-sans-semibold`} style={[sizeStyle(buttonText), typeStyle("semibold"), {
|
|
63
|
+
color: buttonColors(variant, scheme)?.color
|
|
64
|
+
}]}>{text}</Text>;
|
|
65
|
+
$[0] = buttonText;
|
|
66
|
+
$[1] = buttonWeight;
|
|
67
|
+
$[2] = scheme;
|
|
68
|
+
$[3] = t6;
|
|
69
|
+
} else {
|
|
70
|
+
t6 = $[3];
|
|
71
|
+
}
|
|
72
|
+
const buttonLabel = t6;
|
|
73
|
+
const [step, setStep] = useState(0);
|
|
74
|
+
let t7;
|
|
75
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
76
|
+
t7 = {};
|
|
77
|
+
$[4] = t7;
|
|
78
|
+
} else {
|
|
79
|
+
t7 = $[4];
|
|
80
|
+
}
|
|
81
|
+
const [picked, setPicked] = useState(t7);
|
|
82
|
+
let t8;
|
|
83
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
84
|
+
t8 = {};
|
|
85
|
+
$[5] = t8;
|
|
86
|
+
} else {
|
|
87
|
+
t8 = $[5];
|
|
88
|
+
}
|
|
89
|
+
const [other, setOther] = useState(t8);
|
|
90
|
+
let t9;
|
|
91
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
92
|
+
t9 = {};
|
|
93
|
+
$[6] = t9;
|
|
94
|
+
} else {
|
|
95
|
+
t9 = $[6];
|
|
96
|
+
}
|
|
97
|
+
const [otherOn, setOtherOn] = useState(t9);
|
|
98
|
+
const question = questions[step];
|
|
99
|
+
if (!question) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
const total = questions.length;
|
|
103
|
+
const isLast = step === total - 1;
|
|
104
|
+
let t10;
|
|
105
|
+
if ($[7] !== picked || $[8] !== step) {
|
|
106
|
+
t10 = picked[step] ?? [];
|
|
107
|
+
$[7] = picked;
|
|
108
|
+
$[8] = step;
|
|
109
|
+
$[9] = t10;
|
|
110
|
+
} else {
|
|
111
|
+
t10 = $[9];
|
|
112
|
+
}
|
|
113
|
+
const selected = t10;
|
|
114
|
+
let t11;
|
|
115
|
+
if ($[10] !== other || $[11] !== otherOn || $[12] !== selected || $[13] !== step) {
|
|
116
|
+
t11 = otherOn[step] ? (other[step] ?? "").trim() !== "" : selected.length > 0;
|
|
117
|
+
$[10] = other;
|
|
118
|
+
$[11] = otherOn;
|
|
119
|
+
$[12] = selected;
|
|
120
|
+
$[13] = step;
|
|
121
|
+
$[14] = t11;
|
|
122
|
+
} else {
|
|
123
|
+
t11 = $[14];
|
|
124
|
+
}
|
|
125
|
+
const hasAnswer = t11;
|
|
126
|
+
let t12;
|
|
127
|
+
if ($[15] !== otherOn || $[16] !== picked || $[17] !== question.multiSelect || $[18] !== selected || $[19] !== step) {
|
|
128
|
+
t12 = label => {
|
|
129
|
+
const next = question.multiSelect ? selected.includes(label) ? selected.filter(item => item !== label) : [...selected, label] : [label];
|
|
130
|
+
setPicked({
|
|
131
|
+
...picked,
|
|
132
|
+
[step]: next
|
|
133
|
+
});
|
|
134
|
+
setOtherOn({
|
|
135
|
+
...otherOn,
|
|
136
|
+
[step]: false
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
$[15] = otherOn;
|
|
140
|
+
$[16] = picked;
|
|
141
|
+
$[17] = question.multiSelect;
|
|
142
|
+
$[18] = selected;
|
|
143
|
+
$[19] = step;
|
|
144
|
+
$[20] = t12;
|
|
145
|
+
} else {
|
|
146
|
+
t12 = $[20];
|
|
147
|
+
}
|
|
148
|
+
const toggle = t12;
|
|
149
|
+
let t13;
|
|
150
|
+
if ($[21] !== hasAnswer || $[22] !== isLast || $[23] !== loading || $[24] !== onSubmit || $[25] !== other || $[26] !== otherOn || $[27] !== picked || $[28] !== questions || $[29] !== step) {
|
|
151
|
+
t13 = () => {
|
|
152
|
+
if (!hasAnswer || loading) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (isLast) {
|
|
156
|
+
onSubmit(choiceAnswers(questions, picked, other, otherOn));
|
|
157
|
+
} else {
|
|
158
|
+
setStep(step + 1);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
$[21] = hasAnswer;
|
|
162
|
+
$[22] = isLast;
|
|
163
|
+
$[23] = loading;
|
|
164
|
+
$[24] = onSubmit;
|
|
165
|
+
$[25] = other;
|
|
166
|
+
$[26] = otherOn;
|
|
167
|
+
$[27] = picked;
|
|
168
|
+
$[28] = questions;
|
|
169
|
+
$[29] = step;
|
|
170
|
+
$[30] = t13;
|
|
171
|
+
} else {
|
|
172
|
+
t13 = $[30];
|
|
173
|
+
}
|
|
174
|
+
const next_0 = t13;
|
|
175
|
+
let t14;
|
|
176
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
177
|
+
t14 = {
|
|
178
|
+
gap: 16
|
|
179
|
+
};
|
|
180
|
+
$[31] = t14;
|
|
181
|
+
} else {
|
|
182
|
+
t14 = $[31];
|
|
183
|
+
}
|
|
184
|
+
let t15;
|
|
185
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
186
|
+
t15 = {
|
|
187
|
+
gap: 8
|
|
188
|
+
};
|
|
189
|
+
$[32] = t15;
|
|
190
|
+
} else {
|
|
191
|
+
t15 = $[32];
|
|
192
|
+
}
|
|
193
|
+
const t16 = largerText ? 18 : 15;
|
|
194
|
+
const t17 = largerText ? 24 : 20.625;
|
|
195
|
+
let t18;
|
|
196
|
+
if ($[33] !== t16 || $[34] !== t17) {
|
|
197
|
+
t18 = {
|
|
198
|
+
fontSize: t16,
|
|
199
|
+
lineHeight: t17
|
|
200
|
+
};
|
|
201
|
+
$[33] = t16;
|
|
202
|
+
$[34] = t17;
|
|
203
|
+
$[35] = t18;
|
|
204
|
+
} else {
|
|
205
|
+
t18 = $[35];
|
|
206
|
+
}
|
|
207
|
+
let t19;
|
|
208
|
+
if ($[36] !== scheme) {
|
|
209
|
+
t19 = textStyle("foreground", scheme);
|
|
210
|
+
$[36] = scheme;
|
|
211
|
+
$[37] = t19;
|
|
212
|
+
} else {
|
|
213
|
+
t19 = $[37];
|
|
214
|
+
}
|
|
215
|
+
let t20;
|
|
216
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
217
|
+
t20 = typeStyle("semibold");
|
|
218
|
+
$[38] = t20;
|
|
219
|
+
} else {
|
|
220
|
+
t20 = $[38];
|
|
221
|
+
}
|
|
222
|
+
let t21;
|
|
223
|
+
if ($[39] !== t18 || $[40] !== t19) {
|
|
224
|
+
t21 = [t18, t19, t20];
|
|
225
|
+
$[39] = t18;
|
|
226
|
+
$[40] = t19;
|
|
227
|
+
$[41] = t21;
|
|
228
|
+
} else {
|
|
229
|
+
t21 = $[41];
|
|
230
|
+
}
|
|
231
|
+
let t22;
|
|
232
|
+
if ($[42] !== question.question || $[43] !== t21) {
|
|
233
|
+
t22 = <Text className="flex-1 font-instrument-sans-semibold" style={t21}>{question.question}</Text>;
|
|
234
|
+
$[42] = question.question;
|
|
235
|
+
$[43] = t21;
|
|
236
|
+
$[44] = t22;
|
|
237
|
+
} else {
|
|
238
|
+
t22 = $[44];
|
|
239
|
+
}
|
|
240
|
+
let t23;
|
|
241
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
242
|
+
t23 = {
|
|
243
|
+
gap: 6
|
|
244
|
+
};
|
|
245
|
+
$[45] = t23;
|
|
246
|
+
} else {
|
|
247
|
+
t23 = $[45];
|
|
248
|
+
}
|
|
249
|
+
let t24;
|
|
250
|
+
if ($[46] !== question.header) {
|
|
251
|
+
t24 = question.header ? <TopicBadge>{question.header}</TopicBadge> : null;
|
|
252
|
+
$[46] = question.header;
|
|
253
|
+
$[47] = t24;
|
|
254
|
+
} else {
|
|
255
|
+
t24 = $[47];
|
|
256
|
+
}
|
|
257
|
+
let t25;
|
|
258
|
+
if ($[48] !== largerText || $[49] !== scheme || $[50] !== step || $[51] !== total) {
|
|
259
|
+
t25 = total > 1 ? <Text className="font-instrument-sans-medium" style={[sizeStyle(chatTextSize("caption", largerText)), textStyle("muted", scheme), typeStyle("medium")]}>{`${step + 1}/${total}`}</Text> : null;
|
|
260
|
+
$[48] = largerText;
|
|
261
|
+
$[49] = scheme;
|
|
262
|
+
$[50] = step;
|
|
263
|
+
$[51] = total;
|
|
264
|
+
$[52] = t25;
|
|
265
|
+
} else {
|
|
266
|
+
t25 = $[52];
|
|
267
|
+
}
|
|
268
|
+
let t26;
|
|
269
|
+
if ($[53] !== t24 || $[54] !== t25) {
|
|
270
|
+
t26 = <View className="flex-row items-center" style={t23}>{t24}{t25}</View>;
|
|
271
|
+
$[53] = t24;
|
|
272
|
+
$[54] = t25;
|
|
273
|
+
$[55] = t26;
|
|
274
|
+
} else {
|
|
275
|
+
t26 = $[55];
|
|
276
|
+
}
|
|
277
|
+
let t27;
|
|
278
|
+
if ($[56] !== t22 || $[57] !== t26) {
|
|
279
|
+
t27 = <View className="flex-row items-center justify-between" style={t15}>{t22}{t26}</View>;
|
|
280
|
+
$[56] = t22;
|
|
281
|
+
$[57] = t26;
|
|
282
|
+
$[58] = t27;
|
|
283
|
+
} else {
|
|
284
|
+
t27 = $[58];
|
|
285
|
+
}
|
|
286
|
+
let t28;
|
|
287
|
+
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
288
|
+
t28 = {
|
|
289
|
+
gap: 4
|
|
290
|
+
};
|
|
291
|
+
$[59] = t28;
|
|
292
|
+
} else {
|
|
293
|
+
t28 = $[59];
|
|
294
|
+
}
|
|
295
|
+
let t29;
|
|
296
|
+
if ($[60] !== loading || $[61] !== otherOn || $[62] !== question.multiSelect || $[63] !== question.options || $[64] !== selected || $[65] !== step || $[66] !== toggle) {
|
|
297
|
+
let t30;
|
|
298
|
+
if ($[68] !== loading || $[69] !== otherOn || $[70] !== question.multiSelect || $[71] !== selected || $[72] !== step || $[73] !== toggle) {
|
|
299
|
+
t30 = (option, index) => <ChoiceRow key={`${option.label}-${index}`} selected={!otherOn[step] && selected.includes(option.label)} disabled={loading} multiple={question.multiSelect} mark={LETTERS[index] ?? String(index + 1)} label={option.label} description={option.description} onPress={() => toggle(option.label)} />;
|
|
300
|
+
$[68] = loading;
|
|
301
|
+
$[69] = otherOn;
|
|
302
|
+
$[70] = question.multiSelect;
|
|
303
|
+
$[71] = selected;
|
|
304
|
+
$[72] = step;
|
|
305
|
+
$[73] = toggle;
|
|
306
|
+
$[74] = t30;
|
|
307
|
+
} else {
|
|
308
|
+
t30 = $[74];
|
|
309
|
+
}
|
|
310
|
+
t29 = question.options.map(t30);
|
|
311
|
+
$[60] = loading;
|
|
312
|
+
$[61] = otherOn;
|
|
313
|
+
$[62] = question.multiSelect;
|
|
314
|
+
$[63] = question.options;
|
|
315
|
+
$[64] = selected;
|
|
316
|
+
$[65] = step;
|
|
317
|
+
$[66] = toggle;
|
|
318
|
+
$[67] = t29;
|
|
319
|
+
} else {
|
|
320
|
+
t29 = $[67];
|
|
321
|
+
}
|
|
322
|
+
const t30 = otherOn[step] ?? false;
|
|
323
|
+
let t31;
|
|
324
|
+
if ($[75] !== otherOn || $[76] !== picked || $[77] !== step) {
|
|
325
|
+
t31 = () => {
|
|
326
|
+
setOtherOn({
|
|
327
|
+
...otherOn,
|
|
328
|
+
[step]: true
|
|
329
|
+
});
|
|
330
|
+
setPicked({
|
|
331
|
+
...picked,
|
|
332
|
+
[step]: []
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
$[75] = otherOn;
|
|
336
|
+
$[76] = picked;
|
|
337
|
+
$[77] = step;
|
|
338
|
+
$[78] = t31;
|
|
339
|
+
} else {
|
|
340
|
+
t31 = $[78];
|
|
341
|
+
}
|
|
342
|
+
let t32;
|
|
343
|
+
if ($[79] !== hasAnswer || $[80] !== isLast || $[81] !== loading || $[82] !== next_0 || $[83] !== other || $[84] !== otherOn || $[85] !== otherPlaceholder || $[86] !== step) {
|
|
344
|
+
t32 = otherOn[step] ? <View style={{
|
|
345
|
+
marginTop: 8,
|
|
346
|
+
marginLeft: 36
|
|
347
|
+
}}><Input value={other[step] ?? ""} onChangeText={text_0 => setOther({
|
|
348
|
+
...other,
|
|
349
|
+
[step]: text_0
|
|
350
|
+
})} placeholder={otherPlaceholder} editable={!loading} autoFocus={true} returnKeyType={isLast ? "send" : "next"} submitBehavior={isLast && hasAnswer ? "blurAndSubmit" : "submit"} onSubmitEditing={next_0} /></View> : null;
|
|
351
|
+
$[79] = hasAnswer;
|
|
352
|
+
$[80] = isLast;
|
|
353
|
+
$[81] = loading;
|
|
354
|
+
$[82] = next_0;
|
|
355
|
+
$[83] = other;
|
|
356
|
+
$[84] = otherOn;
|
|
357
|
+
$[85] = otherPlaceholder;
|
|
358
|
+
$[86] = step;
|
|
359
|
+
$[87] = t32;
|
|
360
|
+
} else {
|
|
361
|
+
t32 = $[87];
|
|
362
|
+
}
|
|
363
|
+
let t33;
|
|
364
|
+
if ($[88] !== loading || $[89] !== otherLabel || $[90] !== question.multiSelect || $[91] !== t30 || $[92] !== t31 || $[93] !== t32) {
|
|
365
|
+
t33 = <ChoiceRow selected={t30} disabled={loading} multiple={question.multiSelect} mark="other" label={otherLabel} onPress={t31}>{t32}</ChoiceRow>;
|
|
366
|
+
$[88] = loading;
|
|
367
|
+
$[89] = otherLabel;
|
|
368
|
+
$[90] = question.multiSelect;
|
|
369
|
+
$[91] = t30;
|
|
370
|
+
$[92] = t31;
|
|
371
|
+
$[93] = t32;
|
|
372
|
+
$[94] = t33;
|
|
373
|
+
} else {
|
|
374
|
+
t33 = $[94];
|
|
375
|
+
}
|
|
376
|
+
let t34;
|
|
377
|
+
if ($[95] !== t29 || $[96] !== t33) {
|
|
378
|
+
t34 = <View style={t28}>{t29}{t33}</View>;
|
|
379
|
+
$[95] = t29;
|
|
380
|
+
$[96] = t33;
|
|
381
|
+
$[97] = t34;
|
|
382
|
+
} else {
|
|
383
|
+
t34 = $[97];
|
|
384
|
+
}
|
|
385
|
+
let t35;
|
|
386
|
+
if ($[98] === Symbol.for("react.memo_cache_sentinel")) {
|
|
387
|
+
t35 = {
|
|
388
|
+
gap: 8
|
|
389
|
+
};
|
|
390
|
+
$[98] = t35;
|
|
391
|
+
} else {
|
|
392
|
+
t35 = $[98];
|
|
393
|
+
}
|
|
394
|
+
let t36;
|
|
395
|
+
if ($[99] !== buttonLabel || $[100] !== icon || $[101] !== loading || $[102] !== scheme || $[103] !== step || $[104] !== total) {
|
|
396
|
+
t36 = total > 1 && step > 0 ? <View className="flex-1"><Button variant="ghost" disabled={loading} onPress={() => setStep(step - 1)} startContent={<IconArrowLeft size={icon} strokeWidth={2.5} color={tokens.color.foreground[scheme]} />} accessibilityLabel="Back">{buttonLabel("Back", "ghost")}</Button></View> : null;
|
|
397
|
+
$[99] = buttonLabel;
|
|
398
|
+
$[100] = icon;
|
|
399
|
+
$[101] = loading;
|
|
400
|
+
$[102] = scheme;
|
|
401
|
+
$[103] = step;
|
|
402
|
+
$[104] = total;
|
|
403
|
+
$[105] = t36;
|
|
404
|
+
} else {
|
|
405
|
+
t36 = $[105];
|
|
406
|
+
}
|
|
407
|
+
const t37 = !hasAnswer;
|
|
408
|
+
const t38 = isLast ? "Submit" : "Next";
|
|
409
|
+
let t39;
|
|
410
|
+
if ($[106] !== icon || $[107] !== loading || $[108] !== scheme) {
|
|
411
|
+
t39 = loading ? null : <IconArrowRight size={icon} strokeWidth={2.5} color={palette.primaryForeground[scheme]} />;
|
|
412
|
+
$[106] = icon;
|
|
413
|
+
$[107] = loading;
|
|
414
|
+
$[108] = scheme;
|
|
415
|
+
$[109] = t39;
|
|
416
|
+
} else {
|
|
417
|
+
t39 = $[109];
|
|
418
|
+
}
|
|
419
|
+
const t40 = isLast ? "Submit" : "Next";
|
|
420
|
+
let t41;
|
|
421
|
+
if ($[110] !== buttonLabel || $[111] !== t40) {
|
|
422
|
+
t41 = buttonLabel(t40, "primary");
|
|
423
|
+
$[110] = buttonLabel;
|
|
424
|
+
$[111] = t40;
|
|
425
|
+
$[112] = t41;
|
|
426
|
+
} else {
|
|
427
|
+
t41 = $[112];
|
|
428
|
+
}
|
|
429
|
+
let t42;
|
|
430
|
+
if ($[113] !== loading || $[114] !== next_0 || $[115] !== t37 || $[116] !== t38 || $[117] !== t39 || $[118] !== t41) {
|
|
431
|
+
t42 = <View className="flex-1"><Button disabled={t37} loading={loading} onPress={next_0} accessibilityLabel={t38} endContent={t39}>{t41}</Button></View>;
|
|
432
|
+
$[113] = loading;
|
|
433
|
+
$[114] = next_0;
|
|
434
|
+
$[115] = t37;
|
|
435
|
+
$[116] = t38;
|
|
436
|
+
$[117] = t39;
|
|
437
|
+
$[118] = t41;
|
|
438
|
+
$[119] = t42;
|
|
439
|
+
} else {
|
|
440
|
+
t42 = $[119];
|
|
441
|
+
}
|
|
442
|
+
let t43;
|
|
443
|
+
if ($[120] !== t36 || $[121] !== t42) {
|
|
444
|
+
t43 = <View className="flex-row items-center" style={t35}>{t36}{t42}</View>;
|
|
445
|
+
$[120] = t36;
|
|
446
|
+
$[121] = t42;
|
|
447
|
+
$[122] = t43;
|
|
448
|
+
} else {
|
|
449
|
+
t43 = $[122];
|
|
450
|
+
}
|
|
451
|
+
let t44;
|
|
452
|
+
if ($[123] !== t27 || $[124] !== t34 || $[125] !== t43) {
|
|
453
|
+
t44 = <View style={t14}>{t27}{t34}{t43}</View>;
|
|
454
|
+
$[123] = t27;
|
|
455
|
+
$[124] = t34;
|
|
456
|
+
$[125] = t43;
|
|
457
|
+
$[126] = t44;
|
|
458
|
+
} else {
|
|
459
|
+
t44 = $[126];
|
|
460
|
+
}
|
|
461
|
+
const body = t44;
|
|
462
|
+
if (!framed) {
|
|
463
|
+
return body;
|
|
464
|
+
}
|
|
465
|
+
const t45 = tokens.color.surface[scheme];
|
|
466
|
+
let t46;
|
|
467
|
+
if ($[127] !== t45) {
|
|
468
|
+
t46 = {
|
|
469
|
+
borderRadius: tokens.radius.lg,
|
|
470
|
+
backgroundColor: t45,
|
|
471
|
+
overflow: "hidden"
|
|
472
|
+
};
|
|
473
|
+
$[127] = t45;
|
|
474
|
+
$[128] = t46;
|
|
475
|
+
} else {
|
|
476
|
+
t46 = $[128];
|
|
477
|
+
}
|
|
478
|
+
let t47;
|
|
479
|
+
let t48;
|
|
480
|
+
if ($[129] === Symbol.for("react.memo_cache_sentinel")) {
|
|
481
|
+
t47 = {
|
|
482
|
+
maxHeight: 544
|
|
483
|
+
};
|
|
484
|
+
t48 = {
|
|
485
|
+
padding: 12
|
|
486
|
+
};
|
|
487
|
+
$[129] = t47;
|
|
488
|
+
$[130] = t48;
|
|
489
|
+
} else {
|
|
490
|
+
t47 = $[129];
|
|
491
|
+
t48 = $[130];
|
|
492
|
+
}
|
|
493
|
+
let t49;
|
|
494
|
+
if ($[131] !== body) {
|
|
495
|
+
t49 = <ScrollView style={t47} contentContainerStyle={t48} keyboardShouldPersistTaps="handled">{body}</ScrollView>;
|
|
496
|
+
$[131] = body;
|
|
497
|
+
$[132] = t49;
|
|
498
|
+
} else {
|
|
499
|
+
t49 = $[132];
|
|
500
|
+
}
|
|
501
|
+
let t50;
|
|
502
|
+
if ($[133] !== t46 || $[134] !== t49) {
|
|
503
|
+
t50 = <View style={t46}>{t49}</View>;
|
|
504
|
+
$[133] = t46;
|
|
505
|
+
$[134] = t49;
|
|
506
|
+
$[135] = t50;
|
|
507
|
+
} else {
|
|
508
|
+
t50 = $[135];
|
|
509
|
+
}
|
|
510
|
+
return t50;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* The question's topic, the web `Badge variant="secondary"` with Eva's
|
|
515
|
+
* `text-3xs font-semibold` (10 / 14, 600) in a `px-2.5 py-0.5` pill. Drawn here
|
|
516
|
+
* because `Badge` sets its own size and weight.
|
|
517
|
+
*/
|
|
518
|
+
function TopicBadge(t0) {
|
|
519
|
+
const $ = _c(15);
|
|
520
|
+
const {
|
|
521
|
+
children
|
|
522
|
+
} = t0;
|
|
523
|
+
const scheme = useScheme();
|
|
524
|
+
const largerText = useLargerText();
|
|
525
|
+
const fontSize = largerText ? 14 : 10;
|
|
526
|
+
const t1 = palette.default[scheme];
|
|
527
|
+
let t2;
|
|
528
|
+
if ($[0] !== t1) {
|
|
529
|
+
t2 = {
|
|
530
|
+
backgroundColor: t1,
|
|
531
|
+
borderRadius: tokens.radius.pill
|
|
532
|
+
};
|
|
533
|
+
$[0] = t1;
|
|
534
|
+
$[1] = t2;
|
|
535
|
+
} else {
|
|
536
|
+
t2 = $[1];
|
|
537
|
+
}
|
|
538
|
+
const t3 = largerText ? 20 : 14;
|
|
539
|
+
const t4 = palette.defaultForeground[scheme];
|
|
540
|
+
let t5;
|
|
541
|
+
if ($[2] !== fontSize || $[3] !== t3 || $[4] !== t4) {
|
|
542
|
+
t5 = {
|
|
543
|
+
fontSize,
|
|
544
|
+
lineHeight: t3,
|
|
545
|
+
color: t4
|
|
546
|
+
};
|
|
547
|
+
$[2] = fontSize;
|
|
548
|
+
$[3] = t3;
|
|
549
|
+
$[4] = t4;
|
|
550
|
+
$[5] = t5;
|
|
551
|
+
} else {
|
|
552
|
+
t5 = $[5];
|
|
553
|
+
}
|
|
554
|
+
let t6;
|
|
555
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
556
|
+
t6 = typeStyle("semibold");
|
|
557
|
+
$[6] = t6;
|
|
558
|
+
} else {
|
|
559
|
+
t6 = $[6];
|
|
560
|
+
}
|
|
561
|
+
let t7;
|
|
562
|
+
if ($[7] !== t5) {
|
|
563
|
+
t7 = [t5, t6];
|
|
564
|
+
$[7] = t5;
|
|
565
|
+
$[8] = t7;
|
|
566
|
+
} else {
|
|
567
|
+
t7 = $[8];
|
|
568
|
+
}
|
|
569
|
+
let t8;
|
|
570
|
+
if ($[9] !== children || $[10] !== t7) {
|
|
571
|
+
t8 = <Text numberOfLines={1} className="font-instrument-sans-semibold" style={t7}>{children}</Text>;
|
|
572
|
+
$[9] = children;
|
|
573
|
+
$[10] = t7;
|
|
574
|
+
$[11] = t8;
|
|
575
|
+
} else {
|
|
576
|
+
t8 = $[11];
|
|
577
|
+
}
|
|
578
|
+
let t9;
|
|
579
|
+
if ($[12] !== t2 || $[13] !== t8) {
|
|
580
|
+
t9 = <View className="rounded-full px-2.5 py-0.5" style={t2}>{t8}</View>;
|
|
581
|
+
$[12] = t2;
|
|
582
|
+
$[13] = t8;
|
|
583
|
+
$[14] = t9;
|
|
584
|
+
} else {
|
|
585
|
+
t9 = $[14];
|
|
586
|
+
}
|
|
587
|
+
return t9;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** The option card's `py-2 px-2.5`, which is also the slop of its press target. */
|
|
591
|
+
const CARD_PADDING = {
|
|
592
|
+
top: 8,
|
|
593
|
+
bottom: 8,
|
|
594
|
+
left: 10,
|
|
595
|
+
right: 10
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
/** A whole card is at least a 44 target: the press target inside is this much less its slop. */
|
|
599
|
+
const CARD_MIN_HEIGHT = 44;
|
|
600
|
+
|
|
601
|
+
/** The card while pressed: the kit 3% press scale, or a dim with Reduce Motion. */
|
|
602
|
+
export function choicePressStyle(pressed, reduceMotion) {
|
|
603
|
+
if (!pressed) return null;
|
|
604
|
+
return reduceMotion ? {
|
|
605
|
+
opacity: 0.8
|
|
606
|
+
} : {
|
|
607
|
+
transform: [{
|
|
608
|
+
scale: 0.97
|
|
609
|
+
}]
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* One option row (web `Card` with `bg-secondary`, `py-2 px-2.5`, radius 16): a round 24 mark
|
|
615
|
+
* (30 with larger text; letter, or a pencil for "Other"; a check on the primary fill when picked),
|
|
616
|
+
* the label and the description. Picked: a 1-wide primary ring outside, on the accent.
|
|
617
|
+
*/
|
|
618
|
+
function ChoiceRow(t0) {
|
|
619
|
+
const $ = _c(99);
|
|
620
|
+
const {
|
|
621
|
+
selected,
|
|
622
|
+
disabled,
|
|
623
|
+
multiple,
|
|
624
|
+
mark,
|
|
625
|
+
label,
|
|
626
|
+
description,
|
|
627
|
+
onPress,
|
|
628
|
+
children
|
|
629
|
+
} = t0;
|
|
630
|
+
const scheme = useScheme();
|
|
631
|
+
const largerText = useLargerText();
|
|
632
|
+
const reduceMotion = useReduceMotion();
|
|
633
|
+
const [pressed, setPressed] = useState(false);
|
|
634
|
+
const muted = tokens.color.muted[scheme];
|
|
635
|
+
const markSize = largerText ? 30 : 24;
|
|
636
|
+
const markText = largerText ? 14 : 11;
|
|
637
|
+
const glyph = largerText ? 16 : 13;
|
|
638
|
+
let T0;
|
|
639
|
+
let T1;
|
|
640
|
+
let T2;
|
|
641
|
+
let t1;
|
|
642
|
+
let t10;
|
|
643
|
+
let t11;
|
|
644
|
+
let t12;
|
|
645
|
+
let t13;
|
|
646
|
+
let t14;
|
|
647
|
+
let t15;
|
|
648
|
+
let t16;
|
|
649
|
+
let t2;
|
|
650
|
+
let t3;
|
|
651
|
+
let t4;
|
|
652
|
+
let t5;
|
|
653
|
+
let t6;
|
|
654
|
+
let t7;
|
|
655
|
+
let t8;
|
|
656
|
+
let t9;
|
|
657
|
+
if ($[0] !== description || $[1] !== disabled || $[2] !== glyph || $[3] !== label || $[4] !== largerText || $[5] !== mark || $[6] !== markSize || $[7] !== markText || $[8] !== multiple || $[9] !== muted || $[10] !== onPress || $[11] !== pressed || $[12] !== reduceMotion || $[13] !== scheme || $[14] !== selected) {
|
|
658
|
+
const small = chatTextSize("small", largerText);
|
|
659
|
+
const plain = mark === "other" && !selected;
|
|
660
|
+
const labelLine = largerText ? sizeStyle(small, "snug") : {
|
|
661
|
+
...sizeStyle(small, "snug"),
|
|
662
|
+
lineHeight: 24
|
|
663
|
+
};
|
|
664
|
+
T2 = View;
|
|
665
|
+
const t17 = selected ? tokens.color.background[scheme] : palette.default[scheme];
|
|
666
|
+
const t18 = disabled ? 0.5 : 1;
|
|
667
|
+
let t19;
|
|
668
|
+
if ($[34] !== t17 || $[35] !== t18) {
|
|
669
|
+
t19 = {
|
|
670
|
+
borderRadius: tokens.radius.lg,
|
|
671
|
+
backgroundColor: t17,
|
|
672
|
+
opacity: t18,
|
|
673
|
+
paddingVertical: CARD_PADDING.top,
|
|
674
|
+
paddingHorizontal: CARD_PADDING.left
|
|
675
|
+
};
|
|
676
|
+
$[34] = t17;
|
|
677
|
+
$[35] = t18;
|
|
678
|
+
$[36] = t19;
|
|
679
|
+
} else {
|
|
680
|
+
t19 = $[36];
|
|
681
|
+
}
|
|
682
|
+
const t20 = pressed && !disabled;
|
|
683
|
+
let t21;
|
|
684
|
+
if ($[37] !== reduceMotion || $[38] !== t20) {
|
|
685
|
+
t21 = choicePressStyle(t20, reduceMotion);
|
|
686
|
+
$[37] = reduceMotion;
|
|
687
|
+
$[38] = t20;
|
|
688
|
+
$[39] = t21;
|
|
689
|
+
} else {
|
|
690
|
+
t21 = $[39];
|
|
691
|
+
}
|
|
692
|
+
if ($[40] !== t19 || $[41] !== t21) {
|
|
693
|
+
t15 = [t19, t21];
|
|
694
|
+
$[40] = t19;
|
|
695
|
+
$[41] = t21;
|
|
696
|
+
$[42] = t15;
|
|
697
|
+
} else {
|
|
698
|
+
t15 = $[42];
|
|
699
|
+
}
|
|
700
|
+
if ($[43] !== scheme || $[44] !== selected) {
|
|
701
|
+
t16 = selected ? <View pointerEvents="none" style={{
|
|
702
|
+
position: "absolute",
|
|
703
|
+
top: -1,
|
|
704
|
+
left: -1,
|
|
705
|
+
right: -1,
|
|
706
|
+
bottom: -1,
|
|
707
|
+
borderRadius: tokens.radius.lg + 1,
|
|
708
|
+
borderWidth: 1,
|
|
709
|
+
borderColor: palette.primary[scheme]
|
|
710
|
+
}} /> : null;
|
|
711
|
+
$[43] = scheme;
|
|
712
|
+
$[44] = selected;
|
|
713
|
+
$[45] = t16;
|
|
714
|
+
} else {
|
|
715
|
+
t16 = $[45];
|
|
716
|
+
}
|
|
717
|
+
T1 = Pressable;
|
|
718
|
+
t3 = multiple ? "checkbox" : "radio";
|
|
719
|
+
t4 = label;
|
|
720
|
+
t5 = description || undefined;
|
|
721
|
+
if ($[46] !== disabled || $[47] !== selected) {
|
|
722
|
+
t6 = {
|
|
723
|
+
checked: selected,
|
|
724
|
+
disabled
|
|
725
|
+
};
|
|
726
|
+
$[46] = disabled;
|
|
727
|
+
$[47] = selected;
|
|
728
|
+
$[48] = t6;
|
|
729
|
+
} else {
|
|
730
|
+
t6 = $[48];
|
|
731
|
+
}
|
|
732
|
+
t7 = disabled;
|
|
733
|
+
t8 = CARD_PADDING;
|
|
734
|
+
t9 = onPress;
|
|
735
|
+
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
736
|
+
t10 = () => setPressed(true);
|
|
737
|
+
t11 = () => setPressed(false);
|
|
738
|
+
$[49] = t10;
|
|
739
|
+
$[50] = t11;
|
|
740
|
+
} else {
|
|
741
|
+
t10 = $[49];
|
|
742
|
+
t11 = $[50];
|
|
743
|
+
}
|
|
744
|
+
t12 = "flex-row";
|
|
745
|
+
const t22 = description ? "flex-start" : "center";
|
|
746
|
+
if ($[51] !== t22) {
|
|
747
|
+
t13 = {
|
|
748
|
+
gap: 12,
|
|
749
|
+
alignItems: t22,
|
|
750
|
+
minHeight: CARD_MIN_HEIGHT - CARD_PADDING.top - CARD_PADDING.bottom
|
|
751
|
+
};
|
|
752
|
+
$[51] = t22;
|
|
753
|
+
$[52] = t13;
|
|
754
|
+
} else {
|
|
755
|
+
t13 = $[52];
|
|
756
|
+
}
|
|
757
|
+
const t23 = markSize / 2;
|
|
758
|
+
const t24 = description ? 2 : 0;
|
|
759
|
+
const t25 = selected ? palette.primary[scheme] : palette.default[scheme];
|
|
760
|
+
let t26;
|
|
761
|
+
if ($[53] !== markSize || $[54] !== t23 || $[55] !== t24 || $[56] !== t25) {
|
|
762
|
+
t26 = {
|
|
763
|
+
width: markSize,
|
|
764
|
+
height: markSize,
|
|
765
|
+
borderRadius: t23,
|
|
766
|
+
marginTop: t24,
|
|
767
|
+
alignItems: "center",
|
|
768
|
+
justifyContent: "center",
|
|
769
|
+
backgroundColor: t25
|
|
770
|
+
};
|
|
771
|
+
$[53] = markSize;
|
|
772
|
+
$[54] = t23;
|
|
773
|
+
$[55] = t24;
|
|
774
|
+
$[56] = t25;
|
|
775
|
+
$[57] = t26;
|
|
776
|
+
} else {
|
|
777
|
+
t26 = $[57];
|
|
778
|
+
}
|
|
779
|
+
let t27;
|
|
780
|
+
if ($[58] !== glyph || $[59] !== largerText || $[60] !== mark || $[61] !== markText || $[62] !== muted || $[63] !== scheme || $[64] !== selected) {
|
|
781
|
+
t27 = selected ? <IconCheck size={glyph} strokeWidth={3} color={palette.primaryForeground[scheme]} /> : mark === "other" ? <IconPencil size={glyph} color={muted} /> : <Text className="font-instrument-sans-semibold" style={[{
|
|
782
|
+
fontSize: markText,
|
|
783
|
+
lineHeight: largerText ? 20 : 16,
|
|
784
|
+
color: muted
|
|
785
|
+
}, trackingStyle(markText, "wide"), typeStyle("semibold")]}>{mark}</Text>;
|
|
786
|
+
$[58] = glyph;
|
|
787
|
+
$[59] = largerText;
|
|
788
|
+
$[60] = mark;
|
|
789
|
+
$[61] = markText;
|
|
790
|
+
$[62] = muted;
|
|
791
|
+
$[63] = scheme;
|
|
792
|
+
$[64] = selected;
|
|
793
|
+
$[65] = t27;
|
|
794
|
+
} else {
|
|
795
|
+
t27 = $[65];
|
|
796
|
+
}
|
|
797
|
+
if ($[66] !== t26 || $[67] !== t27) {
|
|
798
|
+
t14 = <View style={t26}>{t27}</View>;
|
|
799
|
+
$[66] = t26;
|
|
800
|
+
$[67] = t27;
|
|
801
|
+
$[68] = t14;
|
|
802
|
+
} else {
|
|
803
|
+
t14 = $[68];
|
|
804
|
+
}
|
|
805
|
+
T0 = View;
|
|
806
|
+
t1 = "min-w-0 flex-1";
|
|
807
|
+
t2 = plain ? <Text className="font-instrument-sans" style={[sizeStyle(small), {
|
|
808
|
+
color: muted
|
|
809
|
+
}]}>{label}</Text> : <Text className="font-instrument-sans-medium" style={[labelLine, typeStyle("medium"), {
|
|
810
|
+
color: selected ? palette.primary[scheme] : muted
|
|
811
|
+
}]}>{label}</Text>;
|
|
812
|
+
$[0] = description;
|
|
813
|
+
$[1] = disabled;
|
|
814
|
+
$[2] = glyph;
|
|
815
|
+
$[3] = label;
|
|
816
|
+
$[4] = largerText;
|
|
817
|
+
$[5] = mark;
|
|
818
|
+
$[6] = markSize;
|
|
819
|
+
$[7] = markText;
|
|
820
|
+
$[8] = multiple;
|
|
821
|
+
$[9] = muted;
|
|
822
|
+
$[10] = onPress;
|
|
823
|
+
$[11] = pressed;
|
|
824
|
+
$[12] = reduceMotion;
|
|
825
|
+
$[13] = scheme;
|
|
826
|
+
$[14] = selected;
|
|
827
|
+
$[15] = T0;
|
|
828
|
+
$[16] = T1;
|
|
829
|
+
$[17] = T2;
|
|
830
|
+
$[18] = t1;
|
|
831
|
+
$[19] = t10;
|
|
832
|
+
$[20] = t11;
|
|
833
|
+
$[21] = t12;
|
|
834
|
+
$[22] = t13;
|
|
835
|
+
$[23] = t14;
|
|
836
|
+
$[24] = t15;
|
|
837
|
+
$[25] = t16;
|
|
838
|
+
$[26] = t2;
|
|
839
|
+
$[27] = t3;
|
|
840
|
+
$[28] = t4;
|
|
841
|
+
$[29] = t5;
|
|
842
|
+
$[30] = t6;
|
|
843
|
+
$[31] = t7;
|
|
844
|
+
$[32] = t8;
|
|
845
|
+
$[33] = t9;
|
|
846
|
+
} else {
|
|
847
|
+
T0 = $[15];
|
|
848
|
+
T1 = $[16];
|
|
849
|
+
T2 = $[17];
|
|
850
|
+
t1 = $[18];
|
|
851
|
+
t10 = $[19];
|
|
852
|
+
t11 = $[20];
|
|
853
|
+
t12 = $[21];
|
|
854
|
+
t13 = $[22];
|
|
855
|
+
t14 = $[23];
|
|
856
|
+
t15 = $[24];
|
|
857
|
+
t16 = $[25];
|
|
858
|
+
t2 = $[26];
|
|
859
|
+
t3 = $[27];
|
|
860
|
+
t4 = $[28];
|
|
861
|
+
t5 = $[29];
|
|
862
|
+
t6 = $[30];
|
|
863
|
+
t7 = $[31];
|
|
864
|
+
t8 = $[32];
|
|
865
|
+
t9 = $[33];
|
|
866
|
+
}
|
|
867
|
+
let t17;
|
|
868
|
+
if ($[69] !== description || $[70] !== largerText || $[71] !== muted) {
|
|
869
|
+
t17 = description ? <Text className="font-instrument-sans" style={[sizeStyle(chatTextSize("caption", largerText), "relaxed"), {
|
|
870
|
+
color: muted,
|
|
871
|
+
marginTop: 2
|
|
872
|
+
}]}>{description}</Text> : null;
|
|
873
|
+
$[69] = description;
|
|
874
|
+
$[70] = largerText;
|
|
875
|
+
$[71] = muted;
|
|
876
|
+
$[72] = t17;
|
|
877
|
+
} else {
|
|
878
|
+
t17 = $[72];
|
|
879
|
+
}
|
|
880
|
+
let t18;
|
|
881
|
+
if ($[73] !== T0 || $[74] !== t1 || $[75] !== t17 || $[76] !== t2) {
|
|
882
|
+
t18 = <T0 className={t1}>{t2}{t17}</T0>;
|
|
883
|
+
$[73] = T0;
|
|
884
|
+
$[74] = t1;
|
|
885
|
+
$[75] = t17;
|
|
886
|
+
$[76] = t2;
|
|
887
|
+
$[77] = t18;
|
|
888
|
+
} else {
|
|
889
|
+
t18 = $[77];
|
|
890
|
+
}
|
|
891
|
+
let t19;
|
|
892
|
+
if ($[78] !== T1 || $[79] !== t10 || $[80] !== t11 || $[81] !== t12 || $[82] !== t13 || $[83] !== t14 || $[84] !== t18 || $[85] !== t3 || $[86] !== t4 || $[87] !== t5 || $[88] !== t6 || $[89] !== t7 || $[90] !== t8 || $[91] !== t9) {
|
|
893
|
+
t19 = <T1 accessibilityRole={t3} accessibilityLabel={t4} accessibilityHint={t5} accessibilityState={t6} disabled={t7} hitSlop={t8} onPress={t9} onPressIn={t10} onPressOut={t11} className={t12} style={t13}>{t14}{t18}</T1>;
|
|
894
|
+
$[78] = T1;
|
|
895
|
+
$[79] = t10;
|
|
896
|
+
$[80] = t11;
|
|
897
|
+
$[81] = t12;
|
|
898
|
+
$[82] = t13;
|
|
899
|
+
$[83] = t14;
|
|
900
|
+
$[84] = t18;
|
|
901
|
+
$[85] = t3;
|
|
902
|
+
$[86] = t4;
|
|
903
|
+
$[87] = t5;
|
|
904
|
+
$[88] = t6;
|
|
905
|
+
$[89] = t7;
|
|
906
|
+
$[90] = t8;
|
|
907
|
+
$[91] = t9;
|
|
908
|
+
$[92] = t19;
|
|
909
|
+
} else {
|
|
910
|
+
t19 = $[92];
|
|
911
|
+
}
|
|
912
|
+
let t20;
|
|
913
|
+
if ($[93] !== T2 || $[94] !== children || $[95] !== t15 || $[96] !== t16 || $[97] !== t19) {
|
|
914
|
+
t20 = <T2 style={t15}>{t16}{t19}{children}</T2>;
|
|
915
|
+
$[93] = T2;
|
|
916
|
+
$[94] = children;
|
|
917
|
+
$[95] = t15;
|
|
918
|
+
$[96] = t16;
|
|
919
|
+
$[97] = t19;
|
|
920
|
+
$[98] = t20;
|
|
921
|
+
} else {
|
|
922
|
+
t20 = $[98];
|
|
923
|
+
}
|
|
924
|
+
return t20;
|
|
925
|
+
}
|