@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
package/dist/Sheet.jsx
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
|
+
import { FloatingSurface } from "./FloatingSurface";
|
|
5
|
+
import { cn } from "./cn";
|
|
6
|
+
import { withAlpha } from "./palette";
|
|
7
|
+
import { tokens } from "./tokens";
|
|
8
|
+
import { useScheme } from "./useScheme";
|
|
9
|
+
import { DialogBody, DialogDescription, DialogTitle } from "./Dialog";
|
|
10
|
+
import { SheetDragView } from "./primitives/sheet-drag";
|
|
11
|
+
import { OverlayClose, OverlayModal, OverlayRoot, OverlayTrigger } from "./primitives/overlay";
|
|
12
|
+
const SHEET_RADIUS = tokens.radius.card;
|
|
13
|
+
/**
|
|
14
|
+
* Bottom sheet in an RN `Modal`, with no `@gorhom/bottom-sheet`. Same open
|
|
15
|
+
* state API as `Dialog`.
|
|
16
|
+
*/
|
|
17
|
+
export function Sheet(props) {
|
|
18
|
+
const $ = _c(2);
|
|
19
|
+
let t0;
|
|
20
|
+
if ($[0] !== props) {
|
|
21
|
+
t0 = <OverlayRoot {...props} />;
|
|
22
|
+
$[0] = props;
|
|
23
|
+
$[1] = t0;
|
|
24
|
+
} else {
|
|
25
|
+
t0 = $[1];
|
|
26
|
+
}
|
|
27
|
+
return t0;
|
|
28
|
+
}
|
|
29
|
+
export function SheetTrigger(props) {
|
|
30
|
+
const $ = _c(2);
|
|
31
|
+
let t0;
|
|
32
|
+
if ($[0] !== props) {
|
|
33
|
+
t0 = <OverlayTrigger part="SheetTrigger" {...props} />;
|
|
34
|
+
$[0] = props;
|
|
35
|
+
$[1] = t0;
|
|
36
|
+
} else {
|
|
37
|
+
t0 = $[1];
|
|
38
|
+
}
|
|
39
|
+
return t0;
|
|
40
|
+
}
|
|
41
|
+
export function SheetClose(props) {
|
|
42
|
+
const $ = _c(2);
|
|
43
|
+
let t0;
|
|
44
|
+
if ($[0] !== props) {
|
|
45
|
+
t0 = <OverlayClose part="SheetClose" {...props} />;
|
|
46
|
+
$[0] = props;
|
|
47
|
+
$[1] = t0;
|
|
48
|
+
} else {
|
|
49
|
+
t0 = $[1];
|
|
50
|
+
}
|
|
51
|
+
return t0;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Panel pinned to the bottom edge: opaque surface, top corners at the card
|
|
55
|
+
* radius, safe-area bottom padding. It slides up on open and back down on
|
|
56
|
+
* close, with the backdrop fading to match (`OverlayModal`). Drag it down to
|
|
57
|
+
* close (when `dismissible`): it follows the finger, the backdrop fades, and
|
|
58
|
+
* a flick or a drag past half carries it out while a short slow one springs
|
|
59
|
+
* back (`SheetDragView`). Its bottom corners sit below the
|
|
60
|
+
* screen edge, so only the top corners show. Taller than the room (a short
|
|
61
|
+
* window, or the keyboard up), it shrinks to fit under the top inset, so a
|
|
62
|
+
* `SheetBody` or other scroll view inside scrolls and the title stays on screen.
|
|
63
|
+
*/
|
|
64
|
+
export function SheetContent(t0) {
|
|
65
|
+
const $ = _c(33);
|
|
66
|
+
let children;
|
|
67
|
+
let className;
|
|
68
|
+
let onShow;
|
|
69
|
+
let props;
|
|
70
|
+
let style;
|
|
71
|
+
let t1;
|
|
72
|
+
let t2;
|
|
73
|
+
if ($[0] !== t0) {
|
|
74
|
+
({
|
|
75
|
+
children,
|
|
76
|
+
className,
|
|
77
|
+
dismissible: t1,
|
|
78
|
+
showHandle: t2,
|
|
79
|
+
onShow,
|
|
80
|
+
style,
|
|
81
|
+
...props
|
|
82
|
+
} = t0);
|
|
83
|
+
$[0] = t0;
|
|
84
|
+
$[1] = children;
|
|
85
|
+
$[2] = className;
|
|
86
|
+
$[3] = onShow;
|
|
87
|
+
$[4] = props;
|
|
88
|
+
$[5] = style;
|
|
89
|
+
$[6] = t1;
|
|
90
|
+
$[7] = t2;
|
|
91
|
+
} else {
|
|
92
|
+
children = $[1];
|
|
93
|
+
className = $[2];
|
|
94
|
+
onShow = $[3];
|
|
95
|
+
props = $[4];
|
|
96
|
+
style = $[5];
|
|
97
|
+
t1 = $[6];
|
|
98
|
+
t2 = $[7];
|
|
99
|
+
}
|
|
100
|
+
const dismissible = t1 === undefined ? true : t1;
|
|
101
|
+
const showHandle = t2 === undefined ? true : t2;
|
|
102
|
+
const insets = useSafeAreaInsets();
|
|
103
|
+
let t3;
|
|
104
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
+
t3 = {
|
|
106
|
+
marginBottom: -SHEET_RADIUS,
|
|
107
|
+
flexShrink: 1
|
|
108
|
+
};
|
|
109
|
+
$[8] = t3;
|
|
110
|
+
} else {
|
|
111
|
+
t3 = $[8];
|
|
112
|
+
}
|
|
113
|
+
let t4;
|
|
114
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
115
|
+
t4 = {
|
|
116
|
+
flexShrink: 1
|
|
117
|
+
};
|
|
118
|
+
$[9] = t4;
|
|
119
|
+
} else {
|
|
120
|
+
t4 = $[9];
|
|
121
|
+
}
|
|
122
|
+
let t5;
|
|
123
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
124
|
+
t5 = {
|
|
125
|
+
flexShrink: 1
|
|
126
|
+
};
|
|
127
|
+
$[10] = t5;
|
|
128
|
+
} else {
|
|
129
|
+
t5 = $[10];
|
|
130
|
+
}
|
|
131
|
+
let t6;
|
|
132
|
+
if ($[11] !== className) {
|
|
133
|
+
t6 = cn("gap-4 px-5 pt-3", className);
|
|
134
|
+
$[11] = className;
|
|
135
|
+
$[12] = t6;
|
|
136
|
+
} else {
|
|
137
|
+
t6 = $[12];
|
|
138
|
+
}
|
|
139
|
+
const t7 = insets.bottom + 20 + SHEET_RADIUS;
|
|
140
|
+
let t8;
|
|
141
|
+
if ($[13] !== t7) {
|
|
142
|
+
t8 = {
|
|
143
|
+
paddingBottom: t7,
|
|
144
|
+
flexShrink: 1
|
|
145
|
+
};
|
|
146
|
+
$[13] = t7;
|
|
147
|
+
$[14] = t8;
|
|
148
|
+
} else {
|
|
149
|
+
t8 = $[14];
|
|
150
|
+
}
|
|
151
|
+
let t9;
|
|
152
|
+
if ($[15] !== style || $[16] !== t8) {
|
|
153
|
+
t9 = [t8, style];
|
|
154
|
+
$[15] = style;
|
|
155
|
+
$[16] = t8;
|
|
156
|
+
$[17] = t9;
|
|
157
|
+
} else {
|
|
158
|
+
t9 = $[17];
|
|
159
|
+
}
|
|
160
|
+
let t10;
|
|
161
|
+
if ($[18] !== showHandle) {
|
|
162
|
+
t10 = showHandle ? <SheetHandle /> : null;
|
|
163
|
+
$[18] = showHandle;
|
|
164
|
+
$[19] = t10;
|
|
165
|
+
} else {
|
|
166
|
+
t10 = $[19];
|
|
167
|
+
}
|
|
168
|
+
let t11;
|
|
169
|
+
if ($[20] !== children || $[21] !== props || $[22] !== t10 || $[23] !== t6 || $[24] !== t9) {
|
|
170
|
+
t11 = <FloatingSurface blur={false} radius={SHEET_RADIUS} style={t5}><View accessibilityViewIsModal={true} className={t6} {...props} style={t9}>{t10}{children}</View></FloatingSurface>;
|
|
171
|
+
$[20] = children;
|
|
172
|
+
$[21] = props;
|
|
173
|
+
$[22] = t10;
|
|
174
|
+
$[23] = t6;
|
|
175
|
+
$[24] = t9;
|
|
176
|
+
$[25] = t11;
|
|
177
|
+
} else {
|
|
178
|
+
t11 = $[25];
|
|
179
|
+
}
|
|
180
|
+
let t12;
|
|
181
|
+
if ($[26] !== dismissible || $[27] !== t11) {
|
|
182
|
+
t12 = <View style={t3}><SheetDragView enabled={dismissible} style={t4}>{t11}</SheetDragView></View>;
|
|
183
|
+
$[26] = dismissible;
|
|
184
|
+
$[27] = t11;
|
|
185
|
+
$[28] = t12;
|
|
186
|
+
} else {
|
|
187
|
+
t12 = $[28];
|
|
188
|
+
}
|
|
189
|
+
let t13;
|
|
190
|
+
if ($[29] !== dismissible || $[30] !== onShow || $[31] !== t12) {
|
|
191
|
+
t13 = <OverlayModal part="SheetContent" placement="bottom" dismissible={dismissible} onShow={onShow}>{t12}</OverlayModal>;
|
|
192
|
+
$[29] = dismissible;
|
|
193
|
+
$[30] = onShow;
|
|
194
|
+
$[31] = t12;
|
|
195
|
+
$[32] = t13;
|
|
196
|
+
} else {
|
|
197
|
+
t13 = $[32];
|
|
198
|
+
}
|
|
199
|
+
return t13;
|
|
200
|
+
}
|
|
201
|
+
export function SheetHandle(t0) {
|
|
202
|
+
const $ = _c(17);
|
|
203
|
+
let className;
|
|
204
|
+
let props;
|
|
205
|
+
let style;
|
|
206
|
+
if ($[0] !== t0) {
|
|
207
|
+
({
|
|
208
|
+
className,
|
|
209
|
+
style,
|
|
210
|
+
...props
|
|
211
|
+
} = t0);
|
|
212
|
+
$[0] = t0;
|
|
213
|
+
$[1] = className;
|
|
214
|
+
$[2] = props;
|
|
215
|
+
$[3] = style;
|
|
216
|
+
} else {
|
|
217
|
+
className = $[1];
|
|
218
|
+
props = $[2];
|
|
219
|
+
style = $[3];
|
|
220
|
+
}
|
|
221
|
+
const scheme = useScheme();
|
|
222
|
+
let t1;
|
|
223
|
+
if ($[4] !== className) {
|
|
224
|
+
t1 = cn("h-1.5 w-10 self-center rounded-full", className);
|
|
225
|
+
$[4] = className;
|
|
226
|
+
$[5] = t1;
|
|
227
|
+
} else {
|
|
228
|
+
t1 = $[5];
|
|
229
|
+
}
|
|
230
|
+
const t2 = tokens.color.muted[scheme];
|
|
231
|
+
let t3;
|
|
232
|
+
if ($[6] !== t2) {
|
|
233
|
+
t3 = withAlpha(t2, 0.4);
|
|
234
|
+
$[6] = t2;
|
|
235
|
+
$[7] = t3;
|
|
236
|
+
} else {
|
|
237
|
+
t3 = $[7];
|
|
238
|
+
}
|
|
239
|
+
let t4;
|
|
240
|
+
if ($[8] !== t3) {
|
|
241
|
+
t4 = {
|
|
242
|
+
backgroundColor: t3
|
|
243
|
+
};
|
|
244
|
+
$[8] = t3;
|
|
245
|
+
$[9] = t4;
|
|
246
|
+
} else {
|
|
247
|
+
t4 = $[9];
|
|
248
|
+
}
|
|
249
|
+
let t5;
|
|
250
|
+
if ($[10] !== style || $[11] !== t4) {
|
|
251
|
+
t5 = [t4, style];
|
|
252
|
+
$[10] = style;
|
|
253
|
+
$[11] = t4;
|
|
254
|
+
$[12] = t5;
|
|
255
|
+
} else {
|
|
256
|
+
t5 = $[12];
|
|
257
|
+
}
|
|
258
|
+
let t6;
|
|
259
|
+
if ($[13] !== props || $[14] !== t1 || $[15] !== t5) {
|
|
260
|
+
t6 = <View accessibilityElementsHidden={true} importantForAccessibility="no-hide-descendants" className={t1} style={t5} {...props} />;
|
|
261
|
+
$[13] = props;
|
|
262
|
+
$[14] = t1;
|
|
263
|
+
$[15] = t5;
|
|
264
|
+
$[16] = t6;
|
|
265
|
+
} else {
|
|
266
|
+
t6 = $[16];
|
|
267
|
+
}
|
|
268
|
+
return t6;
|
|
269
|
+
}
|
|
270
|
+
export function SheetHeader(t0) {
|
|
271
|
+
const $ = _c(8);
|
|
272
|
+
let className;
|
|
273
|
+
let props;
|
|
274
|
+
if ($[0] !== t0) {
|
|
275
|
+
({
|
|
276
|
+
className,
|
|
277
|
+
...props
|
|
278
|
+
} = t0);
|
|
279
|
+
$[0] = t0;
|
|
280
|
+
$[1] = className;
|
|
281
|
+
$[2] = props;
|
|
282
|
+
} else {
|
|
283
|
+
className = $[1];
|
|
284
|
+
props = $[2];
|
|
285
|
+
}
|
|
286
|
+
let t1;
|
|
287
|
+
if ($[3] !== className) {
|
|
288
|
+
t1 = cn("gap-1.5", className);
|
|
289
|
+
$[3] = className;
|
|
290
|
+
$[4] = t1;
|
|
291
|
+
} else {
|
|
292
|
+
t1 = $[4];
|
|
293
|
+
}
|
|
294
|
+
let t2;
|
|
295
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
296
|
+
t2 = <View className={t1} {...props} />;
|
|
297
|
+
$[5] = props;
|
|
298
|
+
$[6] = t1;
|
|
299
|
+
$[7] = t2;
|
|
300
|
+
} else {
|
|
301
|
+
t2 = $[7];
|
|
302
|
+
}
|
|
303
|
+
return t2;
|
|
304
|
+
}
|
|
305
|
+
export const SheetTitle = DialogTitle;
|
|
306
|
+
export const SheetDescription = DialogDescription;
|
|
307
|
+
export const SheetBody = DialogBody;
|
|
308
|
+
/** Buttons stack full width, the last child on top: the web footer on a phone. */
|
|
309
|
+
export function SheetFooter(t0) {
|
|
310
|
+
const $ = _c(8);
|
|
311
|
+
let className;
|
|
312
|
+
let props;
|
|
313
|
+
if ($[0] !== t0) {
|
|
314
|
+
({
|
|
315
|
+
className,
|
|
316
|
+
...props
|
|
317
|
+
} = t0);
|
|
318
|
+
$[0] = t0;
|
|
319
|
+
$[1] = className;
|
|
320
|
+
$[2] = props;
|
|
321
|
+
} else {
|
|
322
|
+
className = $[1];
|
|
323
|
+
props = $[2];
|
|
324
|
+
}
|
|
325
|
+
let t1;
|
|
326
|
+
if ($[3] !== className) {
|
|
327
|
+
t1 = cn("flex-col-reverse gap-2", className);
|
|
328
|
+
$[3] = className;
|
|
329
|
+
$[4] = t1;
|
|
330
|
+
} else {
|
|
331
|
+
t1 = $[4];
|
|
332
|
+
}
|
|
333
|
+
let t2;
|
|
334
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
335
|
+
t2 = <View className={t1} {...props} />;
|
|
336
|
+
$[5] = props;
|
|
337
|
+
$[6] = t1;
|
|
338
|
+
$[7] = t2;
|
|
339
|
+
} else {
|
|
340
|
+
t2 = $[7];
|
|
341
|
+
}
|
|
342
|
+
return t2;
|
|
343
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Pressable, Text, View } from "react-native";
|
|
3
|
+
import { IconCheck } from "@tabler/icons-react-native";
|
|
4
|
+
import { cn } from "./cn";
|
|
5
|
+
import { sizeStyle, textStyle, typeStyle } from "./controlStyles";
|
|
6
|
+
import { palette } from "./palette";
|
|
7
|
+
import { useLargerText } from "./theme";
|
|
8
|
+
import { tokens } from "./tokens";
|
|
9
|
+
import { useScheme } from "./useScheme";
|
|
10
|
+
/**
|
|
11
|
+
* One action in a `Sheet` or bottom sheet, a touch size of the web menu item:
|
|
12
|
+
* icon (or another `leading` mark), title and optional detail, at least 56 high (64 with larger text) with
|
|
13
|
+
* the `ListRow` padding (`px-4 py-3`). While pressed it takes the web menu
|
|
14
|
+
* item highlight (`bg-default`). `danger` draws the title and icon in the
|
|
15
|
+
* danger colour, `warning` in the warning colour; `active` makes it a choice with a check; `disabled` dims it to 50%, as the web
|
|
16
|
+
* item, and ignores presses.
|
|
17
|
+
*/
|
|
18
|
+
export function SheetRow(t0) {
|
|
19
|
+
const $ = _c(52);
|
|
20
|
+
const {
|
|
21
|
+
icon: Icon,
|
|
22
|
+
leading,
|
|
23
|
+
title,
|
|
24
|
+
detail,
|
|
25
|
+
active,
|
|
26
|
+
multiple: t1,
|
|
27
|
+
danger: t2,
|
|
28
|
+
warning: t3,
|
|
29
|
+
disabled: t4,
|
|
30
|
+
onPress,
|
|
31
|
+
testID
|
|
32
|
+
} = t0;
|
|
33
|
+
const multiple = t1 === undefined ? false : t1;
|
|
34
|
+
const danger = t2 === undefined ? false : t2;
|
|
35
|
+
const warning = t3 === undefined ? false : t3;
|
|
36
|
+
const disabled = t4 === undefined ? false : t4;
|
|
37
|
+
const scheme = useScheme();
|
|
38
|
+
const largerText = useLargerText();
|
|
39
|
+
const color = danger ? palette.danger[scheme] : warning ? palette.warning[scheme] : tokens.color.foreground[scheme];
|
|
40
|
+
const titleSize = largerText ? "text-xl" : "text-base";
|
|
41
|
+
const detailSize = largerText ? "text-lg" : "text-sm";
|
|
42
|
+
const iconSize = largerText ? 26 : 22;
|
|
43
|
+
const t5 = active === undefined ? "button" : multiple ? "checkbox" : "radio";
|
|
44
|
+
let t6;
|
|
45
|
+
if ($[0] !== active || $[1] !== disabled) {
|
|
46
|
+
t6 = active === undefined ? {
|
|
47
|
+
disabled
|
|
48
|
+
} : {
|
|
49
|
+
disabled,
|
|
50
|
+
checked: active
|
|
51
|
+
};
|
|
52
|
+
$[0] = active;
|
|
53
|
+
$[1] = disabled;
|
|
54
|
+
$[2] = t6;
|
|
55
|
+
} else {
|
|
56
|
+
t6 = $[2];
|
|
57
|
+
}
|
|
58
|
+
const t7 = largerText ? "min-h-16" : "min-h-14";
|
|
59
|
+
const t8 = disabled && "opacity-50";
|
|
60
|
+
let t9;
|
|
61
|
+
if ($[3] !== t7 || $[4] !== t8) {
|
|
62
|
+
t9 = cn("flex-row items-center gap-3 px-4 py-3", t7, t8);
|
|
63
|
+
$[3] = t7;
|
|
64
|
+
$[4] = t8;
|
|
65
|
+
$[5] = t9;
|
|
66
|
+
} else {
|
|
67
|
+
t9 = $[5];
|
|
68
|
+
}
|
|
69
|
+
let t10;
|
|
70
|
+
if ($[6] !== disabled || $[7] !== scheme) {
|
|
71
|
+
t10 = t11 => {
|
|
72
|
+
const {
|
|
73
|
+
pressed
|
|
74
|
+
} = t11;
|
|
75
|
+
return {
|
|
76
|
+
borderRadius: tokens.radius.sm,
|
|
77
|
+
backgroundColor: pressed && !disabled ? palette.default[scheme] : "transparent"
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
$[6] = disabled;
|
|
81
|
+
$[7] = scheme;
|
|
82
|
+
$[8] = t10;
|
|
83
|
+
} else {
|
|
84
|
+
t10 = $[8];
|
|
85
|
+
}
|
|
86
|
+
let t11;
|
|
87
|
+
if ($[9] !== Icon || $[10] !== color || $[11] !== iconSize || $[12] !== leading) {
|
|
88
|
+
t11 = leading ?? (Icon ? <Icon size={iconSize} color={color} /> : null);
|
|
89
|
+
$[9] = Icon;
|
|
90
|
+
$[10] = color;
|
|
91
|
+
$[11] = iconSize;
|
|
92
|
+
$[12] = leading;
|
|
93
|
+
$[13] = t11;
|
|
94
|
+
} else {
|
|
95
|
+
t11 = $[13];
|
|
96
|
+
}
|
|
97
|
+
let t12;
|
|
98
|
+
if ($[14] !== titleSize) {
|
|
99
|
+
t12 = cn("font-instrument-sans-medium", titleSize);
|
|
100
|
+
$[14] = titleSize;
|
|
101
|
+
$[15] = t12;
|
|
102
|
+
} else {
|
|
103
|
+
t12 = $[15];
|
|
104
|
+
}
|
|
105
|
+
let t13;
|
|
106
|
+
if ($[16] !== color) {
|
|
107
|
+
t13 = {
|
|
108
|
+
color
|
|
109
|
+
};
|
|
110
|
+
$[16] = color;
|
|
111
|
+
$[17] = t13;
|
|
112
|
+
} else {
|
|
113
|
+
t13 = $[17];
|
|
114
|
+
}
|
|
115
|
+
let t14;
|
|
116
|
+
if ($[18] !== titleSize) {
|
|
117
|
+
t14 = sizeStyle(titleSize);
|
|
118
|
+
$[18] = titleSize;
|
|
119
|
+
$[19] = t14;
|
|
120
|
+
} else {
|
|
121
|
+
t14 = $[19];
|
|
122
|
+
}
|
|
123
|
+
let t15;
|
|
124
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
125
|
+
t15 = typeStyle("medium");
|
|
126
|
+
$[20] = t15;
|
|
127
|
+
} else {
|
|
128
|
+
t15 = $[20];
|
|
129
|
+
}
|
|
130
|
+
let t16;
|
|
131
|
+
if ($[21] !== t13 || $[22] !== t14) {
|
|
132
|
+
t16 = [t13, t14, t15];
|
|
133
|
+
$[21] = t13;
|
|
134
|
+
$[22] = t14;
|
|
135
|
+
$[23] = t16;
|
|
136
|
+
} else {
|
|
137
|
+
t16 = $[23];
|
|
138
|
+
}
|
|
139
|
+
let t17;
|
|
140
|
+
if ($[24] !== t12 || $[25] !== t16 || $[26] !== title) {
|
|
141
|
+
t17 = <Text className={t12} style={t16}>{title}</Text>;
|
|
142
|
+
$[24] = t12;
|
|
143
|
+
$[25] = t16;
|
|
144
|
+
$[26] = title;
|
|
145
|
+
$[27] = t17;
|
|
146
|
+
} else {
|
|
147
|
+
t17 = $[27];
|
|
148
|
+
}
|
|
149
|
+
let t18;
|
|
150
|
+
if ($[28] !== detail || $[29] !== detailSize || $[30] !== scheme) {
|
|
151
|
+
t18 = detail ? <Text className={cn("font-instrument-sans", detailSize)} style={[textStyle("muted", scheme), sizeStyle(detailSize)]}>{detail}</Text> : null;
|
|
152
|
+
$[28] = detail;
|
|
153
|
+
$[29] = detailSize;
|
|
154
|
+
$[30] = scheme;
|
|
155
|
+
$[31] = t18;
|
|
156
|
+
} else {
|
|
157
|
+
t18 = $[31];
|
|
158
|
+
}
|
|
159
|
+
let t19;
|
|
160
|
+
if ($[32] !== t17 || $[33] !== t18) {
|
|
161
|
+
t19 = <View className="min-w-0 flex-1">{t17}{t18}</View>;
|
|
162
|
+
$[32] = t17;
|
|
163
|
+
$[33] = t18;
|
|
164
|
+
$[34] = t19;
|
|
165
|
+
} else {
|
|
166
|
+
t19 = $[34];
|
|
167
|
+
}
|
|
168
|
+
let t20;
|
|
169
|
+
if ($[35] !== active || $[36] !== color || $[37] !== iconSize) {
|
|
170
|
+
t20 = active ? <IconCheck size={iconSize} color={color} strokeWidth={2} /> : null;
|
|
171
|
+
$[35] = active;
|
|
172
|
+
$[36] = color;
|
|
173
|
+
$[37] = iconSize;
|
|
174
|
+
$[38] = t20;
|
|
175
|
+
} else {
|
|
176
|
+
t20 = $[38];
|
|
177
|
+
}
|
|
178
|
+
let t21;
|
|
179
|
+
if ($[39] !== detail || $[40] !== disabled || $[41] !== onPress || $[42] !== t10 || $[43] !== t11 || $[44] !== t19 || $[45] !== t20 || $[46] !== t5 || $[47] !== t6 || $[48] !== t9 || $[49] !== testID || $[50] !== title) {
|
|
180
|
+
t21 = <Pressable testID={testID} accessibilityRole={t5} accessibilityLabel={title} accessibilityHint={detail} accessibilityState={t6} disabled={disabled} onPress={onPress} className={t9} style={t10}>{t11}{t19}{t20}</Pressable>;
|
|
181
|
+
$[39] = detail;
|
|
182
|
+
$[40] = disabled;
|
|
183
|
+
$[41] = onPress;
|
|
184
|
+
$[42] = t10;
|
|
185
|
+
$[43] = t11;
|
|
186
|
+
$[44] = t19;
|
|
187
|
+
$[45] = t20;
|
|
188
|
+
$[46] = t5;
|
|
189
|
+
$[47] = t6;
|
|
190
|
+
$[48] = t9;
|
|
191
|
+
$[49] = testID;
|
|
192
|
+
$[50] = title;
|
|
193
|
+
$[51] = t21;
|
|
194
|
+
} else {
|
|
195
|
+
t21 = $[51];
|
|
196
|
+
}
|
|
197
|
+
return t21;
|
|
198
|
+
}
|