@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,208 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import BottomSheet, { BottomSheetBackdrop, BottomSheetView } from "@gorhom/bottom-sheet";
|
|
3
|
+
import { IconX } from "@tabler/icons-react-native";
|
|
4
|
+
import React, { useCallback } from "react";
|
|
5
|
+
import { Platform, Text, TouchableOpacity, View } from "react-native";
|
|
6
|
+
import { Colors } from "./colors";
|
|
7
|
+
import { textStyle, typeStyle } from "./controlStyles";
|
|
8
|
+
import { floatingSolidFill } from "./floating";
|
|
9
|
+
import { GlassSheetBackground } from "./LiquidGlass";
|
|
10
|
+
import { useLargerText } from "./theme";
|
|
11
|
+
import { useScheme } from "./useScheme";
|
|
12
|
+
|
|
13
|
+
// One snap point, set explicitly. With dynamic sizing the sheet can measure to
|
|
14
|
+
// height 0 on Android and never appear.
|
|
15
|
+
const SNAP_POINTS = ["40%"];
|
|
16
|
+
const SHEET_RADIUS = 20;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Opaque sheet chrome for Android. The glass background needs a measured blur
|
|
20
|
+
* target, which is not reliable once an RN `Modal` has been dismissed.
|
|
21
|
+
*/
|
|
22
|
+
function SolidSheetBackground(t0) {
|
|
23
|
+
const $ = _c(8);
|
|
24
|
+
const {
|
|
25
|
+
style,
|
|
26
|
+
pointerEvents
|
|
27
|
+
} = t0;
|
|
28
|
+
const scheme = useScheme();
|
|
29
|
+
const t1 = floatingSolidFill[scheme];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[0] !== t1) {
|
|
32
|
+
t2 = {
|
|
33
|
+
backgroundColor: t1,
|
|
34
|
+
borderTopLeftRadius: SHEET_RADIUS,
|
|
35
|
+
borderTopRightRadius: SHEET_RADIUS
|
|
36
|
+
};
|
|
37
|
+
$[0] = t1;
|
|
38
|
+
$[1] = t2;
|
|
39
|
+
} else {
|
|
40
|
+
t2 = $[1];
|
|
41
|
+
}
|
|
42
|
+
let t3;
|
|
43
|
+
if ($[2] !== style || $[3] !== t2) {
|
|
44
|
+
t3 = [style, t2];
|
|
45
|
+
$[2] = style;
|
|
46
|
+
$[3] = t2;
|
|
47
|
+
$[4] = t3;
|
|
48
|
+
} else {
|
|
49
|
+
t3 = $[4];
|
|
50
|
+
}
|
|
51
|
+
let t4;
|
|
52
|
+
if ($[5] !== pointerEvents || $[6] !== t3) {
|
|
53
|
+
t4 = <View pointerEvents={pointerEvents} style={t3} />;
|
|
54
|
+
$[5] = pointerEvents;
|
|
55
|
+
$[6] = t3;
|
|
56
|
+
$[7] = t4;
|
|
57
|
+
} else {
|
|
58
|
+
t4 = $[7];
|
|
59
|
+
}
|
|
60
|
+
return t4;
|
|
61
|
+
}
|
|
62
|
+
function SheetBackdrop(props) {
|
|
63
|
+
const $ = _c(2);
|
|
64
|
+
let t0;
|
|
65
|
+
if ($[0] !== props) {
|
|
66
|
+
t0 = <BottomSheetBackdrop {...props} appearsOnIndex={0} disappearsOnIndex={-1} opacity={0.5} />;
|
|
67
|
+
$[0] = props;
|
|
68
|
+
$[1] = t0;
|
|
69
|
+
} else {
|
|
70
|
+
t0 = $[1];
|
|
71
|
+
}
|
|
72
|
+
return t0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A controlled bottom sheet over the screen, built on gorhom's default-export
|
|
77
|
+
* `BottomSheet` (the named `BottomSheet` export is undefined).
|
|
78
|
+
*
|
|
79
|
+
* It renders nothing while `visible` is false. A closed gorhom sheet still lays
|
|
80
|
+
* out an absolute-fill host that can cover the triggers beneath it, and
|
|
81
|
+
* `BottomSheetModal.present()` did nothing after an RN `Modal` had been
|
|
82
|
+
* dismissed on Android.
|
|
83
|
+
*/
|
|
84
|
+
export function BottomSheetContainer(t0) {
|
|
85
|
+
const $ = _c(29);
|
|
86
|
+
const {
|
|
87
|
+
visible,
|
|
88
|
+
onClose,
|
|
89
|
+
title,
|
|
90
|
+
children,
|
|
91
|
+
closeTestID
|
|
92
|
+
} = t0;
|
|
93
|
+
const largerText = useLargerText();
|
|
94
|
+
const isDark = useScheme() === "dark";
|
|
95
|
+
const renderBackdrop = _temp;
|
|
96
|
+
if (!visible) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
const t1 = isDark ? Colors.white : Colors.neutral[800];
|
|
100
|
+
let t2;
|
|
101
|
+
if ($[0] !== t1) {
|
|
102
|
+
t2 = {
|
|
103
|
+
backgroundColor: t1
|
|
104
|
+
};
|
|
105
|
+
$[0] = t1;
|
|
106
|
+
$[1] = t2;
|
|
107
|
+
} else {
|
|
108
|
+
t2 = $[1];
|
|
109
|
+
}
|
|
110
|
+
let t3;
|
|
111
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
|
+
t3 = {
|
|
113
|
+
padding: 20,
|
|
114
|
+
paddingBottom: 48
|
|
115
|
+
};
|
|
116
|
+
$[2] = t3;
|
|
117
|
+
} else {
|
|
118
|
+
t3 = $[2];
|
|
119
|
+
}
|
|
120
|
+
const t4 = `${largerText ? "text-2xl" : "text-xl"} flex-1 font-instrument-sans-semibold`;
|
|
121
|
+
const t5 = isDark ? "dark" : "light";
|
|
122
|
+
let t6;
|
|
123
|
+
if ($[3] !== t5) {
|
|
124
|
+
t6 = textStyle("foreground", t5);
|
|
125
|
+
$[3] = t5;
|
|
126
|
+
$[4] = t6;
|
|
127
|
+
} else {
|
|
128
|
+
t6 = $[4];
|
|
129
|
+
}
|
|
130
|
+
let t7;
|
|
131
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
|
+
t7 = typeStyle("semibold");
|
|
133
|
+
$[5] = t7;
|
|
134
|
+
} else {
|
|
135
|
+
t7 = $[5];
|
|
136
|
+
}
|
|
137
|
+
let t8;
|
|
138
|
+
if ($[6] !== t6) {
|
|
139
|
+
t8 = [t6, t7];
|
|
140
|
+
$[6] = t6;
|
|
141
|
+
$[7] = t8;
|
|
142
|
+
} else {
|
|
143
|
+
t8 = $[7];
|
|
144
|
+
}
|
|
145
|
+
let t9;
|
|
146
|
+
if ($[8] !== t4 || $[9] !== t8 || $[10] !== title) {
|
|
147
|
+
t9 = <Text accessibilityRole="header" className={t4} style={t8}>{title}</Text>;
|
|
148
|
+
$[8] = t4;
|
|
149
|
+
$[9] = t8;
|
|
150
|
+
$[10] = title;
|
|
151
|
+
$[11] = t9;
|
|
152
|
+
} else {
|
|
153
|
+
t9 = $[11];
|
|
154
|
+
}
|
|
155
|
+
const t10 = largerText ? 32 : 28;
|
|
156
|
+
const t11 = isDark ? "white" : "black";
|
|
157
|
+
let t12;
|
|
158
|
+
if ($[12] !== t10 || $[13] !== t11) {
|
|
159
|
+
t12 = <IconX size={t10} color={t11} />;
|
|
160
|
+
$[12] = t10;
|
|
161
|
+
$[13] = t11;
|
|
162
|
+
$[14] = t12;
|
|
163
|
+
} else {
|
|
164
|
+
t12 = $[14];
|
|
165
|
+
}
|
|
166
|
+
let t13;
|
|
167
|
+
if ($[15] !== closeTestID || $[16] !== onClose || $[17] !== t12) {
|
|
168
|
+
t13 = <TouchableOpacity testID={closeTestID} accessibilityRole="button" accessibilityLabel="Close" onPress={onClose} className="-mr-2 h-12 w-12 items-center justify-center" hitSlop={8} activeOpacity={0.7}>{t12}</TouchableOpacity>;
|
|
169
|
+
$[15] = closeTestID;
|
|
170
|
+
$[16] = onClose;
|
|
171
|
+
$[17] = t12;
|
|
172
|
+
$[18] = t13;
|
|
173
|
+
} else {
|
|
174
|
+
t13 = $[18];
|
|
175
|
+
}
|
|
176
|
+
let t14;
|
|
177
|
+
if ($[19] !== t13 || $[20] !== t9) {
|
|
178
|
+
t14 = <View className="mb-4 flex-row items-center justify-between gap-3">{t9}{t13}</View>;
|
|
179
|
+
$[19] = t13;
|
|
180
|
+
$[20] = t9;
|
|
181
|
+
$[21] = t14;
|
|
182
|
+
} else {
|
|
183
|
+
t14 = $[21];
|
|
184
|
+
}
|
|
185
|
+
let t15;
|
|
186
|
+
if ($[22] !== children || $[23] !== t14) {
|
|
187
|
+
t15 = <BottomSheetView style={t3}>{t14}{children}</BottomSheetView>;
|
|
188
|
+
$[22] = children;
|
|
189
|
+
$[23] = t14;
|
|
190
|
+
$[24] = t15;
|
|
191
|
+
} else {
|
|
192
|
+
t15 = $[24];
|
|
193
|
+
}
|
|
194
|
+
let t16;
|
|
195
|
+
if ($[25] !== onClose || $[26] !== t15 || $[27] !== t2) {
|
|
196
|
+
t16 = <BottomSheet index={0} snapPoints={SNAP_POINTS} enableDynamicSizing={false} enablePanDownToClose={true} enableContentPanningGesture={false} enableHandlePanningGesture={true} keyboardBehavior="interactive" onClose={onClose} backdropComponent={renderBackdrop} backgroundComponent={Platform.OS === "android" ? SolidSheetBackground : GlassSheetBackground} handleIndicatorStyle={t2}>{t15}</BottomSheet>;
|
|
197
|
+
$[25] = onClose;
|
|
198
|
+
$[26] = t15;
|
|
199
|
+
$[27] = t2;
|
|
200
|
+
$[28] = t16;
|
|
201
|
+
} else {
|
|
202
|
+
t16 = $[28];
|
|
203
|
+
}
|
|
204
|
+
return t16;
|
|
205
|
+
}
|
|
206
|
+
function _temp(props) {
|
|
207
|
+
return <SheetBackdrop {...props} />;
|
|
208
|
+
}
|