@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,717 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Pressable, ScrollView, Text, View, useWindowDimensions } from "react-native";
|
|
3
|
+
import { FadeInDown, FadeOutDown } from "react-native-reanimated";
|
|
4
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
5
|
+
import { IconDots, IconX } from "@tabler/icons-react-native";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./DropdownMenu";
|
|
7
|
+
import { FloatingSurface } from "./FloatingSurface";
|
|
8
|
+
import { FLOATING_PILL_RADIUS, tabBarHeight, tabBarSlotStyle } from "./floating";
|
|
9
|
+
import { MIN_TOUCH_TARGET, sizeStyle, touchSlop, typeStyle } from "./controlStyles";
|
|
10
|
+
import { palette, withAlpha } from "./palette";
|
|
11
|
+
import { useLargerText } from "./theme";
|
|
12
|
+
import { tokens } from "./tokens";
|
|
13
|
+
import { useScheme } from "./useScheme";
|
|
14
|
+
import { EASE_OUT } from "./motion";
|
|
15
|
+
import { NativeOnlyAnimatedView } from "./primitives/native-only-animated-view";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* One control in the bar, as the web `BulkBarAction`. Each action carries the
|
|
19
|
+
* handler it runs, so confirm dialogs stay with the caller.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** The web `sm` breakpoint: below it, bar buttons are icon-only and "selected" is hidden. */
|
|
23
|
+
export const BULK_BAR_LABEL_MIN_WIDTH = 640;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Web `h-9` buttons with a 17 icon and `text-sm`; with larger text 48 high, a
|
|
27
|
+
* 22 icon and `text-lg`. In the tab bar slot: 48 high with a 20 icon over a
|
|
28
|
+
* `text-xs` label; with larger text 56, a 24 icon and `text-sm`. `caption` is
|
|
29
|
+
* the count chip, or the label under a docked icon.
|
|
30
|
+
*/
|
|
31
|
+
function barMetrics(largerText, docked) {
|
|
32
|
+
if (docked) {
|
|
33
|
+
return largerText ? {
|
|
34
|
+
height: 56,
|
|
35
|
+
icon: 24,
|
|
36
|
+
text: sizeStyle("text-lg"),
|
|
37
|
+
caption: sizeStyle("text-sm")
|
|
38
|
+
} : {
|
|
39
|
+
height: 48,
|
|
40
|
+
icon: 20,
|
|
41
|
+
text: sizeStyle("text-sm"),
|
|
42
|
+
caption: sizeStyle("text-xs")
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return largerText ? {
|
|
46
|
+
height: 48,
|
|
47
|
+
icon: 22,
|
|
48
|
+
text: sizeStyle("text-lg"),
|
|
49
|
+
caption: sizeStyle("text-base")
|
|
50
|
+
} : {
|
|
51
|
+
height: 36,
|
|
52
|
+
icon: 17,
|
|
53
|
+
text: sizeStyle("text-sm"),
|
|
54
|
+
caption: sizeStyle("text-xs")
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Docked at the bottom: it rises into place and sinks back out, the exit 20%
|
|
59
|
+
// quicker.
|
|
60
|
+
const BAR_ENTER = FadeInDown.duration(150).easing(EASE_OUT);
|
|
61
|
+
const BAR_EXIT = FadeOutDown.duration(120).easing(EASE_OUT);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The floating selection bar, as the web `BulkActionBar`: a pill-ended glass
|
|
65
|
+
* bar (`FloatingSurface`, radius 16, `px-2.5 py-2`, `gap-1`) centred at the
|
|
66
|
+
* bottom of its container, 12 above `bottomOffset`. It holds the selected
|
|
67
|
+
* count chip, Select all (n) / Clear, a divider, the primary actions, a More
|
|
68
|
+
* menu, the destructive action, and Cancel selection (X). Actions are off with
|
|
69
|
+
* no selection. Below 640 wide (the web `sm`) the actions are icon-only. Put it
|
|
70
|
+
* last in a full-size container; it scrolls sideways when it does not fit
|
|
71
|
+
* (with `pinCancel`, all but the X scrolls). `placement="tabBar"` docks it in
|
|
72
|
+
* the tab bar's slot instead, with labelled 48 high actions.
|
|
73
|
+
*/
|
|
74
|
+
export function BulkActionBar(t0) {
|
|
75
|
+
const $ = _c(116);
|
|
76
|
+
const {
|
|
77
|
+
isSelecting,
|
|
78
|
+
selectedCount,
|
|
79
|
+
totalCount,
|
|
80
|
+
onExitSelect,
|
|
81
|
+
onSelectAll,
|
|
82
|
+
onClearSelection,
|
|
83
|
+
primaryActions,
|
|
84
|
+
moreActions,
|
|
85
|
+
destructiveAction,
|
|
86
|
+
barKey,
|
|
87
|
+
bottomOffset,
|
|
88
|
+
pinCancel: t1,
|
|
89
|
+
placement: t2
|
|
90
|
+
} = t0;
|
|
91
|
+
const pinCancel = t1 === undefined ? false : t1;
|
|
92
|
+
const placement = t2 === undefined ? "float" : t2;
|
|
93
|
+
const scheme = useScheme();
|
|
94
|
+
const largerText = useLargerText();
|
|
95
|
+
const insets = useSafeAreaInsets();
|
|
96
|
+
const {
|
|
97
|
+
width
|
|
98
|
+
} = useWindowDimensions();
|
|
99
|
+
if (!isSelecting) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
const docked = placement === "tabBar";
|
|
103
|
+
let T0;
|
|
104
|
+
let T1;
|
|
105
|
+
let T2;
|
|
106
|
+
let T3;
|
|
107
|
+
let cancel;
|
|
108
|
+
let hasSelection;
|
|
109
|
+
let labelled;
|
|
110
|
+
let pinned;
|
|
111
|
+
let t10;
|
|
112
|
+
let t11;
|
|
113
|
+
let t12;
|
|
114
|
+
let t13;
|
|
115
|
+
let t14;
|
|
116
|
+
let t15;
|
|
117
|
+
let t16;
|
|
118
|
+
let t17;
|
|
119
|
+
let t18;
|
|
120
|
+
let t19;
|
|
121
|
+
let t20;
|
|
122
|
+
let t3;
|
|
123
|
+
let t4;
|
|
124
|
+
let t5;
|
|
125
|
+
let t6;
|
|
126
|
+
let t7;
|
|
127
|
+
let t8;
|
|
128
|
+
let t9;
|
|
129
|
+
if ($[0] !== barKey || $[1] !== bottomOffset || $[2] !== docked || $[3] !== insets || $[4] !== largerText || $[5] !== moreActions || $[6] !== onClearSelection || $[7] !== onExitSelect || $[8] !== onSelectAll || $[9] !== pinCancel || $[10] !== primaryActions || $[11] !== scheme || $[12] !== selectedCount || $[13] !== totalCount || $[14] !== width) {
|
|
130
|
+
const metrics = barMetrics(largerText, docked);
|
|
131
|
+
pinned = pinCancel && !docked;
|
|
132
|
+
labelled = docked || width >= BULK_BAR_LABEL_MIN_WIDTH;
|
|
133
|
+
hasSelection = selectedCount > 0;
|
|
134
|
+
const allSelected = totalCount > 0 && selectedCount >= totalCount;
|
|
135
|
+
const muted = tokens.color.muted[scheme];
|
|
136
|
+
cancel = docked ? null : <><BarDivider /><BarPressable height={metrics.height} paddingX={0} docked={docked} label="Cancel selection" onPress={onExitSelect}><IconX size={metrics.icon} color={muted} /></BarPressable></>;
|
|
137
|
+
T3 = NativeOnlyAnimatedView;
|
|
138
|
+
t16 = barKey;
|
|
139
|
+
t17 = "box-none";
|
|
140
|
+
t18 = docked ? undefined : BAR_ENTER;
|
|
141
|
+
t19 = docked ? undefined : BAR_EXIT;
|
|
142
|
+
if ($[41] !== bottomOffset || $[42] !== docked || $[43] !== insets) {
|
|
143
|
+
t20 = docked ? tabBarSlotStyle(insets) : {
|
|
144
|
+
position: "absolute",
|
|
145
|
+
left: 0,
|
|
146
|
+
right: 0,
|
|
147
|
+
bottom: 12 + (bottomOffset ?? insets.bottom),
|
|
148
|
+
alignItems: "center",
|
|
149
|
+
paddingHorizontal: 16
|
|
150
|
+
};
|
|
151
|
+
$[41] = bottomOffset;
|
|
152
|
+
$[42] = docked;
|
|
153
|
+
$[43] = insets;
|
|
154
|
+
$[44] = t20;
|
|
155
|
+
} else {
|
|
156
|
+
t20 = $[44];
|
|
157
|
+
}
|
|
158
|
+
T2 = FloatingSurface;
|
|
159
|
+
t14 = docked ? FLOATING_PILL_RADIUS : tokens.radius.lg;
|
|
160
|
+
if ($[45] !== docked || $[46] !== width) {
|
|
161
|
+
t15 = docked ? undefined : {
|
|
162
|
+
maxWidth: width - 32
|
|
163
|
+
};
|
|
164
|
+
$[45] = docked;
|
|
165
|
+
$[46] = width;
|
|
166
|
+
$[47] = t15;
|
|
167
|
+
} else {
|
|
168
|
+
t15 = $[47];
|
|
169
|
+
}
|
|
170
|
+
T1 = View;
|
|
171
|
+
let t21;
|
|
172
|
+
if ($[48] !== docked || $[49] !== largerText) {
|
|
173
|
+
t21 = docked ? tabBarHeight(largerText) : undefined;
|
|
174
|
+
$[48] = docked;
|
|
175
|
+
$[49] = largerText;
|
|
176
|
+
$[50] = t21;
|
|
177
|
+
} else {
|
|
178
|
+
t21 = $[50];
|
|
179
|
+
}
|
|
180
|
+
if ($[51] !== t21) {
|
|
181
|
+
t13 = {
|
|
182
|
+
flexDirection: "row",
|
|
183
|
+
alignItems: "center",
|
|
184
|
+
height: t21
|
|
185
|
+
};
|
|
186
|
+
$[51] = t21;
|
|
187
|
+
$[52] = t13;
|
|
188
|
+
} else {
|
|
189
|
+
t13 = $[52];
|
|
190
|
+
}
|
|
191
|
+
T0 = ScrollView;
|
|
192
|
+
t3 = true;
|
|
193
|
+
t4 = false;
|
|
194
|
+
t5 = false;
|
|
195
|
+
if ($[53] !== docked || $[54] !== pinned) {
|
|
196
|
+
t6 = pinned || docked ? {
|
|
197
|
+
flexShrink: 1
|
|
198
|
+
} : undefined;
|
|
199
|
+
$[53] = docked;
|
|
200
|
+
$[54] = pinned;
|
|
201
|
+
$[55] = t6;
|
|
202
|
+
} else {
|
|
203
|
+
t6 = $[55];
|
|
204
|
+
}
|
|
205
|
+
let t22;
|
|
206
|
+
if ($[56] !== docked) {
|
|
207
|
+
t22 = docked ? {
|
|
208
|
+
flexGrow: 1
|
|
209
|
+
} : null;
|
|
210
|
+
$[56] = docked;
|
|
211
|
+
$[57] = t22;
|
|
212
|
+
} else {
|
|
213
|
+
t22 = $[57];
|
|
214
|
+
}
|
|
215
|
+
const t23 = docked ? 0 : 4;
|
|
216
|
+
const t24 = docked ? 8 : 10;
|
|
217
|
+
const t25 = docked ? 8 : pinned ? 0 : 10;
|
|
218
|
+
const t26 = docked ? 0 : 8;
|
|
219
|
+
if ($[58] !== t22 || $[59] !== t23 || $[60] !== t24 || $[61] !== t25 || $[62] !== t26) {
|
|
220
|
+
t7 = {
|
|
221
|
+
...t22,
|
|
222
|
+
flexDirection: "row",
|
|
223
|
+
alignItems: "center",
|
|
224
|
+
gap: t23,
|
|
225
|
+
paddingLeft: t24,
|
|
226
|
+
paddingRight: t25,
|
|
227
|
+
paddingVertical: t26
|
|
228
|
+
};
|
|
229
|
+
$[58] = t22;
|
|
230
|
+
$[59] = t23;
|
|
231
|
+
$[60] = t24;
|
|
232
|
+
$[61] = t25;
|
|
233
|
+
$[62] = t26;
|
|
234
|
+
$[63] = t7;
|
|
235
|
+
} else {
|
|
236
|
+
t7 = $[63];
|
|
237
|
+
}
|
|
238
|
+
t8 = docked ? null : <View accessible={true} accessibilityLabel={`${selectedCount} selected`} style={{
|
|
239
|
+
flexDirection: "row",
|
|
240
|
+
alignItems: "center",
|
|
241
|
+
gap: 8,
|
|
242
|
+
paddingLeft: 4,
|
|
243
|
+
paddingRight: 2
|
|
244
|
+
}}><View style={{
|
|
245
|
+
borderRadius: tokens.radius.md,
|
|
246
|
+
paddingHorizontal: 8,
|
|
247
|
+
paddingVertical: 2,
|
|
248
|
+
backgroundColor: tokens.color.surfaceSecondary[scheme]
|
|
249
|
+
}}><Text className="font-instrument-sans-semibold" style={[metrics.caption, typeStyle("semibold"), {
|
|
250
|
+
fontVariant: ["tabular-nums"],
|
|
251
|
+
color: tokens.color.foreground[scheme]
|
|
252
|
+
}]}>{selectedCount}</Text></View>{labelled ? <Text className="font-instrument-sans-medium" style={[metrics.text, typeStyle("medium"), {
|
|
253
|
+
color: muted
|
|
254
|
+
}]}>selected</Text> : null}</View>;
|
|
255
|
+
t9 = totalCount > 0 ? <BarPressable height={metrics.height} paddingX={8} docked={docked} onPress={allSelected ? onClearSelection : onSelectAll}><Text className="font-instrument-sans-medium" style={[metrics.text, typeStyle("medium"), {
|
|
256
|
+
color: muted
|
|
257
|
+
}]}>{allSelected ? "Clear" : `Select all (${totalCount})`}</Text></BarPressable> : null;
|
|
258
|
+
if ($[64] !== docked) {
|
|
259
|
+
t10 = docked ? null : <BarDivider />;
|
|
260
|
+
$[64] = docked;
|
|
261
|
+
$[65] = t10;
|
|
262
|
+
} else {
|
|
263
|
+
t10 = $[65];
|
|
264
|
+
}
|
|
265
|
+
if ($[66] !== docked || $[67] !== hasSelection || $[68] !== labelled || $[69] !== primaryActions) {
|
|
266
|
+
let t27;
|
|
267
|
+
if ($[71] !== docked || $[72] !== hasSelection || $[73] !== labelled) {
|
|
268
|
+
t27 = action => <BarButton key={action.key} action={action} disabled={!hasSelection} labelled={labelled} docked={docked} />;
|
|
269
|
+
$[71] = docked;
|
|
270
|
+
$[72] = hasSelection;
|
|
271
|
+
$[73] = labelled;
|
|
272
|
+
$[74] = t27;
|
|
273
|
+
} else {
|
|
274
|
+
t27 = $[74];
|
|
275
|
+
}
|
|
276
|
+
t11 = primaryActions.map(t27);
|
|
277
|
+
$[66] = docked;
|
|
278
|
+
$[67] = hasSelection;
|
|
279
|
+
$[68] = labelled;
|
|
280
|
+
$[69] = primaryActions;
|
|
281
|
+
$[70] = t11;
|
|
282
|
+
} else {
|
|
283
|
+
t11 = $[70];
|
|
284
|
+
}
|
|
285
|
+
t12 = moreActions && moreActions.length > 0 ? <DropdownMenu><DropdownMenuTrigger accessibilityLabel="More actions" disabled={!hasSelection} hitSlop={touchSlop(MIN_TOUCH_TARGET, metrics.height)} style={t27 => {
|
|
286
|
+
const {
|
|
287
|
+
pressed
|
|
288
|
+
} = t27;
|
|
289
|
+
return barButtonStyle(metrics.height, 0, pressed, !hasSelection, false, docked, scheme);
|
|
290
|
+
}}><IconDots size={metrics.icon} color={muted} /></DropdownMenuTrigger><DropdownMenuContent align="end" sideOffset={8}>{moreActions.map(action_0 => <DropdownMenuItem key={action_0.key} icon={action_0.icon} destructive={action_0.destructive} disabled={!hasSelection || Boolean(action_0.disabled)} onSelect={action_0.onClick}>{action_0.label}</DropdownMenuItem>)}</DropdownMenuContent></DropdownMenu> : null;
|
|
291
|
+
$[0] = barKey;
|
|
292
|
+
$[1] = bottomOffset;
|
|
293
|
+
$[2] = docked;
|
|
294
|
+
$[3] = insets;
|
|
295
|
+
$[4] = largerText;
|
|
296
|
+
$[5] = moreActions;
|
|
297
|
+
$[6] = onClearSelection;
|
|
298
|
+
$[7] = onExitSelect;
|
|
299
|
+
$[8] = onSelectAll;
|
|
300
|
+
$[9] = pinCancel;
|
|
301
|
+
$[10] = primaryActions;
|
|
302
|
+
$[11] = scheme;
|
|
303
|
+
$[12] = selectedCount;
|
|
304
|
+
$[13] = totalCount;
|
|
305
|
+
$[14] = width;
|
|
306
|
+
$[15] = T0;
|
|
307
|
+
$[16] = T1;
|
|
308
|
+
$[17] = T2;
|
|
309
|
+
$[18] = T3;
|
|
310
|
+
$[19] = cancel;
|
|
311
|
+
$[20] = hasSelection;
|
|
312
|
+
$[21] = labelled;
|
|
313
|
+
$[22] = pinned;
|
|
314
|
+
$[23] = t10;
|
|
315
|
+
$[24] = t11;
|
|
316
|
+
$[25] = t12;
|
|
317
|
+
$[26] = t13;
|
|
318
|
+
$[27] = t14;
|
|
319
|
+
$[28] = t15;
|
|
320
|
+
$[29] = t16;
|
|
321
|
+
$[30] = t17;
|
|
322
|
+
$[31] = t18;
|
|
323
|
+
$[32] = t19;
|
|
324
|
+
$[33] = t20;
|
|
325
|
+
$[34] = t3;
|
|
326
|
+
$[35] = t4;
|
|
327
|
+
$[36] = t5;
|
|
328
|
+
$[37] = t6;
|
|
329
|
+
$[38] = t7;
|
|
330
|
+
$[39] = t8;
|
|
331
|
+
$[40] = t9;
|
|
332
|
+
} else {
|
|
333
|
+
T0 = $[15];
|
|
334
|
+
T1 = $[16];
|
|
335
|
+
T2 = $[17];
|
|
336
|
+
T3 = $[18];
|
|
337
|
+
cancel = $[19];
|
|
338
|
+
hasSelection = $[20];
|
|
339
|
+
labelled = $[21];
|
|
340
|
+
pinned = $[22];
|
|
341
|
+
t10 = $[23];
|
|
342
|
+
t11 = $[24];
|
|
343
|
+
t12 = $[25];
|
|
344
|
+
t13 = $[26];
|
|
345
|
+
t14 = $[27];
|
|
346
|
+
t15 = $[28];
|
|
347
|
+
t16 = $[29];
|
|
348
|
+
t17 = $[30];
|
|
349
|
+
t18 = $[31];
|
|
350
|
+
t19 = $[32];
|
|
351
|
+
t20 = $[33];
|
|
352
|
+
t3 = $[34];
|
|
353
|
+
t4 = $[35];
|
|
354
|
+
t5 = $[36];
|
|
355
|
+
t6 = $[37];
|
|
356
|
+
t7 = $[38];
|
|
357
|
+
t8 = $[39];
|
|
358
|
+
t9 = $[40];
|
|
359
|
+
}
|
|
360
|
+
let t21;
|
|
361
|
+
if ($[75] !== destructiveAction || $[76] !== docked || $[77] !== hasSelection || $[78] !== labelled) {
|
|
362
|
+
t21 = destructiveAction ? <>{docked ? null : <BarDivider />}<BarButton action={destructiveAction} disabled={!hasSelection} labelled={labelled} docked={docked} /></> : null;
|
|
363
|
+
$[75] = destructiveAction;
|
|
364
|
+
$[76] = docked;
|
|
365
|
+
$[77] = hasSelection;
|
|
366
|
+
$[78] = labelled;
|
|
367
|
+
$[79] = t21;
|
|
368
|
+
} else {
|
|
369
|
+
t21 = $[79];
|
|
370
|
+
}
|
|
371
|
+
const t22 = pinned ? null : cancel;
|
|
372
|
+
let t23;
|
|
373
|
+
if ($[80] !== T0 || $[81] !== t10 || $[82] !== t11 || $[83] !== t12 || $[84] !== t21 || $[85] !== t22 || $[86] !== t3 || $[87] !== t4 || $[88] !== t5 || $[89] !== t6 || $[90] !== t7 || $[91] !== t8 || $[92] !== t9) {
|
|
374
|
+
t23 = <T0 horizontal={t3} bounces={t4} showsHorizontalScrollIndicator={t5} style={t6} contentContainerStyle={t7}>{t8}{t9}{t10}{t11}{t12}{t21}{t22}</T0>;
|
|
375
|
+
$[80] = T0;
|
|
376
|
+
$[81] = t10;
|
|
377
|
+
$[82] = t11;
|
|
378
|
+
$[83] = t12;
|
|
379
|
+
$[84] = t21;
|
|
380
|
+
$[85] = t22;
|
|
381
|
+
$[86] = t3;
|
|
382
|
+
$[87] = t4;
|
|
383
|
+
$[88] = t5;
|
|
384
|
+
$[89] = t6;
|
|
385
|
+
$[90] = t7;
|
|
386
|
+
$[91] = t8;
|
|
387
|
+
$[92] = t9;
|
|
388
|
+
$[93] = t23;
|
|
389
|
+
} else {
|
|
390
|
+
t23 = $[93];
|
|
391
|
+
}
|
|
392
|
+
let t24;
|
|
393
|
+
if ($[94] !== cancel || $[95] !== docked || $[96] !== pinned) {
|
|
394
|
+
t24 = pinned ? <View style={{
|
|
395
|
+
flexDirection: "row",
|
|
396
|
+
alignItems: "center",
|
|
397
|
+
gap: 4,
|
|
398
|
+
paddingLeft: docked ? 0 : 4,
|
|
399
|
+
paddingRight: docked ? 8 : 10
|
|
400
|
+
}}>{cancel}</View> : null;
|
|
401
|
+
$[94] = cancel;
|
|
402
|
+
$[95] = docked;
|
|
403
|
+
$[96] = pinned;
|
|
404
|
+
$[97] = t24;
|
|
405
|
+
} else {
|
|
406
|
+
t24 = $[97];
|
|
407
|
+
}
|
|
408
|
+
let t25;
|
|
409
|
+
if ($[98] !== T1 || $[99] !== t13 || $[100] !== t23 || $[101] !== t24) {
|
|
410
|
+
t25 = <T1 style={t13}>{t23}{t24}</T1>;
|
|
411
|
+
$[98] = T1;
|
|
412
|
+
$[99] = t13;
|
|
413
|
+
$[100] = t23;
|
|
414
|
+
$[101] = t24;
|
|
415
|
+
$[102] = t25;
|
|
416
|
+
} else {
|
|
417
|
+
t25 = $[102];
|
|
418
|
+
}
|
|
419
|
+
let t26;
|
|
420
|
+
if ($[103] !== T2 || $[104] !== t14 || $[105] !== t15 || $[106] !== t25) {
|
|
421
|
+
t26 = <T2 radius={t14} style={t15}>{t25}</T2>;
|
|
422
|
+
$[103] = T2;
|
|
423
|
+
$[104] = t14;
|
|
424
|
+
$[105] = t15;
|
|
425
|
+
$[106] = t25;
|
|
426
|
+
$[107] = t26;
|
|
427
|
+
} else {
|
|
428
|
+
t26 = $[107];
|
|
429
|
+
}
|
|
430
|
+
let t27;
|
|
431
|
+
if ($[108] !== T3 || $[109] !== t16 || $[110] !== t17 || $[111] !== t18 || $[112] !== t19 || $[113] !== t20 || $[114] !== t26) {
|
|
432
|
+
t27 = <T3 testID={t16} pointerEvents={t17} entering={t18} exiting={t19} style={t20}>{t26}</T3>;
|
|
433
|
+
$[108] = T3;
|
|
434
|
+
$[109] = t16;
|
|
435
|
+
$[110] = t17;
|
|
436
|
+
$[111] = t18;
|
|
437
|
+
$[112] = t19;
|
|
438
|
+
$[113] = t20;
|
|
439
|
+
$[114] = t26;
|
|
440
|
+
$[115] = t27;
|
|
441
|
+
} else {
|
|
442
|
+
t27 = $[115];
|
|
443
|
+
}
|
|
444
|
+
return t27;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* A bar button box: the web `h-9 rounded-lg`, at least 44 wide and slopped to
|
|
449
|
+
* 44 high, `surface-secondary` while pressed (a 10% danger tint for a
|
|
450
|
+
* destructive one), faded to 30% when off. Docked: a pill (as the tab bar's
|
|
451
|
+
* active pill), at least 48 wide.
|
|
452
|
+
*/
|
|
453
|
+
function barButtonStyle(height, paddingX, pressed, disabled, destructive, docked, scheme) {
|
|
454
|
+
const pressedFill = destructive ? withAlpha(palette.danger[scheme], 0.1) : tokens.color.surfaceSecondary[scheme];
|
|
455
|
+
return {
|
|
456
|
+
height,
|
|
457
|
+
minWidth: docked ? 48 : MIN_TOUCH_TARGET,
|
|
458
|
+
paddingHorizontal: paddingX,
|
|
459
|
+
flexDirection: "row",
|
|
460
|
+
alignItems: "center",
|
|
461
|
+
justifyContent: "center",
|
|
462
|
+
gap: 6,
|
|
463
|
+
borderRadius: docked ? FLOATING_PILL_RADIUS : tokens.radius.lg,
|
|
464
|
+
backgroundColor: pressed && !disabled ? pressedFill : "transparent",
|
|
465
|
+
opacity: disabled ? 0.3 : 1
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function BarPressable(t0) {
|
|
469
|
+
const $ = _c(20);
|
|
470
|
+
const {
|
|
471
|
+
height,
|
|
472
|
+
paddingX,
|
|
473
|
+
docked,
|
|
474
|
+
grow: t1,
|
|
475
|
+
label,
|
|
476
|
+
disabled: t2,
|
|
477
|
+
destructive: t3,
|
|
478
|
+
onPress,
|
|
479
|
+
children
|
|
480
|
+
} = t0;
|
|
481
|
+
const grow = t1 === undefined ? false : t1;
|
|
482
|
+
const disabled = t2 === undefined ? false : t2;
|
|
483
|
+
const destructive = t3 === undefined ? false : t3;
|
|
484
|
+
const scheme = useScheme();
|
|
485
|
+
let t4;
|
|
486
|
+
if ($[0] !== disabled) {
|
|
487
|
+
t4 = {
|
|
488
|
+
disabled
|
|
489
|
+
};
|
|
490
|
+
$[0] = disabled;
|
|
491
|
+
$[1] = t4;
|
|
492
|
+
} else {
|
|
493
|
+
t4 = $[1];
|
|
494
|
+
}
|
|
495
|
+
let t5;
|
|
496
|
+
if ($[2] !== height) {
|
|
497
|
+
t5 = touchSlop(MIN_TOUCH_TARGET, height);
|
|
498
|
+
$[2] = height;
|
|
499
|
+
$[3] = t5;
|
|
500
|
+
} else {
|
|
501
|
+
t5 = $[3];
|
|
502
|
+
}
|
|
503
|
+
let t6;
|
|
504
|
+
if ($[4] !== destructive || $[5] !== disabled || $[6] !== docked || $[7] !== grow || $[8] !== height || $[9] !== paddingX || $[10] !== scheme) {
|
|
505
|
+
t6 = t7 => {
|
|
506
|
+
const {
|
|
507
|
+
pressed
|
|
508
|
+
} = t7;
|
|
509
|
+
return {
|
|
510
|
+
...barButtonStyle(height, paddingX, pressed, disabled, destructive, docked, scheme),
|
|
511
|
+
...(grow ? {
|
|
512
|
+
flexGrow: 1
|
|
513
|
+
} : null)
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
$[4] = destructive;
|
|
517
|
+
$[5] = disabled;
|
|
518
|
+
$[6] = docked;
|
|
519
|
+
$[7] = grow;
|
|
520
|
+
$[8] = height;
|
|
521
|
+
$[9] = paddingX;
|
|
522
|
+
$[10] = scheme;
|
|
523
|
+
$[11] = t6;
|
|
524
|
+
} else {
|
|
525
|
+
t6 = $[11];
|
|
526
|
+
}
|
|
527
|
+
let t7;
|
|
528
|
+
if ($[12] !== children || $[13] !== disabled || $[14] !== label || $[15] !== onPress || $[16] !== t4 || $[17] !== t5 || $[18] !== t6) {
|
|
529
|
+
t7 = <Pressable accessibilityRole="button" accessibilityLabel={label} accessibilityState={t4} disabled={disabled} hitSlop={t5} onPress={onPress} style={t6}>{children}</Pressable>;
|
|
530
|
+
$[12] = children;
|
|
531
|
+
$[13] = disabled;
|
|
532
|
+
$[14] = label;
|
|
533
|
+
$[15] = onPress;
|
|
534
|
+
$[16] = t4;
|
|
535
|
+
$[17] = t5;
|
|
536
|
+
$[18] = t6;
|
|
537
|
+
$[19] = t7;
|
|
538
|
+
} else {
|
|
539
|
+
t7 = $[19];
|
|
540
|
+
}
|
|
541
|
+
return t7;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* One action: the icon, and on wide screens the short label beside it
|
|
546
|
+
* (`text-sm` medium). Docked, the short label sits under the icon (`caption`).
|
|
547
|
+
*/
|
|
548
|
+
function BarButton(t0) {
|
|
549
|
+
const $ = _c(44);
|
|
550
|
+
const {
|
|
551
|
+
action,
|
|
552
|
+
disabled,
|
|
553
|
+
labelled,
|
|
554
|
+
docked
|
|
555
|
+
} = t0;
|
|
556
|
+
const scheme = useScheme();
|
|
557
|
+
const t1 = useLargerText();
|
|
558
|
+
let t2;
|
|
559
|
+
if ($[0] !== docked || $[1] !== t1) {
|
|
560
|
+
t2 = barMetrics(t1, docked);
|
|
561
|
+
$[0] = docked;
|
|
562
|
+
$[1] = t1;
|
|
563
|
+
$[2] = t2;
|
|
564
|
+
} else {
|
|
565
|
+
t2 = $[2];
|
|
566
|
+
}
|
|
567
|
+
const metrics = t2;
|
|
568
|
+
const Icon = action.icon;
|
|
569
|
+
const color = action.destructive ? palette.danger[scheme] : tokens.color.muted[scheme];
|
|
570
|
+
const shortLabel = action.shortLabel ?? action.label;
|
|
571
|
+
if (docked) {
|
|
572
|
+
const t3 = metrics.height;
|
|
573
|
+
const t4 = action.label;
|
|
574
|
+
const t5 = disabled || Boolean(action.disabled);
|
|
575
|
+
const t6 = action.destructive;
|
|
576
|
+
const t7 = action.onClick;
|
|
577
|
+
let t8;
|
|
578
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
579
|
+
t8 = {
|
|
580
|
+
alignItems: "center",
|
|
581
|
+
gap: 2
|
|
582
|
+
};
|
|
583
|
+
$[3] = t8;
|
|
584
|
+
} else {
|
|
585
|
+
t8 = $[3];
|
|
586
|
+
}
|
|
587
|
+
let t9;
|
|
588
|
+
if ($[4] !== Icon || $[5] !== color || $[6] !== metrics.icon) {
|
|
589
|
+
t9 = <Icon size={metrics.icon} color={color} />;
|
|
590
|
+
$[4] = Icon;
|
|
591
|
+
$[5] = color;
|
|
592
|
+
$[6] = metrics.icon;
|
|
593
|
+
$[7] = t9;
|
|
594
|
+
} else {
|
|
595
|
+
t9 = $[7];
|
|
596
|
+
}
|
|
597
|
+
const t10 = metrics.caption;
|
|
598
|
+
let t11;
|
|
599
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
600
|
+
t11 = typeStyle("medium");
|
|
601
|
+
$[8] = t11;
|
|
602
|
+
} else {
|
|
603
|
+
t11 = $[8];
|
|
604
|
+
}
|
|
605
|
+
let t12;
|
|
606
|
+
if ($[9] !== color) {
|
|
607
|
+
t12 = {
|
|
608
|
+
color
|
|
609
|
+
};
|
|
610
|
+
$[9] = color;
|
|
611
|
+
$[10] = t12;
|
|
612
|
+
} else {
|
|
613
|
+
t12 = $[10];
|
|
614
|
+
}
|
|
615
|
+
let t13;
|
|
616
|
+
if ($[11] !== metrics.caption || $[12] !== t12) {
|
|
617
|
+
t13 = [t10, t11, t12];
|
|
618
|
+
$[11] = metrics.caption;
|
|
619
|
+
$[12] = t12;
|
|
620
|
+
$[13] = t13;
|
|
621
|
+
} else {
|
|
622
|
+
t13 = $[13];
|
|
623
|
+
}
|
|
624
|
+
let t14;
|
|
625
|
+
if ($[14] !== shortLabel || $[15] !== t13) {
|
|
626
|
+
t14 = <Text numberOfLines={1} className="font-instrument-sans-medium" style={t13}>{shortLabel}</Text>;
|
|
627
|
+
$[14] = shortLabel;
|
|
628
|
+
$[15] = t13;
|
|
629
|
+
$[16] = t14;
|
|
630
|
+
} else {
|
|
631
|
+
t14 = $[16];
|
|
632
|
+
}
|
|
633
|
+
let t15;
|
|
634
|
+
if ($[17] !== t14 || $[18] !== t9) {
|
|
635
|
+
t15 = <View style={t8}>{t9}{t14}</View>;
|
|
636
|
+
$[17] = t14;
|
|
637
|
+
$[18] = t9;
|
|
638
|
+
$[19] = t15;
|
|
639
|
+
} else {
|
|
640
|
+
t15 = $[19];
|
|
641
|
+
}
|
|
642
|
+
let t16;
|
|
643
|
+
if ($[20] !== action.destructive || $[21] !== action.label || $[22] !== action.onClick || $[23] !== metrics.height || $[24] !== t15 || $[25] !== t5) {
|
|
644
|
+
t16 = <BarPressable height={t3} paddingX={6} docked={true} grow={true} label={t4} disabled={t5} destructive={t6} onPress={t7}>{t15}</BarPressable>;
|
|
645
|
+
$[20] = action.destructive;
|
|
646
|
+
$[21] = action.label;
|
|
647
|
+
$[22] = action.onClick;
|
|
648
|
+
$[23] = metrics.height;
|
|
649
|
+
$[24] = t15;
|
|
650
|
+
$[25] = t5;
|
|
651
|
+
$[26] = t16;
|
|
652
|
+
} else {
|
|
653
|
+
t16 = $[26];
|
|
654
|
+
}
|
|
655
|
+
return t16;
|
|
656
|
+
}
|
|
657
|
+
const t3 = disabled || Boolean(action.disabled);
|
|
658
|
+
let t4;
|
|
659
|
+
if ($[27] !== Icon || $[28] !== color || $[29] !== metrics.icon) {
|
|
660
|
+
t4 = <Icon size={metrics.icon} color={color} />;
|
|
661
|
+
$[27] = Icon;
|
|
662
|
+
$[28] = color;
|
|
663
|
+
$[29] = metrics.icon;
|
|
664
|
+
$[30] = t4;
|
|
665
|
+
} else {
|
|
666
|
+
t4 = $[30];
|
|
667
|
+
}
|
|
668
|
+
let t5;
|
|
669
|
+
if ($[31] !== color || $[32] !== labelled || $[33] !== metrics.text || $[34] !== shortLabel) {
|
|
670
|
+
t5 = labelled ? <Text className="font-instrument-sans-medium" style={[metrics.text, typeStyle("medium"), {
|
|
671
|
+
color
|
|
672
|
+
}]}>{shortLabel}</Text> : null;
|
|
673
|
+
$[31] = color;
|
|
674
|
+
$[32] = labelled;
|
|
675
|
+
$[33] = metrics.text;
|
|
676
|
+
$[34] = shortLabel;
|
|
677
|
+
$[35] = t5;
|
|
678
|
+
} else {
|
|
679
|
+
t5 = $[35];
|
|
680
|
+
}
|
|
681
|
+
let t6;
|
|
682
|
+
if ($[36] !== action.destructive || $[37] !== action.label || $[38] !== action.onClick || $[39] !== metrics.height || $[40] !== t3 || $[41] !== t4 || $[42] !== t5) {
|
|
683
|
+
t6 = <BarPressable height={metrics.height} paddingX={10} docked={false} label={action.label} disabled={t3} destructive={action.destructive} onPress={action.onClick}>{t4}{t5}</BarPressable>;
|
|
684
|
+
$[36] = action.destructive;
|
|
685
|
+
$[37] = action.label;
|
|
686
|
+
$[38] = action.onClick;
|
|
687
|
+
$[39] = metrics.height;
|
|
688
|
+
$[40] = t3;
|
|
689
|
+
$[41] = t4;
|
|
690
|
+
$[42] = t5;
|
|
691
|
+
$[43] = t6;
|
|
692
|
+
} else {
|
|
693
|
+
t6 = $[43];
|
|
694
|
+
}
|
|
695
|
+
return t6;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/** The web vertical `Separator`: `mx-1.5 h-5 bg-border`. */
|
|
699
|
+
function BarDivider() {
|
|
700
|
+
const $ = _c(2);
|
|
701
|
+
const scheme = useScheme();
|
|
702
|
+
const t0 = tokens.color.border[scheme];
|
|
703
|
+
let t1;
|
|
704
|
+
if ($[0] !== t0) {
|
|
705
|
+
t1 = <View accessible={false} importantForAccessibility="no" style={{
|
|
706
|
+
width: 1,
|
|
707
|
+
height: 20,
|
|
708
|
+
marginHorizontal: 6,
|
|
709
|
+
backgroundColor: t0
|
|
710
|
+
}} />;
|
|
711
|
+
$[0] = t0;
|
|
712
|
+
$[1] = t1;
|
|
713
|
+
} else {
|
|
714
|
+
t1 = $[1];
|
|
715
|
+
}
|
|
716
|
+
return t1;
|
|
717
|
+
}
|