@btndprojects/loam-ui-native 0.2.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 +4 -2
- package/dist/adaptive/index.js +12 -2
- package/dist/address-block/index.js +23 -0
- package/dist/alert/index.js +5 -2
- package/dist/analyzer/index.js +13 -5
- package/dist/announcement/index.js +15 -5
- package/dist/appearance-picker/index.js +15 -0
- package/dist/audio-player/index.js +26 -2
- package/dist/avatar/index.js +2 -2
- package/dist/avatar-group/index.js +5 -3
- package/dist/badge/index.js +6 -3
- package/dist/banner/index.js +3 -2
- package/dist/board/index.js +13 -6
- package/dist/button/index.js +6 -3
- package/dist/camera-permission/index.js +19 -11
- package/dist/capture-result/index.js +26 -16
- package/dist/card/index.js +7 -3
- package/dist/card-form/index.js +15 -9
- package/dist/carousel/index.js +3 -1
- package/dist/chart/index.js +15 -5
- package/dist/charts/index.js +18 -5
- package/dist/chat/index.js +35 -10
- package/dist/checkbox/index.js +6 -4
- package/dist/checklist/index.js +16 -7
- package/dist/checkout/index.js +25 -12
- package/dist/chip/index.js +7 -4
- package/dist/chunk-2BZD3NAP.js +1110 -0
- package/dist/chunk-2YKVID2V.js +35 -0
- package/dist/{chunk-H7DWSL4O.js → chunk-36DA3IPO.js} +115 -27
- package/dist/chunk-3A56MIAN.js +599 -0
- package/dist/{chunk-AEB7KCHQ.js → chunk-3SCKCWF5.js} +39 -28
- package/dist/chunk-3TZNDHKO.js +187 -0
- package/dist/chunk-43K3BLXV.js +9 -0
- package/dist/chunk-46ZJIQ2Z.js +208 -0
- package/dist/{chunk-PMMTGBBS.js → chunk-4CZMQDQL.js} +75 -22
- package/dist/chunk-4QCR3K2J.js +1 -0
- package/dist/{chunk-E2E3I5W2.js → chunk-5DTKORLI.js} +54 -45
- package/dist/{chunk-5VFZRGVD.js → chunk-5J4WFXFA.js} +32 -15
- package/dist/{chunk-JBMLWFSJ.js → chunk-5KJ7TEQ6.js} +83 -48
- package/dist/chunk-5NU33TXK.js +529 -0
- package/dist/chunk-6KSUS7DF.js +690 -0
- package/dist/{chunk-3WEZCGHX.js → chunk-6RV6UW2J.js} +140 -56
- package/dist/chunk-6RZM7RP2.js +520 -0
- package/dist/{chunk-JJLPBRVZ.js → chunk-75BDCC7K.js} +2 -0
- package/dist/{chunk-U5NLHYV6.js → chunk-7CGJBQUA.js} +333 -22
- package/dist/{chunk-I4FHVKEC.js → chunk-7IVF6JLJ.js} +16 -5
- package/dist/chunk-7IWCGXYA.js +143 -0
- package/dist/chunk-7LM4ASFH.js +172 -0
- package/dist/chunk-7MCEJFWV.js +341 -0
- package/dist/{chunk-2SY63FCH.js → chunk-7NGMUVNU.js} +66 -30
- package/dist/chunk-7PBSIXT7.js +355 -0
- package/dist/chunk-7QOYGENL.js +443 -0
- package/dist/{chunk-TDMG26JI.js → chunk-A7SWYDE5.js} +40 -9
- package/dist/chunk-ADHPJALR.js +3051 -0
- package/dist/{chunk-ZLTO5VQI.js → chunk-ALJYZLNQ.js} +131 -61
- package/dist/{chunk-GDKVKNR2.js → chunk-AQ5FIG74.js} +110 -30
- package/dist/chunk-B2MMZZQB.js +426 -0
- package/dist/{chunk-QYPE5JX3.js → chunk-B7JZ3N5G.js} +142 -105
- package/dist/{chunk-QHTVYA65.js → chunk-BL37SW6G.js} +388 -102
- package/dist/chunk-BTRMA7GC.js +21 -0
- package/dist/{chunk-FUMHAAF3.js → chunk-C7IUWIUZ.js} +243 -92
- package/dist/chunk-CA3DUVYD.js +10 -0
- package/dist/{chunk-FYWNRX4F.js → chunk-CBCJSO2B.js} +143 -13
- package/dist/chunk-CHPX4MFI.js +239 -0
- package/dist/chunk-CLGAMIOT.js +648 -0
- package/dist/chunk-CUE7VML6.js +1141 -0
- package/dist/{chunk-D5N5QWI7.js → chunk-CVU6S2E5.js} +497 -235
- package/dist/{chunk-U23FYWME.js → chunk-CXPQMA6Z.js} +101 -34
- package/dist/{chunk-36EC2T6P.js → chunk-D2LN4I7I.js} +1 -1
- package/dist/{chunk-TLCIR6RG.js → chunk-D34LNBO5.js} +411 -155
- package/dist/{chunk-FV6HMP7W.js → chunk-D4BCQICM.js} +207 -65
- 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-ZVATDZOM.js → chunk-ESGUHNB2.js} +106 -28
- package/dist/{chunk-46MMSDGL.js → chunk-F2KNBPKY.js} +104 -73
- package/dist/{chunk-KQZ3GLHR.js → chunk-G7H3NX3G.js} +40 -17
- package/dist/{chunk-3QMEOFW5.js → chunk-GM7YIPB7.js} +421 -207
- package/dist/{chunk-QHAITQIF.js → chunk-GVQQG435.js} +256 -86
- package/dist/chunk-HE43OMEL.js +1056 -0
- package/dist/{chunk-XIDTBCBA.js → chunk-HHOMFQ7R.js} +1049 -207
- package/dist/chunk-HNAKS4Z3.js +207 -0
- package/dist/chunk-HP6ST2OW.js +352 -0
- package/dist/chunk-HW3OWDTU.js +1 -0
- package/dist/{chunk-QP3KMOVF.js → chunk-HZDB44K4.js} +24 -14
- package/dist/chunk-I6CUP2LW.js +1155 -0
- package/dist/chunk-ICV4Y2WY.js +27 -0
- package/dist/chunk-IHSIENOE.js +3950 -0
- package/dist/{chunk-T5LTPKX6.js → chunk-IMMALLRU.js} +53 -25
- package/dist/{chunk-C4GTDLRC.js → chunk-JA6TK7H2.js} +154 -67
- package/dist/{chunk-EVOIGUBI.js → chunk-JAVZ5JPV.js} +43 -13
- package/dist/{chunk-CPTOADB2.js → chunk-JCMTP3E4.js} +527 -201
- package/dist/{chunk-OJQUBQWA.js → chunk-JCXFFK64.js} +73 -16
- package/dist/{chunk-V2OEB75Z.js → chunk-JWCVBFDU.js} +75 -35
- 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-VAOAKWUK.js → chunk-KHZDNQQD.js} +42 -8
- package/dist/chunk-KL4GDV4V.js +131 -0
- package/dist/{chunk-Q6NKEPRE.js → chunk-KNILMM4H.js} +73 -28
- package/dist/chunk-KRBUZV45.js +25 -0
- package/dist/{chunk-7BUIKDD6.js → chunk-KXLDK6HB.js} +91 -30
- package/dist/chunk-KZ3X7TSL.js +196 -0
- package/dist/{chunk-5UTRIXQ6.js → chunk-L2WMOA2V.js} +187 -43
- package/dist/chunk-L4D5LHCH.js +109 -0
- package/dist/{chunk-W63AJTM7.js → chunk-LAUJPLDB.js} +236 -71
- package/dist/{chunk-TN2ZNJUI.js → chunk-LGNTP5XA.js} +47 -13
- package/dist/chunk-LUZFCCSD.js +271 -0
- package/dist/{chunk-XTORZWRF.js → chunk-LXJCP4PL.js} +111 -30
- package/dist/chunk-MCOZJWPU.js +731 -0
- package/dist/{chunk-SATMR6SG.js → chunk-MG4SKWLL.js} +780 -142
- package/dist/{chunk-JUYWSSKW.js → chunk-MPEPTSER.js} +95 -16
- package/dist/chunk-MWPJ4YGP.js +1 -0
- package/dist/{chunk-LUMVGO2K.js → chunk-N7AX4OA4.js} +80 -29
- package/dist/chunk-NHSLM6SE.js +523 -0
- package/dist/{chunk-IT6FUXXG.js → chunk-NNJLVA7M.js} +43 -11
- package/dist/{chunk-TQVAIKFD.js → chunk-NZG75DGA.js} +102 -62
- 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-SWS5JQIF.js → chunk-ONKQUJWD.js} +187 -60
- package/dist/chunk-OVTK7A6T.js +615 -0
- package/dist/{chunk-UXGIW7OK.js → chunk-PCEFCOLN.js} +5 -1
- package/dist/{chunk-QIKT7LIB.js → chunk-PFLNFIVB.js} +91 -23
- package/dist/chunk-PHSZY37H.js +300 -0
- package/dist/chunk-PJLTKDVY.js +18 -0
- package/dist/{chunk-SHHY5OMK.js → chunk-PK7BN3MI.js} +83 -15
- package/dist/{chunk-YXOAPXMU.js → chunk-PWFRDRGS.js} +101 -14
- package/dist/{chunk-TY4MTKQJ.js → chunk-PYPMD46W.js} +332 -66
- package/dist/chunk-Q6CCHDI7.js +331 -0
- package/dist/chunk-QFA5WS2A.js +750 -0
- package/dist/chunk-QJMMM4RC.js +124 -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-LMPHCVJJ.js → chunk-RAESDNU5.js} +162 -68
- 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-5LAAAXFP.js → chunk-RJA3RXO3.js} +63 -54
- package/dist/chunk-RJYRJ3LD.js +1 -0
- package/dist/chunk-RMA3NOY4.js +599 -0
- package/dist/{chunk-VDPK5CY4.js → chunk-RSWKKAHK.js} +143 -61
- package/dist/{chunk-B7N4ASYE.js → chunk-RVOIIX3V.js} +17 -45
- package/dist/chunk-SA2RRBGT.js +1077 -0
- package/dist/{chunk-7OVVSVEZ.js → chunk-SG3J4R45.js} +440 -169
- package/dist/chunk-SPUK7JD4.js +238 -0
- package/dist/chunk-SWXV2K5N.js +434 -0
- package/dist/chunk-SYJEPXP6.js +1303 -0
- package/dist/{chunk-LKFC4CS7.js → chunk-SZLI34TA.js} +18 -9
- package/dist/{chunk-NBEF4EPJ.js → chunk-T77WJA74.js} +131 -16
- 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-F5B3UINI.js → chunk-TUL5RUIA.js} +171 -62
- package/dist/{chunk-C6APNDVA.js → chunk-TYOSA7JG.js} +63 -34
- package/dist/chunk-TYQTMMEV.js +1 -0
- package/dist/{chunk-DW3L54DQ.js → chunk-TZO6YDS7.js} +53 -12
- package/dist/{chunk-67IZZ2MJ.js → chunk-U3ETF22F.js} +75 -30
- package/dist/{chunk-EDCBJV7J.js → chunk-U6BYHD2N.js} +87 -31
- package/dist/{chunk-ENP3BMZU.js → chunk-UF6EJXPQ.js} +16 -1
- package/dist/{chunk-IPUNJMAQ.js → chunk-UNNQIPGK.js} +304 -68
- package/dist/chunk-UQVO6AJV.js +171 -0
- package/dist/{chunk-FZGAAOKS.js → chunk-VFDQAAIW.js} +138 -32
- package/dist/chunk-VIUE3VQT.js +1 -0
- package/dist/{chunk-5RENVKBQ.js → chunk-VJLSSSGC.js} +126 -30
- package/dist/chunk-VLMT6KYT.js +350 -0
- package/dist/chunk-VMHGBUGS.js +35 -0
- package/dist/{chunk-4IZXHVFJ.js → chunk-VQKPBYW6.js} +228 -172
- package/dist/{chunk-G6UESEVN.js → chunk-VSSTWLC5.js} +49 -11
- package/dist/{chunk-TRGFFU6A.js → chunk-VZYYZRPN.js} +866 -330
- package/dist/{chunk-JLC6PM5S.js → chunk-WAIJCD2V.js} +128 -54
- package/dist/chunk-WFMQ3WKM.js +378 -0
- package/dist/chunk-WJ2KDRMY.js +66 -0
- package/dist/chunk-WKFZJO54.js +437 -0
- package/dist/{chunk-QEYFDRHR.js → chunk-WVVD3XOV.js} +146 -84
- 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-MKSNFG7H.js → chunk-Y3XKKO5K.js} +191 -109
- package/dist/chunk-Y4QNMBLO.js +533 -0
- package/dist/chunk-Y5H4CTKO.js +1 -0
- package/dist/chunk-YBQIN75A.js +403 -0
- package/dist/{chunk-PNF3NKB5.js → chunk-YJ5PXOX3.js} +28 -11
- package/dist/{chunk-M656FYNH.js → chunk-YLRSRUPS.js} +63 -49
- package/dist/chunk-YM6MPJ4A.js +1 -0
- package/dist/chunk-YV7KZENV.js +200 -0
- package/dist/chunk-Z7I4ZSO6.js +316 -0
- package/dist/{chunk-EY4DD67D.js → chunk-ZIRMWD2B.js} +199 -126
- package/dist/chunk-ZPMG3FWU.js +75 -0
- package/dist/{chunk-QRUMA22E.js → chunk-ZTXMK2G7.js} +92 -43
- package/dist/{chunk-2OLKPG4E.js → chunk-ZVJCWXAL.js} +189 -87
- package/dist/{chunk-YAAHPATV.js → chunk-ZYQ23DPT.js} +49 -34
- package/dist/coachmark/index.js +7 -3
- package/dist/code-block/index.js +4 -3
- package/dist/color-field/index.js +12 -4
- package/dist/color-picker/index.js +23 -0
- package/dist/commerce/index.js +27 -16
- package/dist/confirm/index.js +31 -0
- package/dist/connection-card/index.js +34 -0
- package/dist/connectivity/index.js +3 -2
- package/dist/context-menu/index.js +10 -2
- package/dist/copy-button/index.js +3 -2
- package/dist/data-grid/index.js +30 -17
- package/dist/date-range-picker/index.js +19 -9
- package/dist/description-list/index.js +4 -1
- package/dist/device-frame/index.js +30 -0
- package/dist/dialog/index.js +8 -2
- package/dist/divider/index.js +2 -0
- package/dist/empty-state/index.js +13 -2
- package/dist/error-summary/index.js +7 -2
- package/dist/fab/index.js +4 -2
- package/dist/file-manager/index.js +33 -17
- package/dist/file-upload/index.js +12 -6
- package/dist/filter-bar/index.js +10 -6
- package/dist/flow-run/index.js +19 -12
- package/dist/form/index.js +30 -3
- package/dist/gallery/index.js +5 -2
- package/dist/hold-to-confirm/index.js +4 -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 +29826 -17941
- package/dist/index.js +197 -141
- package/dist/infinite-list/index.js +4 -2
- package/dist/inline-edit/index.js +5 -4
- package/dist/input/index.js +4 -3
- package/dist/interactions/index.js +4 -1
- package/dist/invoice/index.js +18 -9
- package/dist/job-row/index.js +22 -0
- package/dist/json-inspector/index.js +20 -0
- package/dist/kbd/index.js +2 -2
- package/dist/keyboard/index.js +7 -2
- package/dist/level-meter/index.js +9 -0
- package/dist/list-row/index.js +11 -3
- package/dist/log-viewer/index.js +9 -2
- package/dist/map-view/index.js +13 -2
- package/dist/markdown/index.js +8 -5
- package/dist/metric/index.js +6 -3
- package/dist/metric-strip/index.js +12 -0
- package/dist/money/index.js +11 -4
- package/dist/nav-drawer/index.js +6 -2
- package/dist/nav-header/index.js +10 -4
- package/dist/navigation/index.js +29 -2
- package/dist/notification-center/index.js +24 -10
- package/dist/number-roll/index.js +3 -1
- package/dist/onboarding-pager/index.js +22 -0
- package/dist/one-handed/index.js +2 -2
- package/dist/os-surfaces/index.js +6 -3
- package/dist/otp/index.js +5 -4
- package/dist/page-header/index.js +2 -1
- package/dist/pagination/index.js +4 -2
- package/dist/payment-method/index.js +17 -11
- package/dist/payment-status/index.js +22 -14
- package/dist/permission/index.js +18 -2
- package/dist/picker/index.js +17 -6
- package/dist/progress/index.js +7 -2
- package/dist/provenance/index.js +16 -0
- package/dist/pull-to-refresh/index.js +2 -2
- package/dist/qr-code/index.js +16 -0
- package/dist/query-builder/index.js +30 -0
- package/dist/radio-group/index.js +6 -4
- package/dist/rating/index.js +7 -2
- package/dist/receivables/index.js +31 -18
- package/dist/recording-indicator/index.js +21 -0
- package/dist/refund/index.js +24 -15
- package/dist/repeatable-rows/index.js +19 -0
- package/dist/save-status/index.js +5 -3
- package/dist/screen/index.js +3 -0
- package/dist/scroll-area/index.js +1 -1
- package/dist/search-field/index.js +8 -3
- package/dist/secret-field/index.js +19 -0
- package/dist/section-header/index.js +4 -0
- package/dist/segmented-control/index.js +2 -2
- package/dist/sheet/index.js +9 -3
- package/dist/shortcuts-sheet/index.js +2 -0
- package/dist/sign-in-screen/index.js +25 -0
- package/dist/skeleton/index.js +3 -1
- package/dist/slider/index.js +2 -1
- package/dist/sortable/index.js +4 -3
- package/dist/spinner/index.js +2 -1
- package/dist/split-button/index.js +17 -5
- package/dist/spotlight/index.js +7 -1
- package/dist/stack/index.js +2 -0
- package/dist/stage-timeline/index.js +6 -3
- package/dist/status-dot/index.js +6 -2
- package/dist/stepper/index.js +7 -3
- package/dist/streaming-text/index.js +2 -1
- package/dist/survey/index.js +24 -14
- package/dist/switch/index.js +6 -2
- package/dist/system-state/index.js +12 -4
- package/dist/tab-bar/index.js +10 -2
- package/dist/tabs/index.js +10 -2
- package/dist/tags-input/index.js +8 -5
- package/dist/text/index.js +4 -0
- package/dist/textarea/index.js +5 -4
- package/dist/thinking/index.js +4 -1
- package/dist/tile-rail/index.js +10 -0
- package/dist/time-field/index.js +15 -7
- package/dist/time-range-control/index.js +26 -12
- package/dist/timeline/index.js +2 -2
- package/dist/toast/index.js +4 -2
- package/dist/toolbar/index.js +3 -2
- package/dist/tour/index.js +12 -10
- package/dist/transcript/index.js +28 -0
- package/dist/truncation-notice/index.js +2 -2
- package/dist/update-notice/index.js +15 -8
- package/dist/video-player/index.js +26 -2
- package/dist/viewfinder/index.js +12 -4
- package/dist/widget/index.js +11 -4
- package/dist/wizard/index.js +7 -4
- package/package.json +13 -13
- package/dist/chunk-2PKYGLQ6.js +0 -268
- package/dist/chunk-2SWKL3AJ.js +0 -466
- package/dist/chunk-2TXERVVA.js +0 -1081
- package/dist/chunk-3DUWIYV5.js +0 -437
- package/dist/chunk-3NMD74ZU.js +0 -4
- package/dist/chunk-4DS5ZWVC.js +0 -83
- package/dist/chunk-6YAQBXB3.js +0 -93
- package/dist/chunk-74FLKD24.js +0 -237
- package/dist/chunk-CMTVNF3D.js +0 -104
- package/dist/chunk-DN7MNQIP.js +0 -799
- package/dist/chunk-DVGBZ3TX.js +0 -455
- package/dist/chunk-F3H33DQX.js +0 -300
- package/dist/chunk-FAJI7BSC.js +0 -443
- package/dist/chunk-G3AFC24V.js +0 -60
- package/dist/chunk-HJLPZA4X.js +0 -369
- package/dist/chunk-HYEOQWT7.js +0 -647
- package/dist/chunk-IDM7JJMO.js +0 -110
- package/dist/chunk-IVKMZ7BB.js +0 -326
- package/dist/chunk-IXKWIFWZ.js +0 -334
- package/dist/chunk-JV5YOTOB.js +0 -164
- package/dist/chunk-KFJGFLMW.js +0 -158
- package/dist/chunk-LQP4KEXZ.js +0 -214
- package/dist/chunk-NTQ2F3AU.js +0 -257
- package/dist/chunk-O5V4TG3V.js +0 -329
- package/dist/chunk-OWAMM2DK.js +0 -280
- package/dist/chunk-PID3NJB7.js +0 -405
- package/dist/chunk-QDZGFXQD.js +0 -176
- package/dist/chunk-QPWDDJJ4.js +0 -385
- package/dist/chunk-ROCUG24E.js +0 -416
- package/dist/chunk-RU3ZPNL6.js +0 -1986
- package/dist/chunk-RXSCIO6W.js +0 -153
- package/dist/chunk-SKWO3SZF.js +0 -2284
- package/dist/chunk-UQGBTPXH.js +0 -218
- package/dist/chunk-UYGDJWMN.js +0 -273
- package/dist/chunk-W74TXYFB.js +0 -107
- package/dist/chunk-WRDSPUE7.js +0 -417
- package/dist/chunk-XBZGDDMR.js +0 -105
- package/dist/chunk-XN4KG3P4.js +0 -1040
- package/dist/chunk-XQXMLMH3.js +0 -211
- package/dist/chunk-ZECZOOSB.js +0 -245
- /package/dist/{chunk-VFCUIDRT.js → chunk-3BKLBYPK.js} +0 -0
- /package/dist/{chunk-GEIGMWNF.js → chunk-QNZII37O.js} +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Sheet } from './chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { Sheet } from './chunk-B7JZ3N5G.js';
|
|
2
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
3
|
+
import { NumberRoll } from './chunk-IMMALLRU.js';
|
|
3
4
|
import { expandedProps } from './chunk-W23G6JLF.js';
|
|
4
|
-
import {
|
|
5
|
+
import { useInputPlatform } from './chunk-KXLDK6HB.js';
|
|
6
|
+
import { fieldSurfaceFill } from './chunk-43K3BLXV.js';
|
|
5
7
|
import { haptics } from './chunk-NY2U3PBI.js';
|
|
6
8
|
import { useLabels, useLoamLocale } from './chunk-APCWFOZW.js';
|
|
7
|
-
import { Icon } from './chunk-
|
|
9
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
8
10
|
import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
|
|
9
11
|
import * as React from 'react';
|
|
10
|
-
import { View, Text, Pressable, ScrollView, Animated
|
|
12
|
+
import { View, Text, Pressable, ActivityIndicator, ScrollView, Animated } from 'react-native';
|
|
11
13
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
12
14
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
15
|
|
|
@@ -31,7 +33,7 @@ function OptionTint({
|
|
|
31
33
|
run.start();
|
|
32
34
|
return () => run.stop();
|
|
33
35
|
}, [on, level, t, theme]);
|
|
34
|
-
return /* @__PURE__ */ jsx(Animated.View, { pointerEvents: "none", style: [
|
|
36
|
+
return /* @__PURE__ */ jsx(Animated.View, { pointerEvents: "none", style: [style, { opacity: t }], children: /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.md, color: theme.color.accent }) });
|
|
35
37
|
}
|
|
36
38
|
var DEFAULT_LABELS = {
|
|
37
39
|
hour: "Hour",
|
|
@@ -40,7 +42,10 @@ var DEFAULT_LABELS = {
|
|
|
40
42
|
am: "AM",
|
|
41
43
|
pm: "PM",
|
|
42
44
|
done: "Done",
|
|
43
|
-
period: "AM/PM"
|
|
45
|
+
period: "AM/PM",
|
|
46
|
+
clear: "Clear",
|
|
47
|
+
validating: "Validating",
|
|
48
|
+
valid: "Valid"
|
|
44
49
|
};
|
|
45
50
|
var pad = (n) => String(n).padStart(2, "0");
|
|
46
51
|
var toSeconds = (v) => v.hour * 3600 + v.minute * 60 + (v.second ?? 0);
|
|
@@ -73,7 +78,13 @@ function TimeField({
|
|
|
73
78
|
invalid = false,
|
|
74
79
|
disabled = false,
|
|
75
80
|
readOnly = false,
|
|
76
|
-
|
|
81
|
+
success = false,
|
|
82
|
+
loading = false,
|
|
83
|
+
leading,
|
|
84
|
+
trailing,
|
|
85
|
+
size = "lg",
|
|
86
|
+
surface = "filled",
|
|
87
|
+
clearable = false,
|
|
77
88
|
labels: labelsProp,
|
|
78
89
|
accessibilityLabel,
|
|
79
90
|
motion = "full"
|
|
@@ -84,7 +95,9 @@ function TimeField({
|
|
|
84
95
|
const locale = localeProp ?? contextLocale;
|
|
85
96
|
const hourCycle = hourCycleProp ?? localeHourCycle(locale);
|
|
86
97
|
const theme = useLoamTheme("time-field");
|
|
87
|
-
const
|
|
98
|
+
const isLoading = loading && !disabled;
|
|
99
|
+
const hasError = !isLoading && (invalid || Boolean(error));
|
|
100
|
+
const valid = !isLoading && !hasError && success;
|
|
88
101
|
const message = error ?? description;
|
|
89
102
|
const needMinute = granularity !== "hour";
|
|
90
103
|
const needSecond = granularity === "second";
|
|
@@ -135,15 +148,19 @@ function TimeField({
|
|
|
135
148
|
].filter((n) => n !== null).map(pad).join(":");
|
|
136
149
|
}
|
|
137
150
|
}, [current, locale, hourCycle, needMinute, needSecond]);
|
|
151
|
+
const os = useInputPlatform();
|
|
138
152
|
const { styles } = useStyles(sheet, {
|
|
153
|
+
os,
|
|
139
154
|
size,
|
|
140
155
|
disabled,
|
|
141
156
|
placeholder: readout === null,
|
|
142
157
|
invalid: hasError
|
|
143
158
|
});
|
|
144
159
|
const iconSize = theme.ctl.icon[size];
|
|
160
|
+
const valueFont = size === "lg" ? { fontSize: theme.fontSize[os === "ios" ? 17 : 16] } : null;
|
|
145
161
|
const slopY = Math.max(0, (theme.hit[size] - theme.ctl[size]) / 2);
|
|
146
162
|
const interactive = !disabled && !readOnly;
|
|
163
|
+
const showClear = clearable && Boolean(current) && interactive;
|
|
147
164
|
const pm = draft.hour >= 12;
|
|
148
165
|
const hourItems = Array.from({ length: 24 }, (_, h) => h).filter(
|
|
149
166
|
(h) => hourCycle === 12 ? h >= (pm ? 12 : 0) && h < (pm ? 24 : 12) : true
|
|
@@ -170,7 +187,7 @@ function TimeField({
|
|
|
170
187
|
],
|
|
171
188
|
children: [
|
|
172
189
|
/* @__PURE__ */ jsx(OptionTint, { on: selected, level, style: styles.optionSelected }),
|
|
173
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
190
|
+
/* @__PURE__ */ jsx(Text, { style: styles.optionLabel, children: text })
|
|
174
191
|
]
|
|
175
192
|
},
|
|
176
193
|
key
|
|
@@ -181,39 +198,88 @@ function TimeField({
|
|
|
181
198
|
] });
|
|
182
199
|
return /* @__PURE__ */ jsxs(View, { style: styles.root, children: [
|
|
183
200
|
label ? /* @__PURE__ */ jsx(Text, { style: styles.label, children: label }) : null,
|
|
184
|
-
/* @__PURE__ */ jsxs(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
/* @__PURE__ */ jsxs(View, { style: styles.triggerWrap, children: [
|
|
202
|
+
/* @__PURE__ */ jsxs(
|
|
203
|
+
Pressable,
|
|
204
|
+
{
|
|
205
|
+
accessibilityRole: "button",
|
|
206
|
+
accessibilityLabel: accessibilityLabel ?? label ?? readout ?? placeholder,
|
|
207
|
+
accessibilityValue: readout ? { text: readout } : void 0,
|
|
208
|
+
accessibilityState: { disabled, expanded: open },
|
|
209
|
+
...expandedProps(open),
|
|
210
|
+
"aria-busy": isLoading || void 0,
|
|
211
|
+
disabled,
|
|
212
|
+
onPress: interactive ? openSheet : void 0,
|
|
213
|
+
hitSlop: { top: slopY, bottom: slopY },
|
|
214
|
+
style: [
|
|
215
|
+
styles.trigger,
|
|
216
|
+
{ backgroundColor: fieldSurfaceFill(theme, surface) },
|
|
217
|
+
isLoading ? { borderColor: theme.focus.ringColor, backgroundColor: theme.color.surface } : null
|
|
218
|
+
],
|
|
219
|
+
children: [
|
|
220
|
+
leading != null ? /* @__PURE__ */ jsx(View, { testID: "time-field-leading", style: styles.leading, children: leading }) : null,
|
|
221
|
+
readout && current ? (
|
|
222
|
+
// The trigger already carries the readout as its label and value, so
|
|
223
|
+
// the roll is decorative.
|
|
224
|
+
/* @__PURE__ */ jsx(View, { style: styles.readout, children: /* @__PURE__ */ jsx(
|
|
225
|
+
NumberRoll,
|
|
226
|
+
{
|
|
227
|
+
decorative: true,
|
|
228
|
+
motion: level,
|
|
229
|
+
value: current.hour * 1e4 + current.minute * 100 + (current.second ?? 0),
|
|
230
|
+
formatValue: () => readout,
|
|
231
|
+
textStyle: [styles.value, valueFont, styles.rollText]
|
|
232
|
+
}
|
|
233
|
+
) })
|
|
234
|
+
) : /* @__PURE__ */ jsx(Text, { style: [styles.value, valueFont], numberOfLines: 1, children: readout ?? placeholder }),
|
|
235
|
+
showClear ? (
|
|
236
|
+
// Holds the clear button's place; the button itself sits outside the
|
|
237
|
+
// trigger so two buttons are never nested.
|
|
238
|
+
/* @__PURE__ */ jsx(View, { style: { width: iconSize, height: iconSize } })
|
|
239
|
+
) : null,
|
|
240
|
+
isLoading ? /* @__PURE__ */ jsx(
|
|
241
|
+
ActivityIndicator,
|
|
202
242
|
{
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
textStyle: [styles.value, styles.rollText]
|
|
243
|
+
testID: "time-field-spinner",
|
|
244
|
+
size: "small",
|
|
245
|
+
color: theme.color.accent,
|
|
246
|
+
accessibilityLabel: labels.validating
|
|
208
247
|
}
|
|
209
|
-
)
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
248
|
+
) : valid ? /* @__PURE__ */ jsx(
|
|
249
|
+
View,
|
|
250
|
+
{
|
|
251
|
+
testID: "time-field-status-icon",
|
|
252
|
+
accessibilityRole: "image",
|
|
253
|
+
accessibilityLabel: labels.valid,
|
|
254
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "check-circle", size: iconSize, color: theme.color.good })
|
|
255
|
+
}
|
|
256
|
+
) : trailing != null ? /* @__PURE__ */ jsx(View, { testID: "time-field-trailing", style: { minWidth: iconSize, minHeight: iconSize }, children: trailing }) : /* @__PURE__ */ jsx(Icon, { name: "clock", size: iconSize, color: theme.color.text3 })
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
),
|
|
260
|
+
showClear ? /* @__PURE__ */ jsx(
|
|
261
|
+
Pressable,
|
|
262
|
+
{
|
|
263
|
+
testID: "time-field-clear",
|
|
264
|
+
style: [
|
|
265
|
+
styles.clear,
|
|
266
|
+
{
|
|
267
|
+
right: theme.borderWidth.thick + theme.ctl.px[size] + theme.ctl.gap[size] + iconSize
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
accessibilityRole: "button",
|
|
271
|
+
accessibilityLabel: labels.clear,
|
|
272
|
+
onPress: () => {
|
|
273
|
+
if (value === void 0) setInner(null);
|
|
274
|
+
onValueChange?.(null);
|
|
275
|
+
},
|
|
276
|
+
hitSlop: Math.max(0, (theme.tapMin - iconSize) / 2),
|
|
277
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: iconSize, color: theme.color.text3 })
|
|
278
|
+
}
|
|
279
|
+
) : null
|
|
280
|
+
] }),
|
|
215
281
|
message ? /* @__PURE__ */ jsxs(View, { style: styles.messageRow, children: [
|
|
216
|
-
hasError ? /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.
|
|
282
|
+
hasError ? /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.dangerOnSoft }) : null,
|
|
217
283
|
/* @__PURE__ */ jsx(Text, { style: hasError ? styles.messageError : styles.message, children: message })
|
|
218
284
|
] }) : null,
|
|
219
285
|
/* @__PURE__ */ jsx(
|
|
@@ -291,12 +357,18 @@ function TimeField({
|
|
|
291
357
|
] });
|
|
292
358
|
}
|
|
293
359
|
var sheet = createStyleSheet((theme) => ({
|
|
360
|
+
leading: { alignItems: "center", justifyContent: "center" },
|
|
294
361
|
root: { gap: theme.space.s1 },
|
|
362
|
+
// R11: 13 / 600 on iOS, 14 / 500 on Android, in `text` — as Input's label.
|
|
295
363
|
label: {
|
|
296
364
|
fontFamily: theme.font.sans,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
365
|
+
color: theme.color.text,
|
|
366
|
+
variants: {
|
|
367
|
+
os: {
|
|
368
|
+
ios: { fontSize: theme.fontSize[13], fontWeight: theme.fontWeight.semibold },
|
|
369
|
+
android: { fontSize: theme.fontSize[14], fontWeight: theme.fontWeight.medium }
|
|
370
|
+
}
|
|
371
|
+
}
|
|
300
372
|
},
|
|
301
373
|
trigger: {
|
|
302
374
|
flexDirection: "row",
|
|
@@ -330,7 +402,8 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
330
402
|
}
|
|
331
403
|
},
|
|
332
404
|
invalid: {
|
|
333
|
-
|
|
405
|
+
// R7: a danger edge on the normal fill; the icon and message carry it.
|
|
406
|
+
true: { backgroundColor: theme.color.surface2, borderColor: theme.color.danger },
|
|
334
407
|
false: { backgroundColor: theme.color.surface2, borderColor: theme.color.borderStrong }
|
|
335
408
|
},
|
|
336
409
|
disabled: {
|
|
@@ -342,6 +415,8 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
342
415
|
value: {
|
|
343
416
|
flex: 1,
|
|
344
417
|
fontFamily: theme.font.sans,
|
|
418
|
+
// Tabular figures, so the readout does not jitter as the time changes.
|
|
419
|
+
fontVariant: ["tabular-nums"],
|
|
345
420
|
variants: {
|
|
346
421
|
size: {
|
|
347
422
|
xs: { fontSize: theme.fontSize[14] },
|
|
@@ -356,13 +431,15 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
356
431
|
}
|
|
357
432
|
},
|
|
358
433
|
readout: { flex: 1, flexDirection: "row" },
|
|
434
|
+
triggerWrap: { position: "relative" },
|
|
435
|
+
clear: { position: "absolute", top: 0, bottom: 0, justifyContent: "center" },
|
|
359
436
|
rollText: { flex: 0 },
|
|
360
437
|
messageRow: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s1 },
|
|
361
438
|
message: { fontFamily: theme.font.sans, fontSize: theme.fontSize[12], color: theme.color.text3 },
|
|
362
439
|
messageError: {
|
|
363
440
|
fontFamily: theme.font.sans,
|
|
364
441
|
fontSize: theme.fontSize[12],
|
|
365
|
-
color: theme.color.
|
|
442
|
+
color: theme.color.dangerOnSoft
|
|
366
443
|
},
|
|
367
444
|
columns: { flexDirection: "row", gap: theme.space.s2 },
|
|
368
445
|
column: { flex: 1, gap: theme.space.s1 },
|
|
@@ -384,22 +461,19 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
384
461
|
borderColor: "transparent"
|
|
385
462
|
},
|
|
386
463
|
optionSelected: {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
464
|
+
position: "absolute",
|
|
465
|
+
top: 0,
|
|
466
|
+
bottom: 0,
|
|
467
|
+
end: theme.space.s3,
|
|
468
|
+
justifyContent: "center"
|
|
391
469
|
},
|
|
392
470
|
optionOff: { opacity: theme.state.disabledOpacity },
|
|
393
|
-
optionPressed: { backgroundColor: theme.
|
|
471
|
+
optionPressed: { backgroundColor: theme.state.hover },
|
|
394
472
|
optionLabel: {
|
|
395
473
|
fontFamily: theme.font.sans,
|
|
396
474
|
fontSize: theme.fontSize[16],
|
|
397
475
|
color: theme.color.text2
|
|
398
476
|
},
|
|
399
|
-
optionLabelSelected: {
|
|
400
|
-
fontWeight: theme.fontWeight.semibold,
|
|
401
|
-
color: theme.color.accentOnSoft
|
|
402
|
-
},
|
|
403
477
|
footer: { paddingHorizontal: theme.space.s3, paddingTop: theme.space.s2 }
|
|
404
478
|
}));
|
|
405
479
|
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { ExpandingSearchField } from './chunk-6KSUS7DF.js';
|
|
2
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
3
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
4
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { Pressable, View, Animated, Text } from 'react-native';
|
|
7
|
+
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
8
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
function NavHeaderAction({
|
|
11
|
+
icon,
|
|
12
|
+
accessibilityLabel,
|
|
13
|
+
onPress,
|
|
14
|
+
disabled = false,
|
|
15
|
+
platform
|
|
16
|
+
}) {
|
|
17
|
+
const theme = useLoamTheme("nav-header");
|
|
18
|
+
const { styles } = useStyles(sheet, { align: "left", large: false });
|
|
19
|
+
const android = isAndroidIdiom(theme, platform);
|
|
20
|
+
const color = disabled ? theme.color.text3 : android ? theme.color.text2 : theme.color.accentStrong;
|
|
21
|
+
const hit = android ? Math.max(theme.hit.lg, 48) : theme.tapMin;
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Pressable,
|
|
24
|
+
{
|
|
25
|
+
accessibilityRole: "button",
|
|
26
|
+
accessibilityLabel,
|
|
27
|
+
accessibilityState: { disabled },
|
|
28
|
+
disabled,
|
|
29
|
+
onPress: disabled ? void 0 : onPress,
|
|
30
|
+
android_ripple: android ? { color: theme.state.pressed, borderless: true, radius: hit / 2 } : void 0,
|
|
31
|
+
style: ({ pressed }) => [
|
|
32
|
+
styles.action,
|
|
33
|
+
{ width: hit, height: hit },
|
|
34
|
+
// iOS bar buttons dim on press; Android ripples.
|
|
35
|
+
pressed && !disabled && !android ? { opacity: theme.state.pressedOpacity } : null
|
|
36
|
+
],
|
|
37
|
+
children: /* @__PURE__ */ jsx(Icon, { name: icon, size: android ? theme.icon.lg : theme.icon.md, color })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function BackLink({
|
|
42
|
+
title,
|
|
43
|
+
accessibilityLabel,
|
|
44
|
+
onPress
|
|
45
|
+
}) {
|
|
46
|
+
const theme = useLoamTheme("nav-header");
|
|
47
|
+
const { styles } = useStyles(sheet, { align: "left", large: false });
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Pressable,
|
|
50
|
+
{
|
|
51
|
+
accessibilityRole: "button",
|
|
52
|
+
accessibilityLabel,
|
|
53
|
+
onPress,
|
|
54
|
+
hitSlop: 8,
|
|
55
|
+
style: ({ pressed }) => [
|
|
56
|
+
styles.backLink,
|
|
57
|
+
pressed ? { opacity: theme.state.pressedOpacity } : null
|
|
58
|
+
],
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: theme.icon.lg, color: theme.color.accentStrong }),
|
|
61
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.backText, children: title })
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
var DEFAULT_LABELS = {
|
|
67
|
+
back: "Back"
|
|
68
|
+
};
|
|
69
|
+
var STRETCH = 1.06;
|
|
70
|
+
var SHRINK = 0.9;
|
|
71
|
+
function NavHeader({
|
|
72
|
+
title,
|
|
73
|
+
subtitle,
|
|
74
|
+
leading,
|
|
75
|
+
backTitle,
|
|
76
|
+
leadingLabel,
|
|
77
|
+
onLeadingPress,
|
|
78
|
+
leadingSlot,
|
|
79
|
+
trailing,
|
|
80
|
+
align: alignProp,
|
|
81
|
+
large = false,
|
|
82
|
+
density = "standard",
|
|
83
|
+
scrolled: scrolledProp,
|
|
84
|
+
platform,
|
|
85
|
+
showSearch: showSearchProp = false,
|
|
86
|
+
searchPlaceholder,
|
|
87
|
+
labels: labelsProp,
|
|
88
|
+
searchRecents = [],
|
|
89
|
+
searchValue,
|
|
90
|
+
onSearchChangeText,
|
|
91
|
+
onSearchCancel,
|
|
92
|
+
searchSlot,
|
|
93
|
+
scrollY
|
|
94
|
+
}) {
|
|
95
|
+
const labels = useLabels("navHeader", DEFAULT_LABELS, labelsProp);
|
|
96
|
+
const theme = useLoamTheme("nav-header");
|
|
97
|
+
const android = isAndroidIdiom(theme, platform);
|
|
98
|
+
const align = alignProp ?? (android ? "left" : "center");
|
|
99
|
+
const compact = density === "compact";
|
|
100
|
+
const { styles } = useStyles(sheet, { align, large });
|
|
101
|
+
const [scrolledFromY, setScrolledFromY] = React.useState(false);
|
|
102
|
+
React.useEffect(() => {
|
|
103
|
+
if (!scrollY) return;
|
|
104
|
+
const id = scrollY.addListener(({ value }) => setScrolledFromY(value > 0));
|
|
105
|
+
return () => scrollY.removeListener(id);
|
|
106
|
+
}, [scrollY]);
|
|
107
|
+
const scrolled = scrolledProp ?? scrolledFromY;
|
|
108
|
+
const leadingIcon = android && leading === "chevron-left" ? "arrow-left" : leading;
|
|
109
|
+
const showSearch = showSearchProp || searchSlot != null;
|
|
110
|
+
const collapsing = large && scrollY != null;
|
|
111
|
+
const [span, setSpan] = React.useState(theme.space[48]);
|
|
112
|
+
const largeStyle = collapsing ? {
|
|
113
|
+
opacity: scrollY.interpolate({
|
|
114
|
+
inputRange: [0, span * 0.6],
|
|
115
|
+
outputRange: [1, 0],
|
|
116
|
+
extrapolate: "clamp"
|
|
117
|
+
}),
|
|
118
|
+
transform: [
|
|
119
|
+
{
|
|
120
|
+
scale: scrollY.interpolate({
|
|
121
|
+
inputRange: [-span, 0, span],
|
|
122
|
+
outputRange: [STRETCH, 1, SHRINK],
|
|
123
|
+
extrapolate: "clamp"
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
transformOrigin: "left center"
|
|
128
|
+
} : null;
|
|
129
|
+
const inlineStyle = collapsing ? {
|
|
130
|
+
opacity: scrollY.interpolate({
|
|
131
|
+
inputRange: [span * 0.5, span],
|
|
132
|
+
outputRange: [0, 1],
|
|
133
|
+
extrapolate: "clamp"
|
|
134
|
+
})
|
|
135
|
+
} : null;
|
|
136
|
+
return /* @__PURE__ */ jsxs(
|
|
137
|
+
View,
|
|
138
|
+
{
|
|
139
|
+
accessibilityRole: "header",
|
|
140
|
+
style: [
|
|
141
|
+
styles.container,
|
|
142
|
+
android ? { backgroundColor: scrolled ? theme.color.surface2 : theme.color.surface } : { borderBottomColor: scrolled ? theme.color.border : "transparent" }
|
|
143
|
+
],
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ jsxs(
|
|
146
|
+
View,
|
|
147
|
+
{
|
|
148
|
+
style: [
|
|
149
|
+
styles.bar,
|
|
150
|
+
android && styles.barAndroid,
|
|
151
|
+
compact && android && { height: theme.layout.appbarH - theme.space.s2 },
|
|
152
|
+
compact && { gap: theme.space.s1 }
|
|
153
|
+
],
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ jsx(View, { style: styles.leftSide, children: leadingSlot != null ? leadingSlot : !android && backTitle && leading ? /* @__PURE__ */ jsx(
|
|
156
|
+
BackLink,
|
|
157
|
+
{
|
|
158
|
+
title: backTitle,
|
|
159
|
+
accessibilityLabel: leadingLabel ?? labels.back,
|
|
160
|
+
onPress: onLeadingPress
|
|
161
|
+
}
|
|
162
|
+
) : leadingIcon ? /* @__PURE__ */ jsx(
|
|
163
|
+
NavHeaderAction,
|
|
164
|
+
{
|
|
165
|
+
icon: leadingIcon,
|
|
166
|
+
accessibilityLabel: leadingLabel ?? labels.back,
|
|
167
|
+
onPress: onLeadingPress,
|
|
168
|
+
...platform ? { platform } : null
|
|
169
|
+
}
|
|
170
|
+
) : null }),
|
|
171
|
+
/* @__PURE__ */ jsx(View, { style: styles.titleWrap, children: collapsing ? /* @__PURE__ */ jsx(
|
|
172
|
+
Animated.Text,
|
|
173
|
+
{
|
|
174
|
+
numberOfLines: 1,
|
|
175
|
+
style: [styles.title, android && styles.titleAndroid, inlineStyle],
|
|
176
|
+
"aria-hidden": true,
|
|
177
|
+
accessibilityElementsHidden: true,
|
|
178
|
+
importantForAccessibility: "no-hide-descendants",
|
|
179
|
+
children: title
|
|
180
|
+
}
|
|
181
|
+
) : large ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
182
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.title, android && styles.titleAndroid], children: title }),
|
|
183
|
+
subtitle ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.subtitle, children: subtitle }) : null
|
|
184
|
+
] }) }),
|
|
185
|
+
/* @__PURE__ */ jsx(View, { style: styles.rightSide, children: trailing })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
large ? /* @__PURE__ */ jsxs(
|
|
190
|
+
View,
|
|
191
|
+
{
|
|
192
|
+
style: [
|
|
193
|
+
styles.largeBlock,
|
|
194
|
+
compact && { paddingTop: 0, paddingBottom: theme.space.s2, gap: 0 }
|
|
195
|
+
],
|
|
196
|
+
onLayout: (e) => setSpan(Math.max(1, e.nativeEvent.layout.height)),
|
|
197
|
+
children: [
|
|
198
|
+
/* @__PURE__ */ jsx(
|
|
199
|
+
Animated.Text,
|
|
200
|
+
{
|
|
201
|
+
numberOfLines: 1,
|
|
202
|
+
style: [styles.largeTitle, android && styles.largeTitleAndroid, largeStyle],
|
|
203
|
+
children: title
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
subtitle ? /* @__PURE__ */ jsx(Text, { style: styles.largeSubtitle, children: subtitle }) : null
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
) : null,
|
|
210
|
+
showSearch ? /* @__PURE__ */ jsx(View, { style: styles.searchRow, children: searchSlot != null ? searchSlot : /* @__PURE__ */ jsx(
|
|
211
|
+
ExpandingSearchField,
|
|
212
|
+
{
|
|
213
|
+
placeholder: searchPlaceholder,
|
|
214
|
+
recents: searchRecents,
|
|
215
|
+
value: searchValue,
|
|
216
|
+
onChangeText: onSearchChangeText,
|
|
217
|
+
onCancel: onSearchCancel
|
|
218
|
+
}
|
|
219
|
+
) }) : null
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
var sheet = createStyleSheet((theme) => ({
|
|
225
|
+
// No edge at rest: iOS shows the hairline, Android the surface-2 tint, only
|
|
226
|
+
// once content scrolls under the bar.
|
|
227
|
+
container: {
|
|
228
|
+
backgroundColor: theme.color.surface,
|
|
229
|
+
borderBottomWidth: theme.borderWidth.hair,
|
|
230
|
+
borderBottomColor: "transparent"
|
|
231
|
+
},
|
|
232
|
+
// `layout.appbarH` is the one metric that branches on platform: 44 on iOS
|
|
233
|
+
// (UINavigationBar), 64 on Android (Material top app bar). It replaces a flat
|
|
234
|
+
// 56px that was wrong on both.
|
|
235
|
+
bar: {
|
|
236
|
+
flexDirection: "row",
|
|
237
|
+
alignItems: "center",
|
|
238
|
+
height: theme.layout.appbarH,
|
|
239
|
+
paddingHorizontal: theme.space.s2,
|
|
240
|
+
gap: theme.space.s2
|
|
241
|
+
},
|
|
242
|
+
// Android: 4 to the 48 icon buttons, which carry their own inset.
|
|
243
|
+
barAndroid: {
|
|
244
|
+
paddingHorizontal: theme.space[4],
|
|
245
|
+
gap: theme.space[4]
|
|
246
|
+
},
|
|
247
|
+
leftSide: {
|
|
248
|
+
alignItems: "flex-start",
|
|
249
|
+
justifyContent: "center",
|
|
250
|
+
variants: {
|
|
251
|
+
// Centered titles need matching gutters on both sides, or the title is
|
|
252
|
+
// only centred within whatever the actions left over.
|
|
253
|
+
align: { left: {}, center: { minWidth: theme.tapMin } },
|
|
254
|
+
large: { true: {}, false: {} }
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
rightSide: {
|
|
258
|
+
flexDirection: "row",
|
|
259
|
+
alignItems: "center",
|
|
260
|
+
justifyContent: "flex-end",
|
|
261
|
+
gap: theme.space.s1,
|
|
262
|
+
variants: {
|
|
263
|
+
align: { left: {}, center: { minWidth: theme.tapMin } },
|
|
264
|
+
large: { true: {}, false: {} }
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
titleWrap: {
|
|
268
|
+
flex: 1,
|
|
269
|
+
justifyContent: "center",
|
|
270
|
+
variants: {
|
|
271
|
+
align: { left: { alignItems: "flex-start" }, center: { alignItems: "center" } },
|
|
272
|
+
large: { true: {}, false: {} }
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
// `type.headline` (17/22/600) is the nav-bar title role on both ramps (HIG
|
|
276
|
+
// headline / M3 title), is what `NavStack`'s own `NavBar` already uses
|
|
277
|
+
// for the same element, and is what the design reference draws (16/700). The
|
|
278
|
+
// deprecated `fontSize[20]` (20) it replaced was the web h3, and left no room
|
|
279
|
+
// for a subtitle inside the 44dp row.
|
|
280
|
+
title: {
|
|
281
|
+
fontFamily: theme.font.sans,
|
|
282
|
+
fontWeight: theme.fontWeight.semibold,
|
|
283
|
+
fontSize: theme.type.headline.fontSize,
|
|
284
|
+
lineHeight: theme.type.headline.lineHeight,
|
|
285
|
+
letterSpacing: theme.type.headline.letterSpacing,
|
|
286
|
+
color: theme.color.text,
|
|
287
|
+
variants: {
|
|
288
|
+
align: { left: { textAlign: "left" }, center: { textAlign: "center" } },
|
|
289
|
+
large: { true: {}, false: {} }
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
// M3 top app bar title: 22 / 28 / 400 at the start.
|
|
293
|
+
titleAndroid: {
|
|
294
|
+
fontSize: theme.fontSize[22],
|
|
295
|
+
lineHeight: theme.space[28],
|
|
296
|
+
fontWeight: theme.fontWeight.regular,
|
|
297
|
+
letterSpacing: 0
|
|
298
|
+
},
|
|
299
|
+
backLink: {
|
|
300
|
+
flexDirection: "row",
|
|
301
|
+
alignItems: "center",
|
|
302
|
+
minHeight: theme.tapMin,
|
|
303
|
+
maxWidth: theme.space[128] ?? 128
|
|
304
|
+
},
|
|
305
|
+
backText: {
|
|
306
|
+
fontFamily: theme.font.sans,
|
|
307
|
+
fontSize: theme.type.body.fontSize,
|
|
308
|
+
lineHeight: theme.type.body.lineHeight,
|
|
309
|
+
fontWeight: theme.fontWeight.regular,
|
|
310
|
+
color: theme.color.accentStrong
|
|
311
|
+
},
|
|
312
|
+
// A subtitle has to fit *under* the title inside the same bar row, so it is a
|
|
313
|
+
// footnote, not `fontSize[14]`: 13/18 plus 22 for the title is 40 of the 44.
|
|
314
|
+
subtitle: {
|
|
315
|
+
fontFamily: theme.font.sans,
|
|
316
|
+
fontSize: theme.type.footnote.fontSize,
|
|
317
|
+
lineHeight: theme.type.footnote.lineHeight,
|
|
318
|
+
letterSpacing: theme.type.footnote.letterSpacing,
|
|
319
|
+
color: theme.color.text2,
|
|
320
|
+
variants: {
|
|
321
|
+
align: { left: { textAlign: "left" }, center: { textAlign: "center" } },
|
|
322
|
+
large: { true: {}, false: {} }
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
largeBlock: {
|
|
326
|
+
paddingHorizontal: theme.space.s4,
|
|
327
|
+
paddingTop: theme.space.s2,
|
|
328
|
+
paddingBottom: theme.space.s4,
|
|
329
|
+
gap: theme.space.s1
|
|
330
|
+
},
|
|
331
|
+
// The integrated search row sits under the bar: reference `padding:0 12px 12px`
|
|
332
|
+
// (buildAppBar search size), mapped to the space scale (16 horizontal / 12
|
|
333
|
+
// bottom is close enough on the 4px grid; the field owns its own height).
|
|
334
|
+
searchRow: {
|
|
335
|
+
paddingHorizontal: theme.space.s4,
|
|
336
|
+
paddingBottom: theme.space.s3
|
|
337
|
+
},
|
|
338
|
+
// 34 is the intended iOS large title and is unchanged; it just moves from the
|
|
339
|
+
// deprecated size-only ramp (`fontSize[36]`) to the semantic role that
|
|
340
|
+
// owns that size, which also brings the 41 line box with it. Without an
|
|
341
|
+
// explicit `lineHeight` a 34px display-face line was laid out on `normal`.
|
|
342
|
+
// R14: the OS face, iOS large title 34 / 700.
|
|
343
|
+
largeTitle: {
|
|
344
|
+
fontFamily: theme.font.sans,
|
|
345
|
+
fontWeight: theme.fontWeight.bold,
|
|
346
|
+
fontSize: theme.type.largeTitle.fontSize,
|
|
347
|
+
lineHeight: theme.type.largeTitle.lineHeight,
|
|
348
|
+
letterSpacing: theme.type.largeTitle.letterSpacing,
|
|
349
|
+
color: theme.color.text
|
|
350
|
+
},
|
|
351
|
+
// The Android medium top app bar: 28 / 36 / 400.
|
|
352
|
+
largeTitleAndroid: {
|
|
353
|
+
fontSize: theme.fontSize[28],
|
|
354
|
+
lineHeight: theme.space[36],
|
|
355
|
+
fontWeight: theme.fontWeight.regular,
|
|
356
|
+
letterSpacing: 0
|
|
357
|
+
},
|
|
358
|
+
// `type.callout` is 16 — the same size `fontSize[16]` resolved to, on the
|
|
359
|
+
// semantic ramp and with a line box.
|
|
360
|
+
largeSubtitle: {
|
|
361
|
+
fontFamily: theme.font.sans,
|
|
362
|
+
fontSize: theme.type.callout.fontSize,
|
|
363
|
+
lineHeight: theme.type.callout.lineHeight,
|
|
364
|
+
letterSpacing: theme.type.callout.letterSpacing,
|
|
365
|
+
color: theme.color.text2
|
|
366
|
+
},
|
|
367
|
+
// A bar button is a touch target before it is a glyph: `tapMin` (44), not the
|
|
368
|
+
// 40 it used to hardcode.
|
|
369
|
+
action: {
|
|
370
|
+
width: theme.tapMin,
|
|
371
|
+
height: theme.tapMin,
|
|
372
|
+
borderRadius: theme.radius.full,
|
|
373
|
+
alignItems: "center",
|
|
374
|
+
justifyContent: "center"
|
|
375
|
+
}
|
|
376
|
+
}));
|
|
377
|
+
|
|
378
|
+
export { NavHeader, NavHeaderAction };
|