@btndprojects/loam-ui-native 0.1.1 → 0.3.1
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/accordion/index.js +7 -3
- package/dist/adaptive/index.js +16 -2
- package/dist/address-block/index.js +23 -0
- package/dist/alert/index.js +8 -2
- package/dist/analyzer/index.js +17 -6
- package/dist/announcement/index.js +18 -5
- package/dist/appearance-picker/index.js +15 -0
- package/dist/audio-player/index.js +29 -3
- package/dist/avatar/index.js +5 -2
- package/dist/avatar-group/index.js +9 -3
- package/dist/badge/index.js +10 -4
- package/dist/banner/index.js +6 -2
- package/dist/board/index.js +18 -6
- package/dist/button/index.js +9 -3
- package/dist/camera-permission/index.js +23 -12
- package/dist/capture-result/index.js +30 -17
- package/dist/card/index.js +10 -3
- package/dist/card-form/index.js +19 -9
- package/dist/carousel/index.js +6 -2
- package/dist/chart/index.js +18 -5
- package/dist/charts/index.js +21 -6
- package/dist/chat/index.js +41 -0
- package/dist/checkbox/index.js +9 -5
- package/dist/checklist/index.js +20 -8
- package/dist/checkout/index.js +30 -12
- package/dist/chip/index.js +11 -5
- package/dist/chunk-2BZD3NAP.js +1110 -0
- package/dist/chunk-2YKVID2V.js +35 -0
- package/dist/{chunk-JUAMLEHX.js → chunk-36DA3IPO.js} +137 -37
- package/dist/chunk-3A56MIAN.js +599 -0
- package/dist/chunk-3SCKCWF5.js +298 -0
- package/dist/chunk-3TZNDHKO.js +187 -0
- package/dist/chunk-43K3BLXV.js +9 -0
- package/dist/chunk-46ZJIQ2Z.js +208 -0
- package/dist/chunk-4CZMQDQL.js +192 -0
- package/dist/chunk-5DTKORLI.js +255 -0
- package/dist/{chunk-LOE5YNN3.js → chunk-5J4WFXFA.js} +68 -24
- package/dist/chunk-5KJ7TEQ6.js +305 -0
- package/dist/chunk-5NU33TXK.js +529 -0
- package/dist/chunk-5Z5ZYMOJ.js +1 -0
- package/dist/chunk-6KSUS7DF.js +690 -0
- package/dist/chunk-6RV6UW2J.js +349 -0
- package/dist/chunk-6RZM7RP2.js +520 -0
- package/dist/{chunk-4BXMXBJO.js → chunk-75BDCC7K.js} +24 -11
- package/dist/{chunk-PZXZJBMP.js → chunk-7CGJBQUA.js} +357 -32
- package/dist/{chunk-CJ5EOYZE.js → chunk-7IVF6JLJ.js} +24 -7
- package/dist/chunk-7IWCGXYA.js +143 -0
- package/dist/chunk-7LM4ASFH.js +172 -0
- package/dist/chunk-7MCEJFWV.js +341 -0
- package/dist/chunk-7NGMUVNU.js +245 -0
- package/dist/chunk-7PBSIXT7.js +355 -0
- package/dist/chunk-7QOYGENL.js +443 -0
- package/dist/{chunk-H6NIOQHK.js → chunk-A7SWYDE5.js} +66 -15
- package/dist/chunk-ADHPJALR.js +3051 -0
- package/dist/chunk-ALJYZLNQ.js +509 -0
- package/dist/chunk-APCWFOZW.js +28 -0
- package/dist/chunk-AQ5FIG74.js +419 -0
- package/dist/chunk-AWKQIE5I.js +139 -0
- package/dist/chunk-B2MMZZQB.js +426 -0
- package/dist/{chunk-ZVFE5QGU.js → chunk-B7JZ3N5G.js} +174 -97
- package/dist/chunk-BL37SW6G.js +1314 -0
- package/dist/chunk-BTRMA7GC.js +21 -0
- package/dist/chunk-C7IUWIUZ.js +643 -0
- package/dist/chunk-CA3DUVYD.js +10 -0
- package/dist/{chunk-S7F6XLTK.js → chunk-CBCJSO2B.js} +213 -54
- package/dist/chunk-CHPX4MFI.js +239 -0
- package/dist/chunk-CLGAMIOT.js +648 -0
- package/dist/chunk-CUE7VML6.js +1141 -0
- package/dist/chunk-CVU6S2E5.js +1587 -0
- package/dist/{chunk-AZRX6SAC.js → chunk-CXPQMA6Z.js} +112 -37
- package/dist/chunk-D2LN4I7I.js +581 -0
- package/dist/{chunk-UWFLYMAR.js → chunk-D34LNBO5.js} +635 -238
- package/dist/chunk-D4BCQICM.js +765 -0
- package/dist/chunk-EABKIIA4.js +1 -0
- package/dist/chunk-EICSYRAG.js +341 -0
- package/dist/chunk-EMWAJMAS.js +83 -0
- package/dist/chunk-EOLZWRV6.js +149 -0
- package/dist/chunk-EOQVTGB6.js +350 -0
- package/dist/{chunk-BEDBFJND.js → chunk-ESGUHNB2.js} +119 -43
- package/dist/{chunk-Q72LJOVE.js → chunk-F2KNBPKY.js} +74 -18
- package/dist/{chunk-O7AE6DAF.js → chunk-G7H3NX3G.js} +57 -24
- package/dist/chunk-GM7YIPB7.js +1052 -0
- package/dist/chunk-GVQQG435.js +581 -0
- package/dist/chunk-HE43OMEL.js +1056 -0
- package/dist/chunk-HHOMFQ7R.js +2535 -0
- package/dist/chunk-HJFFOOJ4.js +1 -0
- package/dist/chunk-HNAKS4Z3.js +207 -0
- package/dist/chunk-HP6ST2OW.js +352 -0
- package/dist/chunk-HW3OWDTU.js +1 -0
- package/dist/{chunk-3ENTMPQY.js → chunk-HZDB44K4.js} +102 -52
- package/dist/chunk-I2KLQ2HA.js +19 -0
- package/dist/chunk-I6CUP2LW.js +1155 -0
- package/dist/chunk-ICV4Y2WY.js +27 -0
- package/dist/chunk-IHSIENOE.js +3950 -0
- package/dist/{chunk-CUMUNPXY.js → chunk-IMMALLRU.js} +68 -32
- package/dist/chunk-J64KGCGX.js +55 -0
- package/dist/{chunk-IVNRBPGC.js → chunk-JA6TK7H2.js} +255 -84
- package/dist/{chunk-OOPPQH27.js → chunk-JAVZ5JPV.js} +83 -29
- package/dist/chunk-JCMTP3E4.js +1251 -0
- package/dist/{chunk-U7TFM2JA.js → chunk-JCXFFK64.js} +75 -18
- package/dist/chunk-JWCVBFDU.js +236 -0
- package/dist/chunk-JXRTD5RI.js +414 -0
- package/dist/chunk-JYIUZUIQ.js +1567 -0
- package/dist/chunk-K3TK3GIV.js +219 -0
- package/dist/chunk-KEVZIHM2.js +1511 -0
- package/dist/chunk-KHZDNQQD.js +171 -0
- package/dist/chunk-KL4GDV4V.js +131 -0
- package/dist/chunk-KNILMM4H.js +225 -0
- package/dist/chunk-KRBUZV45.js +25 -0
- package/dist/{chunk-ITTYJZWX.js → chunk-KXLDK6HB.js} +161 -45
- package/dist/chunk-KZ3X7TSL.js +196 -0
- package/dist/chunk-L2WMOA2V.js +474 -0
- package/dist/chunk-L4D5LHCH.js +109 -0
- package/dist/chunk-LAUJPLDB.js +853 -0
- package/dist/{chunk-SBMNWWBV.js → chunk-LGNTP5XA.js} +89 -17
- package/dist/chunk-LUZFCCSD.js +271 -0
- package/dist/{chunk-HPPW424V.js → chunk-LXJCP4PL.js} +129 -37
- package/dist/chunk-MCOZJWPU.js +731 -0
- package/dist/chunk-MG4SKWLL.js +2587 -0
- package/dist/chunk-MPEPTSER.js +414 -0
- package/dist/chunk-MWPJ4YGP.js +1 -0
- package/dist/{chunk-TKQYWZ5V.js → chunk-N7AX4OA4.js} +108 -41
- package/dist/chunk-NHSLM6SE.js +523 -0
- package/dist/chunk-NNCOFLNE.js +24 -0
- package/dist/{chunk-J7Q7VCVC.js → chunk-NNJLVA7M.js} +54 -15
- package/dist/chunk-NZG75DGA.js +282 -0
- package/dist/chunk-O76QXRBV.js +431 -0
- package/dist/chunk-OANH27AK.js +223 -0
- package/dist/chunk-OCHPK5YV.js +609 -0
- package/dist/chunk-OMHVEVX4.js +436 -0
- package/dist/{chunk-YF4NSSMT.js → chunk-ONKQUJWD.js} +220 -65
- package/dist/chunk-OVTK7A6T.js +615 -0
- package/dist/chunk-PCEFCOLN.js +120 -0
- package/dist/chunk-PFLNFIVB.js +186 -0
- package/dist/chunk-PHSZY37H.js +300 -0
- package/dist/chunk-PJLTKDVY.js +18 -0
- package/dist/{chunk-4YIP3CWS.js → chunk-PK7BN3MI.js} +89 -19
- package/dist/{chunk-KMI5ML5I.js → chunk-PWFRDRGS.js} +155 -29
- package/dist/chunk-PYPMD46W.js +707 -0
- package/dist/chunk-Q6CCHDI7.js +331 -0
- package/dist/chunk-QFA5WS2A.js +750 -0
- package/dist/chunk-QJMMM4RC.js +124 -0
- package/dist/chunk-QNZII37O.js +10 -0
- package/dist/chunk-QYWEVAM6.js +407 -0
- package/dist/chunk-R5T4VZ7Z.js +126 -0
- package/dist/chunk-R77HFLZD.js +1 -0
- package/dist/{chunk-YC6WORFL.js → chunk-RAESDNU5.js} +228 -102
- package/dist/chunk-RBYQUXNL.js +1 -0
- package/dist/chunk-RCM3DT5E.js +1 -0
- package/dist/chunk-RGNY56L7.js +282 -0
- package/dist/chunk-RIK6UX2K.js +344 -0
- package/dist/{chunk-LAECSR4H.js → chunk-RJA3RXO3.js} +75 -60
- package/dist/chunk-RJYRJ3LD.js +1 -0
- package/dist/chunk-RMA3NOY4.js +599 -0
- package/dist/{chunk-DM5QUKKO.js → chunk-RSWKKAHK.js} +160 -66
- package/dist/chunk-RVOIIX3V.js +204 -0
- package/dist/chunk-SA2RRBGT.js +1077 -0
- package/dist/chunk-SG3J4R45.js +1428 -0
- package/dist/chunk-SPUK7JD4.js +238 -0
- package/dist/chunk-SWXV2K5N.js +434 -0
- package/dist/chunk-SYJEPXP6.js +1303 -0
- package/dist/{chunk-N32RGOA5.js → chunk-SZLI34TA.js} +93 -28
- package/dist/{chunk-4GBOGOTV.js → chunk-T77WJA74.js} +143 -18
- package/dist/chunk-TDWWVJA4.js +630 -0
- package/dist/chunk-TFHI5XDR.js +610 -0
- package/dist/chunk-TH4PW2WU.js +17 -0
- package/dist/chunk-TTQ24HQX.js +12 -0
- package/dist/chunk-TUACVJNG.js +12 -0
- package/dist/{chunk-CYRBHQQZ.js → chunk-TUL5RUIA.js} +201 -59
- package/dist/{chunk-4ZAHCY44.js → chunk-TYOSA7JG.js} +74 -38
- package/dist/chunk-TYQTMMEV.js +1 -0
- package/dist/chunk-TZO6YDS7.js +346 -0
- package/dist/chunk-U3ETF22F.js +328 -0
- package/dist/chunk-U6BYHD2N.js +213 -0
- package/dist/{chunk-WSW6ZFAQ.js → chunk-UF6EJXPQ.js} +20 -5
- package/dist/chunk-UNNQIPGK.js +792 -0
- package/dist/chunk-UQEN55EY.js +1 -0
- package/dist/chunk-UQVO6AJV.js +171 -0
- package/dist/chunk-VFDQAAIW.js +351 -0
- package/dist/chunk-VIUE3VQT.js +1 -0
- package/dist/chunk-VJLSSSGC.js +438 -0
- package/dist/chunk-VLMT6KYT.js +350 -0
- package/dist/chunk-VMHGBUGS.js +35 -0
- package/dist/{chunk-7O2FMUPT.js → chunk-VQKPBYW6.js} +400 -139
- package/dist/{chunk-EJBDRVIH.js → chunk-VSSTWLC5.js} +61 -16
- package/dist/chunk-VZYYZRPN.js +1992 -0
- package/dist/chunk-W23G6JLF.js +37 -0
- package/dist/chunk-WAIJCD2V.js +480 -0
- package/dist/chunk-WFMQ3WKM.js +378 -0
- package/dist/chunk-WJ2KDRMY.js +66 -0
- package/dist/chunk-WKFZJO54.js +437 -0
- package/dist/{chunk-SYNOJOQO.js → chunk-WVVD3XOV.js} +189 -93
- package/dist/chunk-XAIWMSLB.js +1 -0
- package/dist/chunk-XBXUBBJZ.js +98 -0
- package/dist/chunk-XCU7MYBJ.js +1 -0
- package/dist/chunk-XHE4PGCI.js +717 -0
- package/dist/chunk-XRSJ32M3.js +331 -0
- package/dist/chunk-XTCVOEAW.js +1 -0
- package/dist/chunk-XWGXVQF6.js +58 -0
- package/dist/{chunk-35OFI3JG.js → chunk-Y3XKKO5K.js} +258 -123
- package/dist/chunk-Y4QNMBLO.js +533 -0
- package/dist/chunk-Y5H4CTKO.js +1 -0
- package/dist/chunk-YBQIN75A.js +403 -0
- package/dist/chunk-YJ5PXOX3.js +158 -0
- package/dist/{chunk-AWJOCGFZ.js → chunk-YLRSRUPS.js} +81 -55
- package/dist/chunk-YM6MPJ4A.js +1 -0
- package/dist/chunk-YV7KZENV.js +200 -0
- package/dist/chunk-Z7I4ZSO6.js +316 -0
- package/dist/chunk-ZIRMWD2B.js +555 -0
- package/dist/chunk-ZPMG3FWU.js +75 -0
- package/dist/{chunk-QWCMU5B2.js → chunk-ZTXMK2G7.js} +289 -115
- package/dist/chunk-ZVJCWXAL.js +541 -0
- package/dist/{chunk-P23EQNRQ.js → chunk-ZYQ23DPT.js} +215 -49
- package/dist/coachmark/index.js +10 -3
- package/dist/code-block/index.js +6 -3
- package/dist/color-field/index.js +15 -5
- package/dist/color-picker/index.js +23 -0
- package/dist/commerce/index.js +31 -17
- package/dist/confirm/index.js +31 -0
- package/dist/connection-card/index.js +34 -0
- package/dist/connectivity/index.js +6 -2
- package/dist/context-menu/index.js +13 -3
- package/dist/copy-button/index.js +5 -2
- package/dist/data-grid/index.js +35 -17
- package/dist/date-range-picker/index.js +22 -9
- package/dist/description-list/index.js +6 -1
- package/dist/device-frame/index.js +30 -0
- package/dist/dialog/index.js +10 -2
- package/dist/divider/index.js +2 -0
- package/dist/empty-state/index.js +15 -2
- package/dist/error-summary/index.js +9 -2
- package/dist/fab/index.js +7 -2
- package/dist/file-manager/index.js +44 -0
- package/dist/file-upload/index.js +16 -7
- package/dist/filter-bar/index.js +14 -7
- package/dist/flow-run/index.js +23 -13
- package/dist/form/index.js +32 -3
- package/dist/gallery/index.js +8 -2
- package/dist/hold-to-confirm/index.js +6 -2
- package/dist/hover-card/index.js +18 -0
- package/dist/icon-tile/index.js +10 -0
- package/dist/image/index.js +9 -0
- package/dist/index.d.ts +30789 -12332
- package/dist/index.js +424 -135
- package/dist/infinite-list/index.js +6 -2
- package/dist/inline-edit/index.js +8 -5
- package/dist/input/index.js +7 -4
- package/dist/interactions/index.js +5 -1
- package/dist/invoice/index.js +22 -9
- package/dist/job-row/index.js +22 -0
- package/dist/json-inspector/index.js +20 -0
- package/dist/kbd/index.js +5 -1
- package/dist/keyboard/index.js +9 -2
- package/dist/level-meter/index.js +9 -0
- package/dist/list-row/index.js +14 -4
- package/dist/log-viewer/index.js +11 -2
- package/dist/map-view/index.js +16 -3
- package/dist/markdown/index.js +12 -6
- package/dist/metric/index.js +10 -4
- package/dist/metric-strip/index.js +12 -0
- package/dist/money/index.js +16 -3
- package/dist/nav-drawer/index.js +8 -2
- package/dist/nav-header/index.js +15 -0
- package/dist/navigation/index.js +32 -2
- package/dist/notification-center/index.js +28 -12
- package/dist/number-roll/index.js +7 -2
- package/dist/onboarding-pager/index.js +22 -0
- package/dist/one-handed/index.js +5 -3
- package/dist/os-surfaces/index.js +9 -3
- package/dist/otp/index.js +9 -5
- package/dist/page-header/index.js +3 -1
- package/dist/pagination/index.js +8 -0
- package/dist/payment-method/index.js +21 -11
- package/dist/payment-status/index.js +26 -15
- package/dist/permission/index.js +21 -2
- package/dist/picker/index.js +22 -6
- package/dist/progress/index.js +11 -3
- package/dist/provenance/index.js +16 -0
- package/dist/pull-to-refresh/index.js +4 -2
- package/dist/qr-code/index.js +16 -0
- package/dist/query-builder/index.js +30 -0
- package/dist/radio-group/index.js +9 -5
- package/dist/rating/index.js +10 -2
- package/dist/receivables/index.js +35 -17
- package/dist/recording-indicator/index.js +21 -0
- package/dist/refund/index.js +28 -15
- package/dist/repeatable-rows/index.js +19 -0
- package/dist/save-status/index.js +7 -3
- package/dist/screen/index.js +3 -0
- package/dist/scroll-area/index.js +3 -1
- package/dist/search-field/index.js +13 -0
- package/dist/secret-field/index.js +19 -0
- package/dist/section-header/index.js +4 -0
- package/dist/segmented-control/index.js +4 -3
- package/dist/sheet/index.js +11 -3
- package/dist/shortcuts-sheet/index.js +2 -0
- package/dist/sign-in-screen/index.js +25 -0
- package/dist/skeleton/index.js +5 -1
- package/dist/slider/index.js +5 -2
- package/dist/sortable/index.js +8 -0
- package/dist/spinner/index.js +4 -1
- package/dist/split-button/index.js +21 -6
- package/dist/spotlight/index.js +9 -1
- package/dist/stack/index.js +2 -0
- package/dist/stage-timeline/index.js +8 -3
- package/dist/status-dot/index.js +8 -2
- package/dist/stepper/index.js +11 -4
- package/dist/streaming-text/index.js +4 -2
- package/dist/survey/index.js +29 -16
- package/dist/switch/index.js +9 -3
- package/dist/system-state/index.js +15 -4
- package/dist/tab-bar/index.js +13 -2
- package/dist/tabs/index.js +12 -2
- package/dist/tags-input/index.js +13 -0
- package/dist/text/index.js +4 -0
- package/dist/textarea/index.js +8 -5
- package/dist/thinking/index.js +6 -1
- package/dist/tile-rail/index.js +10 -0
- package/dist/time-field/index.js +20 -0
- package/dist/time-range-control/index.js +36 -0
- package/dist/timeline/index.js +4 -2
- package/dist/toast/index.js +6 -2
- package/dist/toolbar/index.js +5 -2
- package/dist/tour/index.js +15 -10
- package/dist/transcript/index.js +28 -0
- package/dist/truncation-notice/index.js +5 -2
- package/dist/update-notice/index.js +19 -9
- package/dist/video-player/index.js +29 -2
- package/dist/viewfinder/index.js +15 -5
- package/dist/widget/index.js +14 -4
- package/dist/wizard/index.js +10 -4
- package/package.json +13 -12
- package/dist/chunk-223Q2T2Q.js +0 -229
- package/dist/chunk-2A5NIQAK.js +0 -254
- package/dist/chunk-2GK6PHGE.js +0 -363
- package/dist/chunk-2ZZ7TDJ4.js +0 -324
- package/dist/chunk-3ARE4TES.js +0 -195
- package/dist/chunk-3NMD74ZU.js +0 -4
- package/dist/chunk-3WPW4KUN.js +0 -182
- package/dist/chunk-423B7SPN.js +0 -993
- package/dist/chunk-47FWHGUN.js +0 -394
- package/dist/chunk-4DS5ZWVC.js +0 -83
- package/dist/chunk-4SZYY6AN.js +0 -99
- package/dist/chunk-4YQOR7JM.js +0 -204
- package/dist/chunk-52X2VYTD.js +0 -228
- package/dist/chunk-5YNTNN5A.js +0 -177
- package/dist/chunk-6HT2LP62.js +0 -504
- package/dist/chunk-6N33LFQA.js +0 -35
- package/dist/chunk-6X6PQ443.js +0 -432
- package/dist/chunk-7CFF4HXS.js +0 -126
- package/dist/chunk-AI4DWZCD.js +0 -162
- package/dist/chunk-BTTFCMKG.js +0 -166
- package/dist/chunk-BV3B2HYZ.js +0 -1635
- package/dist/chunk-C2NTXVWM.js +0 -98
- package/dist/chunk-CDRZHT42.js +0 -424
- package/dist/chunk-DHWADYZX.js +0 -144
- package/dist/chunk-F5XNPWS7.js +0 -1024
- package/dist/chunk-FMYDDECK.js +0 -1521
- package/dist/chunk-GDKZTW34.js +0 -395
- package/dist/chunk-GL7B2DOW.js +0 -134
- package/dist/chunk-GNNJ4GCC.js +0 -471
- package/dist/chunk-HET4LLMX.js +0 -129
- package/dist/chunk-HZ6CNMAF.js +0 -870
- package/dist/chunk-IIQTAY3J.js +0 -715
- package/dist/chunk-JNH2TYIN.js +0 -96
- package/dist/chunk-JNY4ZHAR.js +0 -634
- package/dist/chunk-JXJB2X6M.js +0 -131
- package/dist/chunk-LRJNDEIA.js +0 -302
- package/dist/chunk-LSS54GLJ.js +0 -116
- package/dist/chunk-LZLHELAG.js +0 -137
- package/dist/chunk-MOUJOP55.js +0 -425
- package/dist/chunk-NKB7BZYK.js +0 -167
- package/dist/chunk-NQYBUO3K.js +0 -1795
- package/dist/chunk-O4AEHWII.js +0 -464
- package/dist/chunk-OETCUXQP.js +0 -134
- package/dist/chunk-OPXFZ4Y5.js +0 -204
- package/dist/chunk-PJXUJYS6.js +0 -248
- package/dist/chunk-PUPM2YGF.js +0 -376
- package/dist/chunk-QCDXZBC5.js +0 -247
- package/dist/chunk-QDYDBCFP.js +0 -197
- package/dist/chunk-QJJ6MADV.js +0 -274
- package/dist/chunk-QKXCPTFS.js +0 -349
- package/dist/chunk-RIBDXGUG.js +0 -108
- package/dist/chunk-RJQOOHT2.js +0 -214
- package/dist/chunk-RNGLIHFA.js +0 -191
- package/dist/chunk-RQ3HASCC.js +0 -6
- package/dist/chunk-RSOJT5YW.js +0 -124
- package/dist/chunk-RUZHTGKB.js +0 -237
- package/dist/chunk-RW6ZL2FQ.js +0 -284
- package/dist/chunk-TKVFVF5D.js +0 -95
- package/dist/chunk-TOXAGRDQ.js +0 -144
- package/dist/chunk-TUTI5HOZ.js +0 -112
- package/dist/chunk-UC2WGUP3.js +0 -627
- package/dist/chunk-UYG5L34B.js +0 -87
- package/dist/chunk-VBOXAEPI.js +0 -336
- package/dist/chunk-VCDBXW5H.js +0 -188
- package/dist/chunk-VEAYTRPX.js +0 -414
- package/dist/chunk-VQHPQEUH.js +0 -273
- package/dist/chunk-VXDZFJGP.js +0 -874
- package/dist/chunk-XNUVB5OL.js +0 -375
- package/dist/chunk-XOSCY2CW.js +0 -242
- package/dist/chunk-XXXEFXY5.js +0 -99
- package/dist/chunk-YDGVJETP.js +0 -60
- package/dist/chunk-YG3ZJHGU.js +0 -223
- package/dist/chunk-YTFKPRUK.js +0 -845
- package/dist/chunk-Z7H7VSFZ.js +0 -323
- package/dist/header/index.js +0 -5
- package/dist/search-bar/index.js +0 -5
- /package/dist/{chunk-3ECPOSKO.js → chunk-3BKLBYPK.js} +0 -0
- /package/dist/{chunk-JRLTGLN4.js → chunk-3UG6JUCV.js} +0 -0
- /package/dist/{chunk-RTIKSY6A.js → chunk-4QCR3K2J.js} +0 -0
- /package/dist/{chunk-VFCUIDRT.js → chunk-5WWRTEPS.js} +0 -0
|
@@ -0,0 +1,1314 @@
|
|
|
1
|
+
import { useOptionalConfirm } from './chunk-7QOYGENL.js';
|
|
2
|
+
import { alignItemsStyle } from './chunk-TUACVJNG.js';
|
|
3
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
4
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
5
|
+
import { springConfig } from './chunk-J64KGCGX.js';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { StyleSheet, Pressable, ActivityIndicator, Text, useWindowDimensions, Animated, Easing, AccessibilityInfo, Platform, findNodeHandle, BackHandler, PanResponder, View, Alert } from 'react-native';
|
|
8
|
+
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
9
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
// src/navigation/labels.ts
|
|
12
|
+
var DEFAULT_NAVIGATION_LABELS = {
|
|
13
|
+
back: "Back",
|
|
14
|
+
backTo: (title) => `Back to ${title}`,
|
|
15
|
+
cancel: "Cancel",
|
|
16
|
+
dismiss: "Dismiss",
|
|
17
|
+
discardTitle: "Discard changes?",
|
|
18
|
+
discardBody: "Your changes won\u2019t be saved.",
|
|
19
|
+
discard: "Discard",
|
|
20
|
+
keepEditing: "Keep editing"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// src/navigation/geometry.ts
|
|
24
|
+
var NAV_PARALLAX_RATIO = 0.3;
|
|
25
|
+
var NAV_EDGE_HIT_WIDTH = 20;
|
|
26
|
+
var NAV_AXIS_LOCK_SLOP = 8;
|
|
27
|
+
var NAV_SWIPE_COMPLETE_FRACTION = 0.5;
|
|
28
|
+
var NAV_SWIPE_COMPLETE_VELOCITY = 0.5;
|
|
29
|
+
var NAV_PREDICTIVE_SCALE = 0.9;
|
|
30
|
+
var NAV_PREDICTIVE_SHIFT = 0.05;
|
|
31
|
+
var NAV_PREDICTIVE_SPAN = 0.4;
|
|
32
|
+
var NAV_PREDICTIVE_FADE = 0.7;
|
|
33
|
+
var NAV_TAB_FADE_SCALE = 0.97;
|
|
34
|
+
var NAV_HERO_CONTENT_FADE_START = 0.5;
|
|
35
|
+
var NAV_MODAL_TOP_INSET = 34;
|
|
36
|
+
var NAV_MODAL_HEADER_HEIGHT = 48;
|
|
37
|
+
function clampProgress(progress) {
|
|
38
|
+
if (Number.isNaN(progress)) return 0;
|
|
39
|
+
return Math.max(0, Math.min(1, progress));
|
|
40
|
+
}
|
|
41
|
+
function directionSign(rtl) {
|
|
42
|
+
return rtl ? -1 : 1;
|
|
43
|
+
}
|
|
44
|
+
function incomingTranslateX(progress, width, rtl) {
|
|
45
|
+
return (1 - clampProgress(progress)) * width * directionSign(rtl);
|
|
46
|
+
}
|
|
47
|
+
function parallaxTranslateX(progress, width, rtl) {
|
|
48
|
+
return -clampProgress(progress) * width * NAV_PARALLAX_RATIO * directionSign(rtl);
|
|
49
|
+
}
|
|
50
|
+
function parallaxDimOpacity(progress) {
|
|
51
|
+
return clampProgress(progress);
|
|
52
|
+
}
|
|
53
|
+
function progressFromEdgeSwipe(dx, width, rtl) {
|
|
54
|
+
if (width <= 0) return 1;
|
|
55
|
+
const travelled = dx * directionSign(rtl);
|
|
56
|
+
return 1 - clampProgress(travelled / width);
|
|
57
|
+
}
|
|
58
|
+
function shouldCompletePop(dx, vx, width, rtl) {
|
|
59
|
+
const sign = directionSign(rtl);
|
|
60
|
+
const travelled = dx * sign;
|
|
61
|
+
const velocity = vx * sign;
|
|
62
|
+
if (travelled <= 0) return false;
|
|
63
|
+
return travelled >= width * NAV_SWIPE_COMPLETE_FRACTION || velocity >= NAV_SWIPE_COMPLETE_VELOCITY;
|
|
64
|
+
}
|
|
65
|
+
function claimsHorizontalAxis(dx, dy, slop = NAV_AXIS_LOCK_SLOP) {
|
|
66
|
+
return Math.abs(dx) > slop && Math.abs(dx) > Math.abs(dy);
|
|
67
|
+
}
|
|
68
|
+
function isFromLeadingEdge(x, width, rtl, edgeWidth = NAV_EDGE_HIT_WIDTH) {
|
|
69
|
+
return rtl ? x >= width - edgeWidth : x <= edgeWidth;
|
|
70
|
+
}
|
|
71
|
+
function isFromTrailingEdge(x, width, rtl, edgeWidth = NAV_EDGE_HIT_WIDTH) {
|
|
72
|
+
return isFromLeadingEdge(x, width, !rtl, edgeWidth);
|
|
73
|
+
}
|
|
74
|
+
function predictiveTravel(dx, fromLeading, rtl) {
|
|
75
|
+
return dx * directionSign(rtl) * (fromLeading ? 1 : -1);
|
|
76
|
+
}
|
|
77
|
+
function predictivePeek(travel, width) {
|
|
78
|
+
if (width <= 0) return 0;
|
|
79
|
+
return clampProgress(travel / (width * NAV_PREDICTIVE_SPAN));
|
|
80
|
+
}
|
|
81
|
+
function predictiveScale(peek) {
|
|
82
|
+
return 1 - (1 - NAV_PREDICTIVE_SCALE) * clampProgress(peek);
|
|
83
|
+
}
|
|
84
|
+
function predictiveShift(peek, width, fromLeading, rtl) {
|
|
85
|
+
return clampProgress(peek) * width * NAV_PREDICTIVE_SHIFT * directionSign(rtl) * (fromLeading ? 1 : -1);
|
|
86
|
+
}
|
|
87
|
+
function modalTranslateY(progress, height) {
|
|
88
|
+
return (1 - clampProgress(progress)) * height;
|
|
89
|
+
}
|
|
90
|
+
function tabFadeScale(progress) {
|
|
91
|
+
const p = clampProgress(progress);
|
|
92
|
+
return NAV_TAB_FADE_SCALE + (1 - NAV_TAB_FADE_SCALE) * p;
|
|
93
|
+
}
|
|
94
|
+
function heroContentOpacity(progress) {
|
|
95
|
+
const p = clampProgress(progress);
|
|
96
|
+
if (p <= NAV_HERO_CONTENT_FADE_START) return 0;
|
|
97
|
+
return (p - NAV_HERO_CONTENT_FADE_START) / (1 - NAV_HERO_CONTENT_FADE_START);
|
|
98
|
+
}
|
|
99
|
+
function heroTransform(from, to, progress) {
|
|
100
|
+
const p = clampProgress(progress);
|
|
101
|
+
const scaleX = to.width > 0 ? from.width / to.width : 1;
|
|
102
|
+
const scaleY = to.height > 0 ? from.height / to.height : 1;
|
|
103
|
+
const dx = from.x + from.width / 2 - (to.x + to.width / 2);
|
|
104
|
+
const dy = from.y + from.height / 2 - (to.y + to.height / 2);
|
|
105
|
+
return {
|
|
106
|
+
translateX: dx * (1 - p),
|
|
107
|
+
translateY: dy * (1 - p),
|
|
108
|
+
scaleX: scaleX + (1 - scaleX) * p,
|
|
109
|
+
scaleY: scaleY + (1 - scaleY) * p
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function NavBackButton({
|
|
113
|
+
onPress,
|
|
114
|
+
previousTitle,
|
|
115
|
+
labelled = false,
|
|
116
|
+
platform: platformProp,
|
|
117
|
+
accessibilityLabel,
|
|
118
|
+
disabled = false,
|
|
119
|
+
variant = "ghost",
|
|
120
|
+
size,
|
|
121
|
+
tone = "default",
|
|
122
|
+
fullWidth = false,
|
|
123
|
+
leading,
|
|
124
|
+
trailing,
|
|
125
|
+
loading = false,
|
|
126
|
+
motion = "full",
|
|
127
|
+
labels: labelsProp
|
|
128
|
+
}) {
|
|
129
|
+
const labels = useLabels("navigation", DEFAULT_NAVIGATION_LABELS, labelsProp);
|
|
130
|
+
const theme = useLoamTheme("navigation");
|
|
131
|
+
const platform = platformProp ?? navPlatform(theme.platform);
|
|
132
|
+
const { styles } = useStyles(sheet, { platform });
|
|
133
|
+
const back = theme.rtl ? "chevron-right" : "chevron-left";
|
|
134
|
+
const arrow = theme.rtl ? "arrow-right" : "arrow-left";
|
|
135
|
+
const showTitle = platform === "iOS" && (previousTitle !== void 0 || labelled);
|
|
136
|
+
const label = accessibilityLabel ?? (previousTitle ? labels.backTo(previousTitle) : labels.back);
|
|
137
|
+
const ink = tone === "danger" ? theme.color.danger : tone === "accent" ? theme.color.accentStrong : platform === "iOS" ? theme.color.accentStrong : theme.color.text;
|
|
138
|
+
return /* @__PURE__ */ jsxs(
|
|
139
|
+
Pressable,
|
|
140
|
+
{
|
|
141
|
+
accessibilityRole: "button",
|
|
142
|
+
accessibilityLabel: label,
|
|
143
|
+
accessibilityState: { disabled, busy: loading || void 0 },
|
|
144
|
+
"aria-busy": loading || void 0,
|
|
145
|
+
disabled,
|
|
146
|
+
onPress: disabled || loading ? void 0 : onPress,
|
|
147
|
+
android_ripple: platform === "Android" && motion === "full" && !theme.reduceMotion ? { color: theme.state.pressed, borderless: true } : void 0,
|
|
148
|
+
style: ({ pressed }) => [
|
|
149
|
+
styles.back,
|
|
150
|
+
size ? {
|
|
151
|
+
minHeight: theme.ctl[size],
|
|
152
|
+
...platform === "Android" ? { width: theme.ctl[size], height: theme.ctl[size] } : null
|
|
153
|
+
} : null,
|
|
154
|
+
variant === "tonal" ? { backgroundColor: theme.color.accentSoft, paddingStart: theme.space.s2 } : null,
|
|
155
|
+
variant === "outline" ? {
|
|
156
|
+
borderWidth: theme.borderWidth.base,
|
|
157
|
+
borderColor: theme.color.borderStrong,
|
|
158
|
+
paddingStart: theme.space.s2
|
|
159
|
+
} : null,
|
|
160
|
+
fullWidth ? { alignSelf: "stretch", justifyContent: "center", width: void 0 } : null,
|
|
161
|
+
disabled ? styles.backDisabled : null,
|
|
162
|
+
pressed && !disabled && motion === "full" && !theme.reduceMotion ? styles.backPressed : null
|
|
163
|
+
],
|
|
164
|
+
children: [
|
|
165
|
+
leading,
|
|
166
|
+
loading ? /* @__PURE__ */ jsx(ActivityIndicator, { "aria-hidden": true, color: ink }) : /* @__PURE__ */ jsx(
|
|
167
|
+
Icon,
|
|
168
|
+
{
|
|
169
|
+
name: platform === "iOS" ? back : arrow,
|
|
170
|
+
size: platform === "iOS" ? theme.icon.md : theme.icon.lg,
|
|
171
|
+
color: ink
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
showTitle ? /* @__PURE__ */ jsx(
|
|
175
|
+
Text,
|
|
176
|
+
{
|
|
177
|
+
numberOfLines: 1,
|
|
178
|
+
style: [styles.backLabel, tone !== "default" ? { color: ink } : null],
|
|
179
|
+
children: previousTitle ?? labels.back
|
|
180
|
+
}
|
|
181
|
+
) : null,
|
|
182
|
+
trailing
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
function NavBar({
|
|
188
|
+
platform,
|
|
189
|
+
title,
|
|
190
|
+
previousTitle,
|
|
191
|
+
onBack,
|
|
192
|
+
backLabel,
|
|
193
|
+
labels,
|
|
194
|
+
leading,
|
|
195
|
+
trailing,
|
|
196
|
+
size = "md",
|
|
197
|
+
density = "standard",
|
|
198
|
+
variant = "bar",
|
|
199
|
+
labelled = false
|
|
200
|
+
}) {
|
|
201
|
+
const theme = useLoamTheme("navigation");
|
|
202
|
+
const { styles } = useStyles(sheet, { platform });
|
|
203
|
+
return /* @__PURE__ */ jsxs(
|
|
204
|
+
View,
|
|
205
|
+
{
|
|
206
|
+
style: [
|
|
207
|
+
styles.bar,
|
|
208
|
+
size === "compact" ? { height: theme.ctl.lg } : null,
|
|
209
|
+
density === "compact" ? { paddingHorizontal: theme.space.s2, gap: theme.space.s1 } : null,
|
|
210
|
+
variant === "borderless" ? { borderBottomWidth: 0 } : null
|
|
211
|
+
],
|
|
212
|
+
children: [
|
|
213
|
+
onBack ? /* @__PURE__ */ jsx(
|
|
214
|
+
NavBackButton,
|
|
215
|
+
{
|
|
216
|
+
platform,
|
|
217
|
+
previousTitle,
|
|
218
|
+
labelled,
|
|
219
|
+
accessibilityLabel: previousTitle ? void 0 : backLabel,
|
|
220
|
+
labels,
|
|
221
|
+
onPress: onBack
|
|
222
|
+
}
|
|
223
|
+
) : leading,
|
|
224
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", numberOfLines: 1, style: styles.barTitle, children: title }),
|
|
225
|
+
trailing ? /* @__PURE__ */ jsx(View, { style: styles.barTrailing, children: trailing }) : null
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
function setInert(node, hidden) {
|
|
231
|
+
if (Platform.OS !== "web" || node == null) return;
|
|
232
|
+
node.inert = hidden;
|
|
233
|
+
}
|
|
234
|
+
function navPlatform(platform) {
|
|
235
|
+
return platform === "Android" ? "Android" : "iOS";
|
|
236
|
+
}
|
|
237
|
+
function NavStack({
|
|
238
|
+
screens,
|
|
239
|
+
onPop,
|
|
240
|
+
onExit,
|
|
241
|
+
platform: platformProp,
|
|
242
|
+
swipeEnabled,
|
|
243
|
+
orientation = "horizontal",
|
|
244
|
+
backLabel: backLabelProp,
|
|
245
|
+
showBackLabel = false,
|
|
246
|
+
labels: labelsProp,
|
|
247
|
+
announce = true,
|
|
248
|
+
size = "md",
|
|
249
|
+
density = "standard",
|
|
250
|
+
variant = "bar",
|
|
251
|
+
style
|
|
252
|
+
}) {
|
|
253
|
+
const labels = useLabels("navigation", DEFAULT_NAVIGATION_LABELS, labelsProp);
|
|
254
|
+
const backLabel = backLabelProp ?? labels.back;
|
|
255
|
+
const theme = useLoamTheme("navigation");
|
|
256
|
+
const platform = platformProp ?? navPlatform(theme.platform);
|
|
257
|
+
const { styles } = useStyles(sheet, { platform });
|
|
258
|
+
const rtl = theme.rtl;
|
|
259
|
+
const reduce = theme.reduceMotion;
|
|
260
|
+
const window = useWindowDimensions();
|
|
261
|
+
const depth = screens.length;
|
|
262
|
+
const top = depth > 0 ? screens[depth - 1] : void 0;
|
|
263
|
+
const below = depth > 1 ? screens[depth - 2] : void 0;
|
|
264
|
+
const [width, setWidth] = React.useState(window.width);
|
|
265
|
+
const [height, setHeight] = React.useState(window.height);
|
|
266
|
+
const vertical = orientation === "vertical";
|
|
267
|
+
const onRootLayout = (e) => {
|
|
268
|
+
const next = e.nativeEvent.layout.width;
|
|
269
|
+
if (next > 0) setWidth(next);
|
|
270
|
+
const nextH = e.nativeEvent.layout.height;
|
|
271
|
+
if (nextH > 0) setHeight(nextH);
|
|
272
|
+
};
|
|
273
|
+
const progress = React.useRef(new Animated.Value(1)).current;
|
|
274
|
+
const peek = React.useRef(new Animated.Value(0)).current;
|
|
275
|
+
const [peekFrom, setPeekFrom] = React.useState(null);
|
|
276
|
+
const [exiting, setExiting] = React.useState(null);
|
|
277
|
+
const over = exiting ?? top;
|
|
278
|
+
const under = exiting ? top : below;
|
|
279
|
+
const page = theme.motion.page;
|
|
280
|
+
const pageEasing = React.useMemo(() => Easing.bezier(...page.easing), [page.easing]);
|
|
281
|
+
const live = React.useRef({ top, below, onPop, onExit, width, rtl });
|
|
282
|
+
live.current = { top, below, onPop, onExit, width, rtl };
|
|
283
|
+
const screenRef = React.useRef(null);
|
|
284
|
+
const announceRef = React.useRef(null);
|
|
285
|
+
const pendingFocusRef = React.useRef(null);
|
|
286
|
+
const skipExitRef = React.useRef(false);
|
|
287
|
+
const historyRef = React.useRef(null);
|
|
288
|
+
const revealTop = React.useCallback(
|
|
289
|
+
(screen) => {
|
|
290
|
+
if (announce) {
|
|
291
|
+
const text = screen.announcement ?? screen.title;
|
|
292
|
+
if (announceRef.current !== text) AccessibilityInfo.announceForAccessibility(text);
|
|
293
|
+
announceRef.current = text;
|
|
294
|
+
}
|
|
295
|
+
pendingFocusRef.current = screen.key;
|
|
296
|
+
},
|
|
297
|
+
[announce]
|
|
298
|
+
);
|
|
299
|
+
React.useEffect(() => {
|
|
300
|
+
const wanted = pendingFocusRef.current;
|
|
301
|
+
if (wanted === null || wanted !== top?.key) return;
|
|
302
|
+
pendingFocusRef.current = null;
|
|
303
|
+
const node = screenRef.current;
|
|
304
|
+
if (!node || Platform.OS === "web") return;
|
|
305
|
+
const tag = findNodeHandle(node);
|
|
306
|
+
if (tag !== null) AccessibilityInfo.setAccessibilityFocus(tag);
|
|
307
|
+
});
|
|
308
|
+
React.useEffect(() => {
|
|
309
|
+
const previous = historyRef.current;
|
|
310
|
+
if (top) historyRef.current = { depth, key: top.key, screen: top };
|
|
311
|
+
if (!top) return;
|
|
312
|
+
if (!previous) return;
|
|
313
|
+
if (previous.key === top.key) return;
|
|
314
|
+
if (skipExitRef.current) {
|
|
315
|
+
skipExitRef.current = false;
|
|
316
|
+
progress.setValue(1);
|
|
317
|
+
peek.setValue(0);
|
|
318
|
+
setPeekFrom(null);
|
|
319
|
+
revealTop(top);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (depth < previous.depth) {
|
|
323
|
+
setExiting(previous.screen);
|
|
324
|
+
progress.setValue(1);
|
|
325
|
+
Animated.timing(progress, {
|
|
326
|
+
toValue: 0,
|
|
327
|
+
duration: page.duration,
|
|
328
|
+
easing: pageEasing,
|
|
329
|
+
useNativeDriver: true
|
|
330
|
+
}).start(({ finished }) => {
|
|
331
|
+
if (finished) {
|
|
332
|
+
setExiting(null);
|
|
333
|
+
progress.setValue(1);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
} else {
|
|
337
|
+
progress.setValue(0);
|
|
338
|
+
Animated.timing(progress, {
|
|
339
|
+
toValue: 1,
|
|
340
|
+
duration: page.duration,
|
|
341
|
+
easing: pageEasing,
|
|
342
|
+
useNativeDriver: true
|
|
343
|
+
}).start();
|
|
344
|
+
}
|
|
345
|
+
revealTop(top);
|
|
346
|
+
}, [depth, top?.key]);
|
|
347
|
+
React.useEffect(() => {
|
|
348
|
+
if (platform !== "Android") return;
|
|
349
|
+
const subscription = BackHandler.addEventListener("hardwareBackPress", () => {
|
|
350
|
+
const { top: current, below: parent, onPop: pop, onExit: exit } = live.current;
|
|
351
|
+
if (!current || !parent) {
|
|
352
|
+
exit?.();
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
pop?.(current, "system-back");
|
|
356
|
+
return true;
|
|
357
|
+
});
|
|
358
|
+
return () => subscription?.remove();
|
|
359
|
+
}, [platform]);
|
|
360
|
+
const canPop = under !== void 0 && over !== void 0;
|
|
361
|
+
const swipeActive = (swipeEnabled ?? true) && !vertical && canPop && exiting === null;
|
|
362
|
+
const startXRef = React.useRef(0);
|
|
363
|
+
const fromLeadingRef = React.useRef(true);
|
|
364
|
+
const swipeRef = React.useRef({ active: swipeActive, page, pageEasing, platform, theme });
|
|
365
|
+
swipeRef.current = { active: swipeActive, page, pageEasing, platform, theme };
|
|
366
|
+
const settle = (t, android, speed, w) => {
|
|
367
|
+
if (android) {
|
|
368
|
+
const velocity2 = w > 0 ? speed / (w * NAV_PREDICTIVE_SPAN) * 1e3 : 0;
|
|
369
|
+
Animated.spring(peek, {
|
|
370
|
+
toValue: 0,
|
|
371
|
+
...springConfig(t, "ss", { velocity: velocity2 }),
|
|
372
|
+
useNativeDriver: true
|
|
373
|
+
}).start(({ finished }) => {
|
|
374
|
+
if (finished) setPeekFrom(null);
|
|
375
|
+
});
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const velocity = w > 0 ? -speed / w * 1e3 : 0;
|
|
379
|
+
Animated.spring(progress, {
|
|
380
|
+
toValue: 1,
|
|
381
|
+
...springConfig(t, "ss", { velocity }),
|
|
382
|
+
useNativeDriver: true
|
|
383
|
+
}).start();
|
|
384
|
+
};
|
|
385
|
+
const settleRef = React.useRef(settle);
|
|
386
|
+
settleRef.current = settle;
|
|
387
|
+
const pan = React.useMemo(
|
|
388
|
+
() => PanResponder.create({
|
|
389
|
+
onStartShouldSetPanResponderCapture: (e) => {
|
|
390
|
+
startXRef.current = e.nativeEvent.locationX;
|
|
391
|
+
return false;
|
|
392
|
+
},
|
|
393
|
+
onMoveShouldSetPanResponder: (_e, g) => {
|
|
394
|
+
if (!swipeRef.current.active) return false;
|
|
395
|
+
if (!claimsHorizontalAxis(g.dx, g.dy)) return false;
|
|
396
|
+
const { width: w, rtl: isRtl } = live.current;
|
|
397
|
+
const x = startXRef.current;
|
|
398
|
+
if (isFromLeadingEdge(x, w, isRtl)) {
|
|
399
|
+
fromLeadingRef.current = true;
|
|
400
|
+
return true;
|
|
401
|
+
}
|
|
402
|
+
if (swipeRef.current.platform === "Android" && isFromTrailingEdge(x, w, isRtl)) {
|
|
403
|
+
fromLeadingRef.current = false;
|
|
404
|
+
return true;
|
|
405
|
+
}
|
|
406
|
+
return false;
|
|
407
|
+
},
|
|
408
|
+
onPanResponderGrant: () => {
|
|
409
|
+
if (swipeRef.current.platform !== "Android") return;
|
|
410
|
+
peek.stopAnimation();
|
|
411
|
+
setPeekFrom(fromLeadingRef.current ? "leading" : "trailing");
|
|
412
|
+
},
|
|
413
|
+
onPanResponderMove: (_e, g) => {
|
|
414
|
+
const { width: w, rtl: isRtl } = live.current;
|
|
415
|
+
if (swipeRef.current.platform === "Android") {
|
|
416
|
+
const travel = predictiveTravel(g.dx, fromLeadingRef.current, isRtl);
|
|
417
|
+
peek.setValue(predictivePeek(travel, w));
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
progress.setValue(progressFromEdgeSwipe(g.dx, w, isRtl));
|
|
421
|
+
},
|
|
422
|
+
onPanResponderRelease: (_e, g) => {
|
|
423
|
+
const { top: current, width: w, rtl: isRtl, onPop: pop } = live.current;
|
|
424
|
+
const { page: spec, pageEasing: easing, platform: os } = swipeRef.current;
|
|
425
|
+
const android = os === "Android";
|
|
426
|
+
const fromLeading2 = android ? fromLeadingRef.current : true;
|
|
427
|
+
const travel = predictiveTravel(g.dx, fromLeading2, isRtl);
|
|
428
|
+
const speed = predictiveTravel(g.vx, fromLeading2, isRtl);
|
|
429
|
+
if (current && shouldCompletePop(travel, speed, w, false)) {
|
|
430
|
+
Animated.timing(progress, {
|
|
431
|
+
toValue: 0,
|
|
432
|
+
duration: spec.duration,
|
|
433
|
+
easing,
|
|
434
|
+
useNativeDriver: true
|
|
435
|
+
}).start(({ finished }) => {
|
|
436
|
+
if (!finished) return;
|
|
437
|
+
skipExitRef.current = true;
|
|
438
|
+
pop?.(current, android ? "system-back" : "edge-swipe");
|
|
439
|
+
});
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
settleRef.current(swipeRef.current.theme, android, speed, w);
|
|
443
|
+
},
|
|
444
|
+
onPanResponderTerminate: () => {
|
|
445
|
+
const { platform: os, theme: t } = swipeRef.current;
|
|
446
|
+
settleRef.current(t, os === "Android", 0, live.current.width);
|
|
447
|
+
}
|
|
448
|
+
}),
|
|
449
|
+
[progress, peek]
|
|
450
|
+
);
|
|
451
|
+
const overTranslateX = React.useMemo(
|
|
452
|
+
() => progress.interpolate({
|
|
453
|
+
inputRange: [0, 1],
|
|
454
|
+
outputRange: [incomingTranslateX(0, width, rtl), incomingTranslateX(1, width, rtl)]
|
|
455
|
+
}),
|
|
456
|
+
[progress, width, rtl]
|
|
457
|
+
);
|
|
458
|
+
const underTranslateX = React.useMemo(
|
|
459
|
+
() => progress.interpolate({
|
|
460
|
+
inputRange: [0, 1],
|
|
461
|
+
outputRange: [parallaxTranslateX(0, width, rtl), parallaxTranslateX(1, width, rtl)]
|
|
462
|
+
}),
|
|
463
|
+
[progress, width, rtl]
|
|
464
|
+
);
|
|
465
|
+
const dimOpacity = React.useMemo(
|
|
466
|
+
() => progress.interpolate({
|
|
467
|
+
inputRange: [0, 1],
|
|
468
|
+
outputRange: [parallaxDimOpacity(0), parallaxDimOpacity(1)]
|
|
469
|
+
}),
|
|
470
|
+
[progress]
|
|
471
|
+
);
|
|
472
|
+
const fromLeading = peekFrom !== "trailing";
|
|
473
|
+
const peekScale = React.useMemo(
|
|
474
|
+
() => peek.interpolate({
|
|
475
|
+
inputRange: [0, 1],
|
|
476
|
+
outputRange: [predictiveScale(0), predictiveScale(1)]
|
|
477
|
+
}),
|
|
478
|
+
[peek]
|
|
479
|
+
);
|
|
480
|
+
const peekShift = React.useMemo(
|
|
481
|
+
() => peek.interpolate({
|
|
482
|
+
inputRange: [0, 1],
|
|
483
|
+
outputRange: [0, predictiveShift(1, width, fromLeading, rtl)]
|
|
484
|
+
}),
|
|
485
|
+
[peek, width, fromLeading, rtl]
|
|
486
|
+
);
|
|
487
|
+
const peekUnwind = React.useMemo(
|
|
488
|
+
() => peek.interpolate({ inputRange: [0, 1], outputRange: [1, 0], extrapolate: "clamp" }),
|
|
489
|
+
[peek]
|
|
490
|
+
);
|
|
491
|
+
const peekFade = React.useMemo(
|
|
492
|
+
() => peek.interpolate({ inputRange: [0, 1], outputRange: [1, NAV_PREDICTIVE_FADE] }),
|
|
493
|
+
[peek]
|
|
494
|
+
);
|
|
495
|
+
const overTranslateY = React.useMemo(
|
|
496
|
+
() => progress.interpolate({
|
|
497
|
+
inputRange: [0, 1],
|
|
498
|
+
outputRange: [modalTranslateY(0, height), modalTranslateY(1, height)]
|
|
499
|
+
}),
|
|
500
|
+
[progress, height]
|
|
501
|
+
);
|
|
502
|
+
const overStyle = reduce ? { opacity: Animated.multiply(progress, peekFade) } : vertical ? { transform: [{ translateY: overTranslateY }] } : {
|
|
503
|
+
transform: [
|
|
504
|
+
{ translateX: Animated.add(overTranslateX, peekShift) },
|
|
505
|
+
{ scale: peekScale }
|
|
506
|
+
]
|
|
507
|
+
};
|
|
508
|
+
const underStyle = reduce || vertical ? {} : { transform: [{ translateX: Animated.multiply(underTranslateX, peekUnwind) }] };
|
|
509
|
+
const underDim = Animated.multiply(dimOpacity, peekUnwind);
|
|
510
|
+
if (!over) return /* @__PURE__ */ jsx(View, { style: [styles.root, style] });
|
|
511
|
+
const rootScreen = screens[0];
|
|
512
|
+
const overIsRoot = over === rootScreen;
|
|
513
|
+
const underIsRoot = under !== void 0 && under === rootScreen;
|
|
514
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles.root, style], onLayout: onRootLayout, children: [
|
|
515
|
+
under ? /* @__PURE__ */ jsxs(
|
|
516
|
+
Animated.View,
|
|
517
|
+
{
|
|
518
|
+
ref: (node) => {
|
|
519
|
+
if (exiting) screenRef.current = node;
|
|
520
|
+
setInert(node, !exiting);
|
|
521
|
+
},
|
|
522
|
+
role: "group",
|
|
523
|
+
accessibilityLabel: under.title,
|
|
524
|
+
...exiting ? null : {
|
|
525
|
+
accessibilityElementsHidden: true,
|
|
526
|
+
importantForAccessibility: "no-hide-descendants",
|
|
527
|
+
pointerEvents: "none",
|
|
528
|
+
"aria-hidden": true
|
|
529
|
+
},
|
|
530
|
+
style: [styles.screen, underIsRoot ? styles.screenRoot : styles.screenPushed, underStyle],
|
|
531
|
+
children: [
|
|
532
|
+
under.hideBar ? null : /* @__PURE__ */ jsx(
|
|
533
|
+
NavBar,
|
|
534
|
+
{
|
|
535
|
+
platform,
|
|
536
|
+
title: under.title,
|
|
537
|
+
leading: under.leading,
|
|
538
|
+
trailing: under.trailing,
|
|
539
|
+
backLabel,
|
|
540
|
+
labelled: showBackLabel,
|
|
541
|
+
labels: labelsProp,
|
|
542
|
+
size,
|
|
543
|
+
density,
|
|
544
|
+
variant
|
|
545
|
+
}
|
|
546
|
+
),
|
|
547
|
+
/* @__PURE__ */ jsx(View, { style: styles.body, children: under.content }),
|
|
548
|
+
reduce ? null : /* @__PURE__ */ jsx(
|
|
549
|
+
Animated.View,
|
|
550
|
+
{
|
|
551
|
+
pointerEvents: "none",
|
|
552
|
+
style: [StyleSheet.absoluteFill, styles.dim, { opacity: underDim }]
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
under.key
|
|
558
|
+
) : null,
|
|
559
|
+
/* @__PURE__ */ jsxs(
|
|
560
|
+
Animated.View,
|
|
561
|
+
{
|
|
562
|
+
ref: (node) => {
|
|
563
|
+
if (!exiting) screenRef.current = node;
|
|
564
|
+
setInert(node, exiting !== null);
|
|
565
|
+
},
|
|
566
|
+
role: "group",
|
|
567
|
+
accessibilityLabel: over.title,
|
|
568
|
+
pointerEvents: exiting ? "none" : "auto",
|
|
569
|
+
accessibilityElementsHidden: exiting !== null,
|
|
570
|
+
importantForAccessibility: exiting ? "no-hide-descendants" : "auto",
|
|
571
|
+
...exiting ? { "aria-hidden": true } : null,
|
|
572
|
+
style: [
|
|
573
|
+
styles.screen,
|
|
574
|
+
overIsRoot ? styles.screenRoot : styles.screenPushed,
|
|
575
|
+
peekFrom !== null && !reduce ? styles.screenPeeking : null,
|
|
576
|
+
overStyle
|
|
577
|
+
],
|
|
578
|
+
...swipeActive ? pan.panHandlers : {},
|
|
579
|
+
children: [
|
|
580
|
+
over.hideBar ? null : /* @__PURE__ */ jsx(
|
|
581
|
+
NavBar,
|
|
582
|
+
{
|
|
583
|
+
platform,
|
|
584
|
+
title: over.title,
|
|
585
|
+
previousTitle: under?.title,
|
|
586
|
+
onBack: canPop ? () => {
|
|
587
|
+
const { top: current, onPop: pop } = live.current;
|
|
588
|
+
if (current) pop?.(current, "back-button");
|
|
589
|
+
} : void 0,
|
|
590
|
+
leading: over.leading,
|
|
591
|
+
trailing: over.trailing,
|
|
592
|
+
backLabel,
|
|
593
|
+
labelled: showBackLabel,
|
|
594
|
+
labels: labelsProp,
|
|
595
|
+
size,
|
|
596
|
+
density,
|
|
597
|
+
variant
|
|
598
|
+
}
|
|
599
|
+
),
|
|
600
|
+
/* @__PURE__ */ jsx(View, { style: styles.body, children: over.content })
|
|
601
|
+
]
|
|
602
|
+
},
|
|
603
|
+
over.key
|
|
604
|
+
)
|
|
605
|
+
] });
|
|
606
|
+
}
|
|
607
|
+
var sheet = createStyleSheet((theme) => ({
|
|
608
|
+
root: {
|
|
609
|
+
flex: 1,
|
|
610
|
+
overflow: "hidden",
|
|
611
|
+
backgroundColor: theme.color.bg
|
|
612
|
+
},
|
|
613
|
+
screen: {
|
|
614
|
+
...StyleSheet.absoluteFillObject,
|
|
615
|
+
flexDirection: "column"
|
|
616
|
+
},
|
|
617
|
+
// The base screen sits on the canvas; a pushed one is a `surface` card with
|
|
618
|
+
// `shadow.lg` (the design reference's `box-shadow: var(--sh-lg)`), which also
|
|
619
|
+
// carries `elevation` for Android's depth model.
|
|
620
|
+
screenRoot: {
|
|
621
|
+
backgroundColor: theme.color.bg
|
|
622
|
+
},
|
|
623
|
+
// loam-contrast-ignore — a pushed screen is full-bleed and its parent is
|
|
624
|
+
// dimmed by `scrimLight` (which high contrast leaves alone), so the shadow is
|
|
625
|
+
// depth during the transition, never the thing that draws the screen.
|
|
626
|
+
screenPushed: {
|
|
627
|
+
backgroundColor: theme.color.surface,
|
|
628
|
+
...theme.shadow.lg
|
|
629
|
+
},
|
|
630
|
+
// A screen held in a predictive-back preview reads as a card lifted off the
|
|
631
|
+
// stack: rounded and clipped to the radius while it is shrunk.
|
|
632
|
+
screenPeeking: {
|
|
633
|
+
borderRadius: theme.radius.lg,
|
|
634
|
+
overflow: "hidden"
|
|
635
|
+
},
|
|
636
|
+
// The wash over the parallaxing parent. `scrimLight` already carries the
|
|
637
|
+
// alpha, so the animation only scales it from 0 to 1.
|
|
638
|
+
dim: {
|
|
639
|
+
backgroundColor: theme.color.scrimLight
|
|
640
|
+
},
|
|
641
|
+
body: {
|
|
642
|
+
flex: 1
|
|
643
|
+
},
|
|
644
|
+
// Matches `NavHeader`'s metrics: `layout.appbarH` is the only height in the
|
|
645
|
+
// system that branches on platform (44 on iOS, 64 on Android).
|
|
646
|
+
bar: {
|
|
647
|
+
flexDirection: "row",
|
|
648
|
+
alignItems: "center",
|
|
649
|
+
height: theme.layout.appbarH,
|
|
650
|
+
paddingHorizontal: theme.space.s3,
|
|
651
|
+
gap: theme.space.s2,
|
|
652
|
+
backgroundColor: theme.color.surface,
|
|
653
|
+
borderBottomWidth: theme.borderWidth.base,
|
|
654
|
+
borderBottomColor: theme.color.border
|
|
655
|
+
},
|
|
656
|
+
// iOS: headline 17/600. Android: M3 top app bar title 22/400 (Final 05, as NavHeader).
|
|
657
|
+
// Android indents it, because its arrow carries no label to space it away
|
|
658
|
+
// from — the reference's `margin-inline-start: 8px`.
|
|
659
|
+
barTitle: {
|
|
660
|
+
flex: 1,
|
|
661
|
+
fontFamily: theme.font.sans,
|
|
662
|
+
fontWeight: theme.fontWeight.semibold,
|
|
663
|
+
fontSize: theme.type.headline.fontSize,
|
|
664
|
+
lineHeight: theme.type.headline.lineHeight,
|
|
665
|
+
letterSpacing: theme.type.headline.letterSpacing,
|
|
666
|
+
color: theme.color.text,
|
|
667
|
+
variants: {
|
|
668
|
+
platform: {
|
|
669
|
+
iOS: {},
|
|
670
|
+
// M3 top app bar title: 22 / 28 / 400 at the start (same as NavHeader).
|
|
671
|
+
Android: {
|
|
672
|
+
marginStart: theme.space.s2,
|
|
673
|
+
fontSize: theme.fontSize[22],
|
|
674
|
+
lineHeight: theme.space[28],
|
|
675
|
+
fontWeight: theme.fontWeight.regular,
|
|
676
|
+
letterSpacing: 0
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
barTrailing: {
|
|
682
|
+
flexDirection: "row",
|
|
683
|
+
alignItems: "center",
|
|
684
|
+
gap: theme.space.s1
|
|
685
|
+
},
|
|
686
|
+
back: {
|
|
687
|
+
flexDirection: "row",
|
|
688
|
+
alignItems: "center",
|
|
689
|
+
gap: theme.space.s1,
|
|
690
|
+
minHeight: theme.tapMin,
|
|
691
|
+
paddingEnd: theme.space.s1,
|
|
692
|
+
borderRadius: theme.radius.full,
|
|
693
|
+
variants: {
|
|
694
|
+
platform: {
|
|
695
|
+
// The chevron sits tight against its label; a bare arrow gets a square
|
|
696
|
+
// touch target instead.
|
|
697
|
+
iOS: { minWidth: theme.space.s7 },
|
|
698
|
+
Android: {
|
|
699
|
+
width: theme.hit.lg,
|
|
700
|
+
height: theme.hit.lg,
|
|
701
|
+
paddingEnd: 0,
|
|
702
|
+
justifyContent: "center"
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
backPressed: {
|
|
708
|
+
variants: {
|
|
709
|
+
platform: {
|
|
710
|
+
iOS: { opacity: theme.state.pressedOpacity },
|
|
711
|
+
Android: {}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
backDisabled: {
|
|
716
|
+
opacity: theme.state.disabledOpacity
|
|
717
|
+
},
|
|
718
|
+
// The nav-header back (F66): body 17 / 400 accent-strong.
|
|
719
|
+
backLabel: {
|
|
720
|
+
fontFamily: theme.font.sans,
|
|
721
|
+
fontWeight: theme.fontWeight.regular,
|
|
722
|
+
fontSize: theme.type.body.fontSize,
|
|
723
|
+
lineHeight: theme.type.body.lineHeight,
|
|
724
|
+
letterSpacing: theme.type.body.letterSpacing,
|
|
725
|
+
color: theme.color.accentStrong,
|
|
726
|
+
variants: {
|
|
727
|
+
platform: {
|
|
728
|
+
iOS: {},
|
|
729
|
+
Android: { display: "none" }
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}));
|
|
734
|
+
var FALLBACK_PANEL_HEIGHT = 640;
|
|
735
|
+
var ANDROID_MODAL_BAR_H = 64;
|
|
736
|
+
function setInert2(node, hidden) {
|
|
737
|
+
if (Platform.OS !== "web" || node == null) return;
|
|
738
|
+
node.inert = hidden;
|
|
739
|
+
}
|
|
740
|
+
function NavModal({
|
|
741
|
+
open,
|
|
742
|
+
title,
|
|
743
|
+
onDismiss,
|
|
744
|
+
dismissLabel: dismissLabelProp,
|
|
745
|
+
confirmLabel,
|
|
746
|
+
onConfirm,
|
|
747
|
+
confirmDisabled = false,
|
|
748
|
+
dirty = false,
|
|
749
|
+
loading = false,
|
|
750
|
+
tone = "accent",
|
|
751
|
+
size = "md",
|
|
752
|
+
side = "bottom",
|
|
753
|
+
presentation = "overlay",
|
|
754
|
+
platform: platformProp,
|
|
755
|
+
children,
|
|
756
|
+
announcement,
|
|
757
|
+
scrimLabel: scrimLabelProp,
|
|
758
|
+
labels: labelsProp
|
|
759
|
+
}) {
|
|
760
|
+
const labels = useLabels("navigation", DEFAULT_NAVIGATION_LABELS, labelsProp);
|
|
761
|
+
const dismissLabel = dismissLabelProp ?? labels.cancel;
|
|
762
|
+
const scrimLabel = scrimLabelProp ?? labels.dismiss;
|
|
763
|
+
const theme = useLoamTheme("navigation");
|
|
764
|
+
const { styles } = useStyles(sheet2);
|
|
765
|
+
const confirmApi = useOptionalConfirm();
|
|
766
|
+
const android = (platformProp ?? (theme.platform === "Android" ? "Android" : "iOS")) === "Android";
|
|
767
|
+
const dirtyRef = React.useRef(dirty);
|
|
768
|
+
dirtyRef.current = dirty;
|
|
769
|
+
const requestDismiss = React.useCallback(() => {
|
|
770
|
+
if (!dirtyRef.current) {
|
|
771
|
+
onDismiss();
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
if (confirmApi) {
|
|
775
|
+
void confirmApi.confirm({
|
|
776
|
+
title: labels.discardTitle,
|
|
777
|
+
body: labels.discardBody,
|
|
778
|
+
tone: "danger",
|
|
779
|
+
confirmLabel: labels.discard,
|
|
780
|
+
cancelLabel: labels.keepEditing
|
|
781
|
+
}).then((ok) => {
|
|
782
|
+
if (ok) onDismiss();
|
|
783
|
+
});
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
Alert.alert(labels.discardTitle, labels.discardBody, [
|
|
787
|
+
{ text: labels.keepEditing, style: "cancel" },
|
|
788
|
+
{ text: labels.discard, style: "destructive", onPress: onDismiss }
|
|
789
|
+
]);
|
|
790
|
+
}, [confirmApi, labels, onDismiss]);
|
|
791
|
+
React.useEffect(() => {
|
|
792
|
+
if (!open || Platform.OS === "web") return;
|
|
793
|
+
const sub = BackHandler.addEventListener("hardwareBackPress", () => {
|
|
794
|
+
requestDismiss();
|
|
795
|
+
return true;
|
|
796
|
+
});
|
|
797
|
+
return () => sub.remove();
|
|
798
|
+
}, [open, requestDismiss]);
|
|
799
|
+
const [mounted, setMounted] = React.useState(open);
|
|
800
|
+
const progress = React.useRef(new Animated.Value(0)).current;
|
|
801
|
+
const heightRef = React.useRef(FALLBACK_PANEL_HEIGHT);
|
|
802
|
+
const enter = theme.motion.enter;
|
|
803
|
+
const exit = theme.motion.exit;
|
|
804
|
+
const enterEasing = React.useMemo(() => Easing.bezier(...enter.easing), [enter.easing]);
|
|
805
|
+
const exitEasing = React.useMemo(() => Easing.bezier(...exit.easing), [exit.easing]);
|
|
806
|
+
React.useEffect(() => {
|
|
807
|
+
if (open) {
|
|
808
|
+
setMounted(true);
|
|
809
|
+
AccessibilityInfo.announceForAccessibility(announcement ?? title);
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
if (!mounted) return;
|
|
813
|
+
Animated.timing(progress, {
|
|
814
|
+
toValue: 0,
|
|
815
|
+
duration: exit.duration,
|
|
816
|
+
easing: exitEasing,
|
|
817
|
+
useNativeDriver: true
|
|
818
|
+
}).start(({ finished }) => {
|
|
819
|
+
if (finished) setMounted(false);
|
|
820
|
+
});
|
|
821
|
+
}, [open]);
|
|
822
|
+
React.useEffect(() => {
|
|
823
|
+
if (!mounted || !open) return;
|
|
824
|
+
progress.setValue(0);
|
|
825
|
+
Animated.timing(progress, {
|
|
826
|
+
toValue: 1,
|
|
827
|
+
duration: enter.duration,
|
|
828
|
+
easing: enterEasing,
|
|
829
|
+
useNativeDriver: true
|
|
830
|
+
}).start();
|
|
831
|
+
}, [mounted]);
|
|
832
|
+
const [panelHeight, setPanelHeight] = React.useState(FALLBACK_PANEL_HEIGHT);
|
|
833
|
+
const onPanelLayout = (e) => {
|
|
834
|
+
const next = e.nativeEvent.layout.height;
|
|
835
|
+
if (next > 0 && next !== heightRef.current) {
|
|
836
|
+
heightRef.current = next;
|
|
837
|
+
setPanelHeight(next);
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
const translateY = React.useMemo(
|
|
841
|
+
() => progress.interpolate({
|
|
842
|
+
inputRange: [0, 1],
|
|
843
|
+
outputRange: [
|
|
844
|
+
modalTranslateY(0, panelHeight) * (side === "top" ? -1 : 1),
|
|
845
|
+
modalTranslateY(1, panelHeight)
|
|
846
|
+
]
|
|
847
|
+
}),
|
|
848
|
+
[progress, panelHeight, side]
|
|
849
|
+
);
|
|
850
|
+
const header = /* @__PURE__ */ jsxs(
|
|
851
|
+
View,
|
|
852
|
+
{
|
|
853
|
+
style: [
|
|
854
|
+
styles.modalBar,
|
|
855
|
+
android ? styles.modalBarAndroid : null,
|
|
856
|
+
size === "compact" ? { height: theme.ctl.lg } : null
|
|
857
|
+
],
|
|
858
|
+
children: [
|
|
859
|
+
android ? /* @__PURE__ */ jsx(
|
|
860
|
+
Pressable,
|
|
861
|
+
{
|
|
862
|
+
accessibilityRole: "button",
|
|
863
|
+
accessibilityLabel: dismissLabel,
|
|
864
|
+
onPress: requestDismiss,
|
|
865
|
+
android_ripple: { color: theme.state.pressed, borderless: true },
|
|
866
|
+
style: styles.modalClose,
|
|
867
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: theme.icon.lg, color: theme.color.text })
|
|
868
|
+
}
|
|
869
|
+
) : /* @__PURE__ */ jsx(
|
|
870
|
+
Pressable,
|
|
871
|
+
{
|
|
872
|
+
accessibilityRole: "button",
|
|
873
|
+
accessibilityLabel: dismissLabel,
|
|
874
|
+
onPress: requestDismiss,
|
|
875
|
+
style: ({ pressed }) => [styles.modalAction, pressed ? styles.modalActionPressed : null],
|
|
876
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles.modalDismiss, children: dismissLabel })
|
|
877
|
+
}
|
|
878
|
+
),
|
|
879
|
+
/* @__PURE__ */ jsx(
|
|
880
|
+
Text,
|
|
881
|
+
{
|
|
882
|
+
accessibilityRole: "header",
|
|
883
|
+
numberOfLines: 1,
|
|
884
|
+
style: [styles.modalTitle, android ? styles.modalTitleAndroid : null],
|
|
885
|
+
children: title
|
|
886
|
+
}
|
|
887
|
+
),
|
|
888
|
+
confirmLabel ? /* @__PURE__ */ jsx(
|
|
889
|
+
Pressable,
|
|
890
|
+
{
|
|
891
|
+
accessibilityRole: "button",
|
|
892
|
+
accessibilityLabel: confirmLabel,
|
|
893
|
+
accessibilityState: { disabled: confirmDisabled, busy: loading || void 0 },
|
|
894
|
+
"aria-busy": loading || void 0,
|
|
895
|
+
disabled: confirmDisabled,
|
|
896
|
+
onPress: confirmDisabled || loading ? void 0 : onConfirm,
|
|
897
|
+
style: ({ pressed }) => [
|
|
898
|
+
styles.modalAction,
|
|
899
|
+
styles.modalActionEnd,
|
|
900
|
+
pressed && !confirmDisabled ? styles.modalActionPressed : null,
|
|
901
|
+
confirmDisabled ? styles.modalActionDisabled : null
|
|
902
|
+
],
|
|
903
|
+
children: loading ? /* @__PURE__ */ jsx(
|
|
904
|
+
ActivityIndicator,
|
|
905
|
+
{
|
|
906
|
+
"aria-hidden": true,
|
|
907
|
+
color: tone === "danger" ? theme.color.danger : theme.color.accentStrong
|
|
908
|
+
}
|
|
909
|
+
) : /* @__PURE__ */ jsx(
|
|
910
|
+
Text,
|
|
911
|
+
{
|
|
912
|
+
style: [
|
|
913
|
+
styles.modalConfirm,
|
|
914
|
+
android ? styles.modalConfirmAndroid : null,
|
|
915
|
+
tone === "danger" ? { color: theme.color.danger } : null
|
|
916
|
+
],
|
|
917
|
+
children: confirmLabel
|
|
918
|
+
}
|
|
919
|
+
)
|
|
920
|
+
}
|
|
921
|
+
) : android ? null : /* @__PURE__ */ jsx(View, { style: styles.modalAction })
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
if (presentation === "inline") {
|
|
926
|
+
return /* @__PURE__ */ jsxs(View, { role: "dialog", accessibilityLabel: title, style: styles.inlinePanel, children: [
|
|
927
|
+
header,
|
|
928
|
+
/* @__PURE__ */ jsx(View, { style: styles.modalBody, children })
|
|
929
|
+
] });
|
|
930
|
+
}
|
|
931
|
+
if (!mounted) return /* @__PURE__ */ jsx(Fragment, {});
|
|
932
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.overlayRoot, pointerEvents: "box-none", children: [
|
|
933
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [StyleSheet.absoluteFill, styles.scrim, { opacity: progress }], children: /* @__PURE__ */ jsx(
|
|
934
|
+
Pressable,
|
|
935
|
+
{
|
|
936
|
+
style: StyleSheet.absoluteFill,
|
|
937
|
+
accessibilityRole: "button",
|
|
938
|
+
accessibilityLabel: scrimLabel,
|
|
939
|
+
onPress: requestDismiss
|
|
940
|
+
}
|
|
941
|
+
) }),
|
|
942
|
+
/* @__PURE__ */ jsxs(
|
|
943
|
+
Animated.View,
|
|
944
|
+
{
|
|
945
|
+
role: "dialog",
|
|
946
|
+
accessibilityViewIsModal: true,
|
|
947
|
+
accessibilityLabel: title,
|
|
948
|
+
onLayout: onPanelLayout,
|
|
949
|
+
style: [
|
|
950
|
+
styles.panel,
|
|
951
|
+
side === "top" ? styles.panelTop : null,
|
|
952
|
+
{ transform: [{ translateY }] }
|
|
953
|
+
],
|
|
954
|
+
children: [
|
|
955
|
+
header,
|
|
956
|
+
/* @__PURE__ */ jsx(View, { style: styles.modalBody, children })
|
|
957
|
+
]
|
|
958
|
+
}
|
|
959
|
+
)
|
|
960
|
+
] });
|
|
961
|
+
}
|
|
962
|
+
function NavTabView({
|
|
963
|
+
value,
|
|
964
|
+
tabs,
|
|
965
|
+
announce = true,
|
|
966
|
+
variant = "fade",
|
|
967
|
+
disabled = false,
|
|
968
|
+
size,
|
|
969
|
+
density = "standard",
|
|
970
|
+
orientation,
|
|
971
|
+
style
|
|
972
|
+
}) {
|
|
973
|
+
const theme = useLoamTheme("navigation");
|
|
974
|
+
const { styles } = useStyles(sheet2);
|
|
975
|
+
const page = theme.motion.page;
|
|
976
|
+
const pageEasing = React.useMemo(() => Easing.bezier(...page.easing), [page.easing]);
|
|
977
|
+
const sizePad = size ? { sm: theme.space.s2, md: theme.space.s3, lg: theme.space.s4 }[size] : void 0;
|
|
978
|
+
const pad = density === "compact" ? sizePad === void 0 || sizePad > theme.space.s2 ? theme.space.s2 : sizePad : sizePad;
|
|
979
|
+
const paneLayout = pad !== void 0 || orientation ? {
|
|
980
|
+
...pad !== void 0 ? { padding: pad } : null,
|
|
981
|
+
...orientation ? { flexDirection: orientation === "horizontal" ? "row" : "column" } : null
|
|
982
|
+
} : null;
|
|
983
|
+
const active = tabs.find((tab) => tab.value === value);
|
|
984
|
+
const [outgoing, setOutgoing] = React.useState(null);
|
|
985
|
+
const previousRef = React.useRef(active);
|
|
986
|
+
const visited = React.useRef(new Set(active ? [active.value] : []));
|
|
987
|
+
if (active) visited.current.add(active.value);
|
|
988
|
+
const panes = tabs.filter((tab) => visited.current.has(tab.value));
|
|
989
|
+
const fade = React.useRef(new Animated.Value(1)).current;
|
|
990
|
+
React.useEffect(() => {
|
|
991
|
+
const previous = previousRef.current;
|
|
992
|
+
previousRef.current = active;
|
|
993
|
+
if (!active || !previous || previous.value === active.value) return;
|
|
994
|
+
if (announce) AccessibilityInfo.announceForAccessibility(active.announcement ?? active.title);
|
|
995
|
+
if (variant === "none") {
|
|
996
|
+
fade.setValue(1);
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
setOutgoing(previous);
|
|
1000
|
+
fade.setValue(0);
|
|
1001
|
+
Animated.timing(fade, {
|
|
1002
|
+
toValue: 1,
|
|
1003
|
+
duration: page.duration,
|
|
1004
|
+
easing: pageEasing,
|
|
1005
|
+
useNativeDriver: true
|
|
1006
|
+
}).start(({ finished }) => {
|
|
1007
|
+
if (finished) setOutgoing(null);
|
|
1008
|
+
});
|
|
1009
|
+
}, [value]);
|
|
1010
|
+
const incomingScale = fade.interpolate({
|
|
1011
|
+
inputRange: [0, 1],
|
|
1012
|
+
outputRange: [NAV_TAB_FADE_SCALE, 1]
|
|
1013
|
+
});
|
|
1014
|
+
const outgoingOpacity = fade.interpolate({ inputRange: [0, 1], outputRange: [1, 0] });
|
|
1015
|
+
const outgoingScale = fade.interpolate({
|
|
1016
|
+
inputRange: [0, 1],
|
|
1017
|
+
outputRange: [1, NAV_TAB_FADE_SCALE]
|
|
1018
|
+
});
|
|
1019
|
+
return /* @__PURE__ */ jsx(
|
|
1020
|
+
View,
|
|
1021
|
+
{
|
|
1022
|
+
"aria-disabled": disabled || void 0,
|
|
1023
|
+
pointerEvents: disabled ? "none" : void 0,
|
|
1024
|
+
style: [styles.tabRoot, style],
|
|
1025
|
+
children: panes.map((pane) => {
|
|
1026
|
+
const isActive = pane.value === value;
|
|
1027
|
+
const isOutgoing = outgoing?.value === pane.value;
|
|
1028
|
+
return /* @__PURE__ */ jsx(
|
|
1029
|
+
Animated.View,
|
|
1030
|
+
{
|
|
1031
|
+
ref: (node) => setInert2(node, !isActive),
|
|
1032
|
+
role: "group",
|
|
1033
|
+
accessibilityLabel: pane.title,
|
|
1034
|
+
importantForAccessibility: isActive ? "auto" : "no-hide-descendants",
|
|
1035
|
+
pointerEvents: isActive ? "auto" : "none",
|
|
1036
|
+
style: [
|
|
1037
|
+
styles.tabPane,
|
|
1038
|
+
paneLayout,
|
|
1039
|
+
isActive ? { opacity: fade, transform: [{ scale: incomingScale }] } : isOutgoing ? { opacity: outgoingOpacity, transform: [{ scale: outgoingScale }] } : styles.tabPaneHidden
|
|
1040
|
+
],
|
|
1041
|
+
children: pane.content
|
|
1042
|
+
},
|
|
1043
|
+
pane.value
|
|
1044
|
+
);
|
|
1045
|
+
})
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
function NavHero({
|
|
1050
|
+
orientation,
|
|
1051
|
+
align,
|
|
1052
|
+
active,
|
|
1053
|
+
from,
|
|
1054
|
+
to,
|
|
1055
|
+
children,
|
|
1056
|
+
onMorphEnd,
|
|
1057
|
+
accessibilityLabel,
|
|
1058
|
+
announcement
|
|
1059
|
+
}) {
|
|
1060
|
+
const theme = useLoamTheme("navigation");
|
|
1061
|
+
const { styles } = useStyles(sheet2);
|
|
1062
|
+
const reduce = theme.reduceMotion;
|
|
1063
|
+
const hero = theme.motion.hero;
|
|
1064
|
+
const heroEasing = React.useMemo(() => Easing.bezier(...hero.easing), [hero.easing]);
|
|
1065
|
+
const [mounted, setMounted] = React.useState(active);
|
|
1066
|
+
const progress = React.useRef(new Animated.Value(0)).current;
|
|
1067
|
+
const [bounds, setBounds] = React.useState(null);
|
|
1068
|
+
const onRootLayout = (e) => {
|
|
1069
|
+
const { width, height } = e.nativeEvent.layout;
|
|
1070
|
+
if (width > 0 && height > 0) setBounds({ x: 0, y: 0, width, height });
|
|
1071
|
+
};
|
|
1072
|
+
const endRef = React.useRef(onMorphEnd);
|
|
1073
|
+
endRef.current = onMorphEnd;
|
|
1074
|
+
React.useEffect(() => {
|
|
1075
|
+
if (active) {
|
|
1076
|
+
setMounted(true);
|
|
1077
|
+
if (announcement ?? accessibilityLabel) {
|
|
1078
|
+
AccessibilityInfo.announceForAccessibility(announcement ?? accessibilityLabel);
|
|
1079
|
+
}
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
if (!mounted) return;
|
|
1083
|
+
Animated.timing(progress, {
|
|
1084
|
+
toValue: 0,
|
|
1085
|
+
duration: hero.duration,
|
|
1086
|
+
easing: heroEasing,
|
|
1087
|
+
useNativeDriver: true
|
|
1088
|
+
}).start(({ finished }) => {
|
|
1089
|
+
if (!finished) return;
|
|
1090
|
+
setMounted(false);
|
|
1091
|
+
endRef.current?.(false);
|
|
1092
|
+
});
|
|
1093
|
+
}, [active]);
|
|
1094
|
+
React.useEffect(() => {
|
|
1095
|
+
if (!mounted || !active) return;
|
|
1096
|
+
progress.setValue(0);
|
|
1097
|
+
Animated.timing(progress, {
|
|
1098
|
+
toValue: 1,
|
|
1099
|
+
duration: hero.duration,
|
|
1100
|
+
easing: heroEasing,
|
|
1101
|
+
useNativeDriver: true
|
|
1102
|
+
}).start(({ finished }) => {
|
|
1103
|
+
if (finished) endRef.current?.(true);
|
|
1104
|
+
});
|
|
1105
|
+
}, [mounted]);
|
|
1106
|
+
const target = to ?? bounds;
|
|
1107
|
+
const start = target ? heroTransform(from, target, 0) : null;
|
|
1108
|
+
const morphStyle = reduce || !start ? { opacity: progress } : {
|
|
1109
|
+
transform: [
|
|
1110
|
+
{
|
|
1111
|
+
translateX: progress.interpolate({
|
|
1112
|
+
inputRange: [0, 1],
|
|
1113
|
+
outputRange: [start.translateX, 0]
|
|
1114
|
+
})
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
translateY: progress.interpolate({
|
|
1118
|
+
inputRange: [0, 1],
|
|
1119
|
+
outputRange: [start.translateY, 0]
|
|
1120
|
+
})
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
scaleX: progress.interpolate({ inputRange: [0, 1], outputRange: [start.scaleX, 1] })
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
scaleY: progress.interpolate({ inputRange: [0, 1], outputRange: [start.scaleY, 1] })
|
|
1127
|
+
}
|
|
1128
|
+
]
|
|
1129
|
+
};
|
|
1130
|
+
const contentOpacity = reduce ? progress : progress.interpolate({
|
|
1131
|
+
inputRange: [NAV_HERO_CONTENT_FADE_START, 1],
|
|
1132
|
+
outputRange: [0, 1],
|
|
1133
|
+
extrapolate: "clamp"
|
|
1134
|
+
});
|
|
1135
|
+
const frame = to ? { position: "absolute", top: to.y, start: to.x, width: to.width, height: to.height } : StyleSheet.absoluteFillObject;
|
|
1136
|
+
return /* @__PURE__ */ jsx(
|
|
1137
|
+
View,
|
|
1138
|
+
{
|
|
1139
|
+
style: styles.overlayRoot,
|
|
1140
|
+
pointerEvents: mounted ? "auto" : "none",
|
|
1141
|
+
onLayout: onRootLayout,
|
|
1142
|
+
children: mounted ? /* @__PURE__ */ jsx(
|
|
1143
|
+
Animated.View,
|
|
1144
|
+
{
|
|
1145
|
+
role: "group",
|
|
1146
|
+
accessibilityLabel,
|
|
1147
|
+
style: [styles.heroSurface, frame, morphStyle],
|
|
1148
|
+
children: /* @__PURE__ */ jsx(
|
|
1149
|
+
Animated.View,
|
|
1150
|
+
{
|
|
1151
|
+
style: [
|
|
1152
|
+
styles.heroContent,
|
|
1153
|
+
orientation ? { flexDirection: orientation === "horizontal" ? "row" : "column" } : null,
|
|
1154
|
+
alignItemsStyle(align),
|
|
1155
|
+
{ opacity: contentOpacity }
|
|
1156
|
+
],
|
|
1157
|
+
children
|
|
1158
|
+
}
|
|
1159
|
+
)
|
|
1160
|
+
}
|
|
1161
|
+
) : null
|
|
1162
|
+
}
|
|
1163
|
+
);
|
|
1164
|
+
}
|
|
1165
|
+
var sheet2 = createStyleSheet((theme) => ({
|
|
1166
|
+
// Both the modal and the hero layer float over whatever container they are
|
|
1167
|
+
// placed in, rather than taking part in its flow.
|
|
1168
|
+
overlayRoot: {
|
|
1169
|
+
...StyleSheet.absoluteFillObject,
|
|
1170
|
+
zIndex: theme.z.overlay
|
|
1171
|
+
},
|
|
1172
|
+
scrim: {
|
|
1173
|
+
backgroundColor: theme.color.scrim
|
|
1174
|
+
},
|
|
1175
|
+
// `NAV_MODAL_TOP_INSET` (34px) is the design reference's literal: the sliver of
|
|
1176
|
+
// the covered screen that keeps the presentation reading as "over".
|
|
1177
|
+
// loam-contrast-ignore — the boundary here is the scrim, not the shadow.
|
|
1178
|
+
// `color.scrim` is a 44% wash and is *not* re-resolved by high contrast, so
|
|
1179
|
+
// this surface is still separated from the page when the elevation zeroes
|
|
1180
|
+
// out. A border would put a hairline around every modal for no gain.
|
|
1181
|
+
panel: {
|
|
1182
|
+
position: "absolute",
|
|
1183
|
+
top: NAV_MODAL_TOP_INSET,
|
|
1184
|
+
start: 0,
|
|
1185
|
+
end: 0,
|
|
1186
|
+
bottom: 0,
|
|
1187
|
+
backgroundColor: theme.color.surface,
|
|
1188
|
+
borderTopStartRadius: theme.radius["2xl"],
|
|
1189
|
+
borderTopEndRadius: theme.radius["2xl"],
|
|
1190
|
+
overflow: "hidden",
|
|
1191
|
+
zIndex: theme.z.modal,
|
|
1192
|
+
...theme.shadow.lg
|
|
1193
|
+
},
|
|
1194
|
+
inlinePanel: {
|
|
1195
|
+
backgroundColor: theme.color.surface,
|
|
1196
|
+
borderRadius: theme.radius["2xl"],
|
|
1197
|
+
overflow: "hidden",
|
|
1198
|
+
alignSelf: "stretch"
|
|
1199
|
+
},
|
|
1200
|
+
panelTop: {
|
|
1201
|
+
top: 0,
|
|
1202
|
+
bottom: NAV_MODAL_TOP_INSET,
|
|
1203
|
+
borderTopStartRadius: 0,
|
|
1204
|
+
borderTopEndRadius: 0,
|
|
1205
|
+
borderBottomStartRadius: theme.radius["2xl"],
|
|
1206
|
+
borderBottomEndRadius: theme.radius["2xl"]
|
|
1207
|
+
},
|
|
1208
|
+
modalBar: {
|
|
1209
|
+
flexDirection: "row",
|
|
1210
|
+
alignItems: "center",
|
|
1211
|
+
justifyContent: "space-between",
|
|
1212
|
+
height: NAV_MODAL_HEADER_HEIGHT,
|
|
1213
|
+
paddingHorizontal: theme.space.s3,
|
|
1214
|
+
gap: theme.space.s2,
|
|
1215
|
+
borderBottomWidth: theme.borderWidth.base,
|
|
1216
|
+
borderBottomColor: theme.color.border
|
|
1217
|
+
},
|
|
1218
|
+
// The Android full-screen dialog: a 64 top app bar, no edge.
|
|
1219
|
+
modalBarAndroid: {
|
|
1220
|
+
height: ANDROID_MODAL_BAR_H,
|
|
1221
|
+
paddingHorizontal: theme.space[4],
|
|
1222
|
+
gap: theme.space[4],
|
|
1223
|
+
borderBottomWidth: 0
|
|
1224
|
+
},
|
|
1225
|
+
// iOS sheet bar buttons are 72-wide text links that dim on press.
|
|
1226
|
+
modalAction: {
|
|
1227
|
+
minHeight: theme.tapMin,
|
|
1228
|
+
minWidth: theme.space[72],
|
|
1229
|
+
justifyContent: "center",
|
|
1230
|
+
alignItems: "flex-start"
|
|
1231
|
+
},
|
|
1232
|
+
modalActionEnd: {
|
|
1233
|
+
alignItems: "flex-end"
|
|
1234
|
+
},
|
|
1235
|
+
modalActionPressed: {
|
|
1236
|
+
opacity: theme.state.pressedOpacity
|
|
1237
|
+
},
|
|
1238
|
+
modalActionDisabled: {
|
|
1239
|
+
opacity: theme.state.disabledOpacity
|
|
1240
|
+
},
|
|
1241
|
+
modalClose: {
|
|
1242
|
+
width: theme.hit.lg,
|
|
1243
|
+
height: theme.hit.lg,
|
|
1244
|
+
alignItems: "center",
|
|
1245
|
+
justifyContent: "center",
|
|
1246
|
+
borderRadius: theme.radius.full
|
|
1247
|
+
},
|
|
1248
|
+
// iOS: Cancel is the regular link (17 / 400), Save the emphasised one (17 / 600).
|
|
1249
|
+
modalDismiss: {
|
|
1250
|
+
fontFamily: theme.font.sans,
|
|
1251
|
+
fontWeight: theme.fontWeight.regular,
|
|
1252
|
+
fontSize: theme.type.body.fontSize,
|
|
1253
|
+
lineHeight: theme.type.body.lineHeight,
|
|
1254
|
+
color: theme.color.accentStrong
|
|
1255
|
+
},
|
|
1256
|
+
modalConfirm: {
|
|
1257
|
+
fontFamily: theme.font.sans,
|
|
1258
|
+
fontWeight: theme.fontWeight.semibold,
|
|
1259
|
+
fontSize: theme.type.body.fontSize,
|
|
1260
|
+
lineHeight: theme.type.body.lineHeight,
|
|
1261
|
+
color: theme.color.accentStrong
|
|
1262
|
+
},
|
|
1263
|
+
// Android: Save is a md link button, Material label large 14 / 500.
|
|
1264
|
+
modalConfirmAndroid: {
|
|
1265
|
+
fontWeight: theme.fontWeight.medium,
|
|
1266
|
+
fontSize: theme.fontSize[14],
|
|
1267
|
+
lineHeight: theme.space[20],
|
|
1268
|
+
paddingHorizontal: theme.space.s3
|
|
1269
|
+
},
|
|
1270
|
+
modalTitleAndroid: {
|
|
1271
|
+
textAlign: "left",
|
|
1272
|
+
fontWeight: theme.fontWeight.regular,
|
|
1273
|
+
fontSize: theme.fontSize[22],
|
|
1274
|
+
lineHeight: theme.space[28],
|
|
1275
|
+
letterSpacing: 0
|
|
1276
|
+
},
|
|
1277
|
+
modalTitle: {
|
|
1278
|
+
flex: 1,
|
|
1279
|
+
textAlign: "center",
|
|
1280
|
+
fontFamily: theme.font.sans,
|
|
1281
|
+
fontWeight: theme.fontWeight.bold,
|
|
1282
|
+
fontSize: theme.type.headline.fontSize,
|
|
1283
|
+
lineHeight: theme.type.headline.lineHeight,
|
|
1284
|
+
letterSpacing: theme.type.headline.letterSpacing,
|
|
1285
|
+
color: theme.color.text
|
|
1286
|
+
},
|
|
1287
|
+
modalBody: {
|
|
1288
|
+
flex: 1,
|
|
1289
|
+
padding: theme.layout.screenPad
|
|
1290
|
+
},
|
|
1291
|
+
tabRoot: {
|
|
1292
|
+
flex: 1,
|
|
1293
|
+
overflow: "hidden"
|
|
1294
|
+
},
|
|
1295
|
+
// Panes overlap so they can cross-fade; the inactive ones are taken out of
|
|
1296
|
+
// layout (and out of the accessibility tree) rather than stacked invisibly.
|
|
1297
|
+
tabPane: {
|
|
1298
|
+
...StyleSheet.absoluteFillObject
|
|
1299
|
+
},
|
|
1300
|
+
tabPaneHidden: {
|
|
1301
|
+
display: "none"
|
|
1302
|
+
},
|
|
1303
|
+
heroSurface: {
|
|
1304
|
+
backgroundColor: theme.color.surface,
|
|
1305
|
+
borderRadius: theme.radius.md,
|
|
1306
|
+
overflow: "hidden",
|
|
1307
|
+
zIndex: theme.z.raised
|
|
1308
|
+
},
|
|
1309
|
+
heroContent: {
|
|
1310
|
+
flex: 1
|
|
1311
|
+
}
|
|
1312
|
+
}));
|
|
1313
|
+
|
|
1314
|
+
export { NAV_AXIS_LOCK_SLOP, NAV_EDGE_HIT_WIDTH, NAV_HERO_CONTENT_FADE_START, NAV_MODAL_HEADER_HEIGHT, NAV_MODAL_TOP_INSET, NAV_PARALLAX_RATIO, NAV_PREDICTIVE_FADE, NAV_PREDICTIVE_SCALE, NAV_PREDICTIVE_SHIFT, NAV_PREDICTIVE_SPAN, NAV_SWIPE_COMPLETE_FRACTION, NAV_SWIPE_COMPLETE_VELOCITY, NAV_TAB_FADE_SCALE, NavBackButton, NavHero, NavModal, NavStack, NavTabView, claimsHorizontalAxis, clampProgress, directionSign, heroContentOpacity, heroTransform, incomingTranslateX, isFromLeadingEdge, isFromTrailingEdge, modalTranslateY, parallaxDimOpacity, parallaxTranslateX, predictivePeek, predictiveScale, predictiveShift, predictiveTravel, progressFromEdgeSwipe, shouldCompletePop, tabFadeScale };
|