@vvedantb/native-ui 0.24.0 → 0.24.2
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/CaptureButton.jsx +67 -46
- package/dist/Chip.jsx +42 -34
- package/dist/ColorSwatches.jsx +169 -45
- package/dist/Dialog.jsx +16 -3
- package/dist/DropdownMenu.jsx +245 -116
- package/dist/FloatingFAB.jsx +71 -55
- package/dist/IconButton.jsx +62 -48
- package/dist/PinnedBotTile.jsx +87 -72
- package/dist/SearchInput.jsx +313 -50
- package/dist/ai/card-button.jsx +116 -147
- package/dist/ai/file-chip.jsx +46 -22
- package/dist/ai/message-action-sheet.jsx +182 -202
- package/dist/motion.js +31 -0
- package/dist/pressScale.js +131 -0
- package/dist/primitives/overlay.jsx +162 -101
- package/dist/primitives/select.jsx +5 -1
- package/package.json +1 -1
- package/src/CaptureButton.tsx +15 -9
- package/src/Chip.tsx +9 -4
- package/src/ColorSwatches.tsx +74 -29
- package/src/Dialog.tsx +16 -7
- package/src/DropdownMenu.tsx +71 -16
- package/src/FloatingFAB.tsx +20 -13
- package/src/IconButton.tsx +8 -6
- package/src/PinnedBotTile.tsx +9 -5
- package/src/SearchInput.tsx +40 -12
- package/src/ai/card-button.tsx +17 -11
- package/src/ai/file-chip.tsx +13 -4
- package/src/ai/message-action-sheet.tsx +90 -97
- package/src/motion.ts +15 -0
- package/src/pressScale.ts +72 -0
- package/src/primitives/overlay.tsx +48 -8
- package/src/primitives/select.tsx +7 -2
package/dist/DropdownMenu.jsx
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import * as Slot from "@rn-primitives/slot";
|
|
3
|
-
import { createContext, useContext, useRef, useState } from "react";
|
|
3
|
+
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { Modal, Pressable, ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
|
|
5
|
+
import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
5
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
6
7
|
import { IconCheck } from "@tabler/icons-react-native";
|
|
7
8
|
import { FloatingSurface } from "./FloatingSurface";
|
|
8
9
|
import { cn } from "./cn";
|
|
9
10
|
import { sizeStyle, typeStyle } from "./controlStyles";
|
|
10
11
|
import { selectionHaptic } from "./haptics";
|
|
12
|
+
import { PANEL_SCALE_FROM, POPOVER_ENTER, POPOVER_EXIT } from "./motion";
|
|
11
13
|
import { palette } from "./palette";
|
|
12
14
|
import { useLargerText } from "./theme";
|
|
13
15
|
import { tokens } from "./tokens";
|
|
@@ -247,10 +249,12 @@ export function dropdownMenuPosition({
|
|
|
247
249
|
* `Dialog` and `Sheet` (`FloatingSurface` without blur, with the floating
|
|
248
250
|
* shadow) at radius 16, at least 192 wide, `p-1.5`, scrolling when taller than
|
|
249
251
|
* the room. A tap outside, Android back and the VoiceOver escape gesture close
|
|
250
|
-
* it.
|
|
252
|
+
* it. The panel (not the backdrop) fades in and scales from 0.96 over 150 ms
|
|
253
|
+
* once it is measured, from the corner nearest the trigger, and fades out in
|
|
254
|
+
* 100 ms. With Reduce Motion on, it appears and leaves at once.
|
|
251
255
|
*/
|
|
252
256
|
export function DropdownMenuContent(t0) {
|
|
253
|
-
const $ = _c(
|
|
257
|
+
const $ = _c(74);
|
|
254
258
|
let children;
|
|
255
259
|
let className;
|
|
256
260
|
let props;
|
|
@@ -291,155 +295,280 @@ export function DropdownMenuContent(t0) {
|
|
|
291
295
|
const insets = useSafeAreaInsets();
|
|
292
296
|
const reduceMotion = useReduceMotion();
|
|
293
297
|
const [contentHeight, setContentHeight] = useState(null);
|
|
298
|
+
const [shown, setShown] = useState(open);
|
|
299
|
+
if (open && !shown) {
|
|
300
|
+
setShown(true);
|
|
301
|
+
}
|
|
302
|
+
if (!open && shown && reduceMotion) {
|
|
303
|
+
setShown(false);
|
|
304
|
+
}
|
|
305
|
+
const openRef = useRef(open);
|
|
294
306
|
let t2;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
307
|
+
let t3;
|
|
308
|
+
if ($[7] !== open) {
|
|
309
|
+
t2 = () => {
|
|
310
|
+
openRef.current = open;
|
|
311
|
+
};
|
|
312
|
+
t3 = [open];
|
|
313
|
+
$[7] = open;
|
|
298
314
|
$[8] = t2;
|
|
315
|
+
$[9] = t3;
|
|
299
316
|
} else {
|
|
300
317
|
t2 = $[8];
|
|
318
|
+
t3 = $[9];
|
|
301
319
|
}
|
|
302
|
-
|
|
303
|
-
const
|
|
320
|
+
useEffect(t2, t3);
|
|
321
|
+
const opacity = useSharedValue(reduceMotion ? 1 : 0);
|
|
322
|
+
const scale = useSharedValue(reduceMotion ? 1 : PANEL_SCALE_FROM);
|
|
323
|
+
const measured = contentHeight !== null;
|
|
304
324
|
let t4;
|
|
305
|
-
if ($[
|
|
306
|
-
t4 =
|
|
325
|
+
if ($[10] !== scale) {
|
|
326
|
+
t4 = () => {
|
|
327
|
+
if (openRef.current) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
setShown(false);
|
|
331
|
+
setContentHeight(null);
|
|
332
|
+
scale.set(PANEL_SCALE_FROM);
|
|
333
|
+
};
|
|
334
|
+
$[10] = scale;
|
|
335
|
+
$[11] = t4;
|
|
336
|
+
} else {
|
|
337
|
+
t4 = $[11];
|
|
338
|
+
}
|
|
339
|
+
const hide = t4;
|
|
340
|
+
let t5;
|
|
341
|
+
if ($[12] !== hide || $[13] !== measured || $[14] !== opacity || $[15] !== open || $[16] !== reduceMotion || $[17] !== scale || $[18] !== shown) {
|
|
342
|
+
t5 = () => {
|
|
343
|
+
if (reduceMotion) {
|
|
344
|
+
opacity.set(1);
|
|
345
|
+
scale.set(1);
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
if (open) {
|
|
349
|
+
if (!measured) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
opacity.set(withTiming(1, POPOVER_ENTER));
|
|
353
|
+
scale.set(withTiming(1, POPOVER_ENTER));
|
|
354
|
+
} else {
|
|
355
|
+
if (shown) {
|
|
356
|
+
opacity.set(withTiming(0, POPOVER_EXIT, finished => {
|
|
357
|
+
"worklet";
|
|
358
|
+
|
|
359
|
+
if (finished) {
|
|
360
|
+
runOnJS(hide)();
|
|
361
|
+
}
|
|
362
|
+
}));
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
$[12] = hide;
|
|
367
|
+
$[13] = measured;
|
|
368
|
+
$[14] = opacity;
|
|
369
|
+
$[15] = open;
|
|
370
|
+
$[16] = reduceMotion;
|
|
371
|
+
$[17] = scale;
|
|
372
|
+
$[18] = shown;
|
|
373
|
+
$[19] = t5;
|
|
374
|
+
} else {
|
|
375
|
+
t5 = $[19];
|
|
376
|
+
}
|
|
377
|
+
let t6;
|
|
378
|
+
if ($[20] !== measured || $[21] !== open || $[22] !== reduceMotion) {
|
|
379
|
+
t6 = [open, measured, reduceMotion];
|
|
380
|
+
$[20] = measured;
|
|
381
|
+
$[21] = open;
|
|
382
|
+
$[22] = reduceMotion;
|
|
383
|
+
$[23] = t6;
|
|
384
|
+
} else {
|
|
385
|
+
t6 = $[23];
|
|
386
|
+
}
|
|
387
|
+
useEffect(t5, t6);
|
|
388
|
+
const panelStyle = useAnimatedStyle(() => ({
|
|
389
|
+
opacity: opacity.get(),
|
|
390
|
+
transform: [{
|
|
391
|
+
scale: scale.get()
|
|
392
|
+
}]
|
|
393
|
+
}));
|
|
394
|
+
let t7;
|
|
395
|
+
if ($[24] !== setOpen) {
|
|
396
|
+
t7 = () => setOpen(false);
|
|
397
|
+
$[24] = setOpen;
|
|
398
|
+
$[25] = t7;
|
|
399
|
+
} else {
|
|
400
|
+
t7 = $[25];
|
|
401
|
+
}
|
|
402
|
+
const close = t7;
|
|
403
|
+
const t8 = contentHeight ?? 0;
|
|
404
|
+
let t9;
|
|
405
|
+
if ($[26] !== align || $[27] !== insets || $[28] !== sideOffset || $[29] !== t8 || $[30] !== trigger || $[31] !== window) {
|
|
406
|
+
t9 = dropdownMenuPosition({
|
|
307
407
|
trigger,
|
|
308
408
|
window,
|
|
309
409
|
insets,
|
|
310
410
|
align,
|
|
311
411
|
sideOffset,
|
|
312
|
-
contentHeight:
|
|
412
|
+
contentHeight: t8
|
|
313
413
|
});
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
414
|
+
$[26] = align;
|
|
415
|
+
$[27] = insets;
|
|
416
|
+
$[28] = sideOffset;
|
|
417
|
+
$[29] = t8;
|
|
418
|
+
$[30] = trigger;
|
|
419
|
+
$[31] = window;
|
|
420
|
+
$[32] = t9;
|
|
321
421
|
} else {
|
|
322
|
-
|
|
422
|
+
t9 = $[32];
|
|
323
423
|
}
|
|
324
|
-
const position =
|
|
325
|
-
const
|
|
326
|
-
let
|
|
327
|
-
if ($[
|
|
328
|
-
|
|
424
|
+
const position = t9;
|
|
425
|
+
const transformOrigin = `${align === "end" ? 100 : 0}% ${position.bottom === undefined ? 0 : 100}%`;
|
|
426
|
+
let t10;
|
|
427
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
428
|
+
t10 = {
|
|
329
429
|
flex: 1
|
|
330
430
|
};
|
|
331
|
-
$[
|
|
431
|
+
$[33] = t10;
|
|
332
432
|
} else {
|
|
333
|
-
|
|
433
|
+
t10 = $[33];
|
|
334
434
|
}
|
|
335
|
-
let
|
|
336
|
-
if ($[
|
|
337
|
-
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
435
|
+
let t11;
|
|
436
|
+
if ($[34] !== close) {
|
|
437
|
+
t11 = <Pressable testID="DropdownMenu-backdrop" accessibilityRole="button" accessibilityLabel="Close menu" onPress={close} style={StyleSheet.absoluteFill} />;
|
|
438
|
+
$[34] = close;
|
|
439
|
+
$[35] = t11;
|
|
340
440
|
} else {
|
|
341
|
-
|
|
441
|
+
t11 = $[35];
|
|
342
442
|
}
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
443
|
+
const t12 = open ? "auto" : "none";
|
|
444
|
+
const t13 = window.width - insets.left - insets.right - 2 * DROPDOWN_MENU.edge;
|
|
445
|
+
const t14 = contentHeight === null ? 0 : 1;
|
|
446
|
+
let t15;
|
|
447
|
+
if ($[36] !== position || $[37] !== t13 || $[38] !== t14) {
|
|
448
|
+
t15 = {
|
|
348
449
|
position: "absolute",
|
|
349
450
|
...position,
|
|
350
451
|
minWidth: DROPDOWN_MENU.minWidth,
|
|
351
|
-
maxWidth:
|
|
352
|
-
opacity:
|
|
353
|
-
};
|
|
354
|
-
$[19] = position;
|
|
355
|
-
$[20] = t8;
|
|
356
|
-
$[21] = t9;
|
|
357
|
-
$[22] = t10;
|
|
358
|
-
} else {
|
|
359
|
-
t10 = $[22];
|
|
360
|
-
}
|
|
361
|
-
let t11;
|
|
362
|
-
if ($[23] !== position.maxHeight) {
|
|
363
|
-
t11 = {
|
|
364
|
-
maxHeight: position.maxHeight
|
|
452
|
+
maxWidth: t13,
|
|
453
|
+
opacity: t14
|
|
365
454
|
};
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
let t12;
|
|
372
|
-
let t13;
|
|
373
|
-
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
374
|
-
t12 = (_width, height) => setContentHeight(height);
|
|
375
|
-
t13 = {
|
|
376
|
-
padding: DROPDOWN_MENU.padding
|
|
377
|
-
};
|
|
378
|
-
$[25] = t12;
|
|
379
|
-
$[26] = t13;
|
|
380
|
-
} else {
|
|
381
|
-
t12 = $[25];
|
|
382
|
-
t13 = $[26];
|
|
383
|
-
}
|
|
384
|
-
let t14;
|
|
385
|
-
if ($[27] !== className) {
|
|
386
|
-
t14 = cn(className);
|
|
387
|
-
$[27] = className;
|
|
388
|
-
$[28] = t14;
|
|
389
|
-
} else {
|
|
390
|
-
t14 = $[28];
|
|
391
|
-
}
|
|
392
|
-
let t15;
|
|
393
|
-
if ($[29] !== children || $[30] !== props || $[31] !== style || $[32] !== t14) {
|
|
394
|
-
t15 = <ScrollView bounces={false} showsVerticalScrollIndicator={false} onContentSizeChange={t12} contentContainerStyle={t13}><View className={t14} style={style} {...props}>{children}</View></ScrollView>;
|
|
395
|
-
$[29] = children;
|
|
396
|
-
$[30] = props;
|
|
397
|
-
$[31] = style;
|
|
398
|
-
$[32] = t14;
|
|
399
|
-
$[33] = t15;
|
|
455
|
+
$[36] = position;
|
|
456
|
+
$[37] = t13;
|
|
457
|
+
$[38] = t14;
|
|
458
|
+
$[39] = t15;
|
|
400
459
|
} else {
|
|
401
|
-
t15 = $[
|
|
460
|
+
t15 = $[39];
|
|
402
461
|
}
|
|
403
462
|
let t16;
|
|
404
|
-
if ($[
|
|
405
|
-
t16 =
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
$[
|
|
463
|
+
if ($[40] !== transformOrigin) {
|
|
464
|
+
t16 = {
|
|
465
|
+
transformOrigin
|
|
466
|
+
};
|
|
467
|
+
$[40] = transformOrigin;
|
|
468
|
+
$[41] = t16;
|
|
409
469
|
} else {
|
|
410
|
-
t16 = $[
|
|
470
|
+
t16 = $[41];
|
|
411
471
|
}
|
|
412
472
|
let t17;
|
|
413
|
-
if ($[
|
|
414
|
-
t17 =
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[40] = t17;
|
|
473
|
+
if ($[42] !== panelStyle || $[43] !== t16) {
|
|
474
|
+
t17 = [t16, panelStyle];
|
|
475
|
+
$[42] = panelStyle;
|
|
476
|
+
$[43] = t16;
|
|
477
|
+
$[44] = t17;
|
|
419
478
|
} else {
|
|
420
|
-
t17 = $[
|
|
479
|
+
t17 = $[44];
|
|
421
480
|
}
|
|
422
481
|
let t18;
|
|
423
|
-
if ($[
|
|
424
|
-
t18 =
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
$[
|
|
428
|
-
} else {
|
|
429
|
-
t18 = $[43];
|
|
430
|
-
}
|
|
431
|
-
let t19;
|
|
432
|
-
if ($[44] !== close || $[45] !== open || $[46] !== t18 || $[47] !== t5) {
|
|
433
|
-
t19 = <Modal visible={open} transparent={true} animationType={t5} statusBarTranslucent={true} onRequestClose={close}>{t18}</Modal>;
|
|
434
|
-
$[44] = close;
|
|
435
|
-
$[45] = open;
|
|
482
|
+
if ($[45] !== position.maxHeight) {
|
|
483
|
+
t18 = {
|
|
484
|
+
maxHeight: position.maxHeight
|
|
485
|
+
};
|
|
486
|
+
$[45] = position.maxHeight;
|
|
436
487
|
$[46] = t18;
|
|
437
|
-
$[47] = t5;
|
|
438
|
-
$[48] = t19;
|
|
439
488
|
} else {
|
|
440
|
-
|
|
489
|
+
t18 = $[46];
|
|
441
490
|
}
|
|
442
|
-
|
|
491
|
+
let t19;
|
|
492
|
+
let t20;
|
|
493
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
494
|
+
t19 = (_width, height) => setContentHeight(height);
|
|
495
|
+
t20 = {
|
|
496
|
+
padding: DROPDOWN_MENU.padding
|
|
497
|
+
};
|
|
498
|
+
$[47] = t19;
|
|
499
|
+
$[48] = t20;
|
|
500
|
+
} else {
|
|
501
|
+
t19 = $[47];
|
|
502
|
+
t20 = $[48];
|
|
503
|
+
}
|
|
504
|
+
let t21;
|
|
505
|
+
if ($[49] !== className) {
|
|
506
|
+
t21 = cn(className);
|
|
507
|
+
$[49] = className;
|
|
508
|
+
$[50] = t21;
|
|
509
|
+
} else {
|
|
510
|
+
t21 = $[50];
|
|
511
|
+
}
|
|
512
|
+
let t22;
|
|
513
|
+
if ($[51] !== children || $[52] !== props || $[53] !== style || $[54] !== t21) {
|
|
514
|
+
t22 = <ScrollView bounces={false} showsVerticalScrollIndicator={false} onContentSizeChange={t19} contentContainerStyle={t20}><View className={t21} style={style} {...props}>{children}</View></ScrollView>;
|
|
515
|
+
$[51] = children;
|
|
516
|
+
$[52] = props;
|
|
517
|
+
$[53] = style;
|
|
518
|
+
$[54] = t21;
|
|
519
|
+
$[55] = t22;
|
|
520
|
+
} else {
|
|
521
|
+
t22 = $[55];
|
|
522
|
+
}
|
|
523
|
+
let t23;
|
|
524
|
+
if ($[56] !== t18 || $[57] !== t22) {
|
|
525
|
+
t23 = <FloatingSurface blur={false} radius={DROPDOWN_MENU.radius} style={t18}>{t22}</FloatingSurface>;
|
|
526
|
+
$[56] = t18;
|
|
527
|
+
$[57] = t22;
|
|
528
|
+
$[58] = t23;
|
|
529
|
+
} else {
|
|
530
|
+
t23 = $[58];
|
|
531
|
+
}
|
|
532
|
+
let t24;
|
|
533
|
+
if ($[59] !== t17 || $[60] !== t23) {
|
|
534
|
+
t24 = <Animated.View style={t17}>{t23}</Animated.View>;
|
|
535
|
+
$[59] = t17;
|
|
536
|
+
$[60] = t23;
|
|
537
|
+
$[61] = t24;
|
|
538
|
+
} else {
|
|
539
|
+
t24 = $[61];
|
|
540
|
+
}
|
|
541
|
+
let t25;
|
|
542
|
+
if ($[62] !== close || $[63] !== t12 || $[64] !== t15 || $[65] !== t24) {
|
|
543
|
+
t25 = <View accessibilityRole="menu" accessibilityViewIsModal={true} onAccessibilityEscape={close} pointerEvents={t12} style={t15}>{t24}</View>;
|
|
544
|
+
$[62] = close;
|
|
545
|
+
$[63] = t12;
|
|
546
|
+
$[64] = t15;
|
|
547
|
+
$[65] = t24;
|
|
548
|
+
$[66] = t25;
|
|
549
|
+
} else {
|
|
550
|
+
t25 = $[66];
|
|
551
|
+
}
|
|
552
|
+
let t26;
|
|
553
|
+
if ($[67] !== t11 || $[68] !== t25) {
|
|
554
|
+
t26 = <View style={t10} pointerEvents="box-none">{t11}{t25}</View>;
|
|
555
|
+
$[67] = t11;
|
|
556
|
+
$[68] = t25;
|
|
557
|
+
$[69] = t26;
|
|
558
|
+
} else {
|
|
559
|
+
t26 = $[69];
|
|
560
|
+
}
|
|
561
|
+
let t27;
|
|
562
|
+
if ($[70] !== close || $[71] !== shown || $[72] !== t26) {
|
|
563
|
+
t27 = <Modal visible={shown} transparent={true} animationType="none" statusBarTranslucent={true} onRequestClose={close}>{t26}</Modal>;
|
|
564
|
+
$[70] = close;
|
|
565
|
+
$[71] = shown;
|
|
566
|
+
$[72] = t26;
|
|
567
|
+
$[73] = t27;
|
|
568
|
+
} else {
|
|
569
|
+
t27 = $[73];
|
|
570
|
+
}
|
|
571
|
+
return t27;
|
|
443
572
|
}
|
|
444
573
|
|
|
445
574
|
/** Item type and icon size: the web `text-sm` with a 16 icon in 48 rows, or `text-lg` with a 22 icon and 56 rows with larger text. */
|
package/dist/FloatingFAB.jsx
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { Platform,
|
|
2
|
+
import { Platform, View } from "react-native";
|
|
3
3
|
import { cn } from "./cn";
|
|
4
4
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
5
5
|
import { FloatingSurface } from "./FloatingSurface";
|
|
6
|
+
import { AnimatedPressable, usePressScale } from "./pressScale";
|
|
6
7
|
import { useAccentColor, useLargerText } from "./theme";
|
|
7
8
|
import { FLOATING_INSET, FLOATING_TAB_BAR_HEIGHT, FLOATING_TAB_BAR_HEIGHT_LARGE } from "./floating";
|
|
8
9
|
export function FloatingFAB(t0) {
|
|
9
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(25);
|
|
10
11
|
const {
|
|
11
12
|
onPress,
|
|
12
13
|
label,
|
|
@@ -16,80 +17,95 @@ export function FloatingFAB(t0) {
|
|
|
16
17
|
const insets = useSafeAreaInsets();
|
|
17
18
|
const largerText = useLargerText();
|
|
18
19
|
const accentColor = useAccentColor();
|
|
19
|
-
const size = largerText ? 64 : 56;
|
|
20
|
-
const tabBar = largerText ? FLOATING_TAB_BAR_HEIGHT_LARGE : FLOATING_TAB_BAR_HEIGHT;
|
|
21
20
|
let t1;
|
|
22
21
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
-
t1 =
|
|
22
|
+
t1 = {
|
|
23
|
+
scale: 0.95
|
|
24
|
+
};
|
|
24
25
|
$[0] = t1;
|
|
25
26
|
} else {
|
|
26
27
|
t1 = $[0];
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
bottom: t3
|
|
35
|
-
};
|
|
29
|
+
const press = usePressScale(t1);
|
|
30
|
+
const size = largerText ? 64 : 56;
|
|
31
|
+
const tabBar = largerText ? FLOATING_TAB_BAR_HEIGHT_LARGE : FLOATING_TAB_BAR_HEIGHT;
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
+
t2 = cn("z-10", Platform.OS === "web" ? "fixed" : "absolute");
|
|
36
35
|
$[1] = t2;
|
|
37
|
-
$[2] = t3;
|
|
38
|
-
$[3] = t4;
|
|
39
36
|
} else {
|
|
40
|
-
|
|
37
|
+
t2 = $[1];
|
|
41
38
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return {
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
justifyContent: "center",
|
|
52
|
-
width: size,
|
|
53
|
-
height: size,
|
|
54
|
-
backgroundColor: accentColor,
|
|
55
|
-
opacity: pressed ? 0.7 : 1
|
|
56
|
-
};
|
|
39
|
+
const t3 = insets.right + FLOATING_INSET;
|
|
40
|
+
const t4 = FLOATING_INSET + Math.max(insets.bottom, 8) + tabBar + 20;
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[2] !== t3 || $[3] !== t4) {
|
|
43
|
+
t5 = {
|
|
44
|
+
right: t3,
|
|
45
|
+
bottom: t4
|
|
57
46
|
};
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
47
|
+
$[2] = t3;
|
|
48
|
+
$[3] = t4;
|
|
49
|
+
$[4] = t5;
|
|
61
50
|
} else {
|
|
62
|
-
|
|
51
|
+
t5 = $[4];
|
|
63
52
|
}
|
|
53
|
+
const t6 = size / 2;
|
|
64
54
|
let t7;
|
|
65
|
-
if ($[
|
|
66
|
-
t7 =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
if ($[5] !== accentColor || $[6] !== size) {
|
|
56
|
+
t7 = {
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
width: size,
|
|
60
|
+
height: size,
|
|
61
|
+
backgroundColor: accentColor
|
|
62
|
+
};
|
|
63
|
+
$[5] = accentColor;
|
|
64
|
+
$[6] = size;
|
|
65
|
+
$[7] = t7;
|
|
73
66
|
} else {
|
|
74
|
-
t7 = $[
|
|
67
|
+
t7 = $[7];
|
|
75
68
|
}
|
|
76
69
|
let t8;
|
|
77
|
-
if ($[
|
|
78
|
-
t8 =
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
70
|
+
if ($[8] !== press.style || $[9] !== t7) {
|
|
71
|
+
t8 = [t7, press.style];
|
|
72
|
+
$[8] = press.style;
|
|
73
|
+
$[9] = t7;
|
|
74
|
+
$[10] = t8;
|
|
82
75
|
} else {
|
|
83
|
-
t8 = $[
|
|
76
|
+
t8 = $[10];
|
|
84
77
|
}
|
|
85
78
|
let t9;
|
|
86
|
-
if ($[16] !==
|
|
87
|
-
t9 = <
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
79
|
+
if ($[11] !== children || $[12] !== label || $[13] !== onPress || $[14] !== press.onPressIn || $[15] !== press.onPressOut || $[16] !== t8 || $[17] !== testID) {
|
|
80
|
+
t9 = <AnimatedPressable testID={testID} accessibilityRole="button" accessibilityLabel={label} onPress={onPress} onPressIn={press.onPressIn} onPressOut={press.onPressOut} style={t8}>{children}</AnimatedPressable>;
|
|
81
|
+
$[11] = children;
|
|
82
|
+
$[12] = label;
|
|
83
|
+
$[13] = onPress;
|
|
84
|
+
$[14] = press.onPressIn;
|
|
85
|
+
$[15] = press.onPressOut;
|
|
86
|
+
$[16] = t8;
|
|
87
|
+
$[17] = testID;
|
|
90
88
|
$[18] = t9;
|
|
91
89
|
} else {
|
|
92
90
|
t9 = $[18];
|
|
93
91
|
}
|
|
94
|
-
|
|
92
|
+
let t10;
|
|
93
|
+
if ($[19] !== t6 || $[20] !== t9) {
|
|
94
|
+
t10 = <FloatingSurface radius={t6} blur={false}>{t9}</FloatingSurface>;
|
|
95
|
+
$[19] = t6;
|
|
96
|
+
$[20] = t9;
|
|
97
|
+
$[21] = t10;
|
|
98
|
+
} else {
|
|
99
|
+
t10 = $[21];
|
|
100
|
+
}
|
|
101
|
+
let t11;
|
|
102
|
+
if ($[22] !== t10 || $[23] !== t5) {
|
|
103
|
+
t11 = <View pointerEvents="box-none" className={t2} style={t5}>{t10}</View>;
|
|
104
|
+
$[22] = t10;
|
|
105
|
+
$[23] = t5;
|
|
106
|
+
$[24] = t11;
|
|
107
|
+
} else {
|
|
108
|
+
t11 = $[24];
|
|
109
|
+
}
|
|
110
|
+
return t11;
|
|
95
111
|
}
|