@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
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { Spinner } from './chunk-G7H3NX3G.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 { Animated, Easing, View, Pressable, Text } from 'react-native';
|
|
7
|
+
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var DEFAULT_LABELS = {
|
|
11
|
+
label: "Thinking\u2026",
|
|
12
|
+
accessibleLabel: "Thinking",
|
|
13
|
+
cancel: "Cancel",
|
|
14
|
+
elapsed: (s) => `${s}s`,
|
|
15
|
+
thoughtFor: (s) => `Thought for ${s} s`
|
|
16
|
+
};
|
|
17
|
+
var DOT_BOX = { sm: 6, md: 8, lg: 10 };
|
|
18
|
+
function useThinkingPulse(active) {
|
|
19
|
+
const theme = useLoamTheme("thinking");
|
|
20
|
+
const p = React.useRef(new Animated.Value(0)).current;
|
|
21
|
+
const { duration, easing } = theme.motion.loop;
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
if (!active) {
|
|
24
|
+
p.setValue(0);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const bezier = Easing.bezier(...easing);
|
|
28
|
+
const loop = Animated.loop(
|
|
29
|
+
Animated.sequence([
|
|
30
|
+
Animated.timing(p, { toValue: 1, duration, easing: bezier, useNativeDriver: true }),
|
|
31
|
+
Animated.timing(p, { toValue: 0, duration, easing: bezier, useNativeDriver: true })
|
|
32
|
+
])
|
|
33
|
+
);
|
|
34
|
+
loop.start();
|
|
35
|
+
return () => loop.stop();
|
|
36
|
+
}, [active, p, duration, easing]);
|
|
37
|
+
return active ? {
|
|
38
|
+
opacity: p.interpolate({ inputRange: [0, 1], outputRange: [1, 0.55] }),
|
|
39
|
+
transform: [{ scale: p.interpolate({ inputRange: [0, 1], outputRange: [1, 0.9] }) }]
|
|
40
|
+
} : null;
|
|
41
|
+
}
|
|
42
|
+
function useElapsed(active) {
|
|
43
|
+
const start = React.useRef(Date.now());
|
|
44
|
+
const [elapsed, setElapsed] = React.useState(0);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (!active) return;
|
|
47
|
+
const id = setInterval(() => setElapsed(Date.now() - start.current), 1e3);
|
|
48
|
+
return () => clearInterval(id);
|
|
49
|
+
}, [active]);
|
|
50
|
+
return elapsed;
|
|
51
|
+
}
|
|
52
|
+
function useShimmer(active) {
|
|
53
|
+
const theme = useLoamTheme("thinking");
|
|
54
|
+
const v = React.useRef(new Animated.Value(1)).current;
|
|
55
|
+
const { duration, easing } = theme.motion.loop;
|
|
56
|
+
React.useEffect(() => {
|
|
57
|
+
if (!active) {
|
|
58
|
+
v.setValue(1);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const bezier = Easing.bezier(...easing);
|
|
62
|
+
const loop = Animated.loop(
|
|
63
|
+
Animated.sequence([
|
|
64
|
+
Animated.timing(v, { toValue: 0.45, duration, easing: bezier, useNativeDriver: true }),
|
|
65
|
+
Animated.timing(v, { toValue: 1, duration, easing: bezier, useNativeDriver: true })
|
|
66
|
+
])
|
|
67
|
+
);
|
|
68
|
+
loop.start();
|
|
69
|
+
return () => loop.stop();
|
|
70
|
+
}, [active, v, duration, easing]);
|
|
71
|
+
return v;
|
|
72
|
+
}
|
|
73
|
+
function Thinking({
|
|
74
|
+
label: labelProp,
|
|
75
|
+
size = "md",
|
|
76
|
+
tone = "working",
|
|
77
|
+
motion = "full",
|
|
78
|
+
announce = true,
|
|
79
|
+
accessibleLabel: accessibleLabelProp,
|
|
80
|
+
labels: labelsProp,
|
|
81
|
+
shimmer = false,
|
|
82
|
+
showElapsed = false,
|
|
83
|
+
onCancel,
|
|
84
|
+
cancelAfter = 1e4,
|
|
85
|
+
loading = true,
|
|
86
|
+
indicator = "dot",
|
|
87
|
+
cancelTone = "neutral",
|
|
88
|
+
thoughtFor,
|
|
89
|
+
reasoning,
|
|
90
|
+
defaultOpen = false,
|
|
91
|
+
platform,
|
|
92
|
+
style,
|
|
93
|
+
testID
|
|
94
|
+
}) {
|
|
95
|
+
const labels = useLabels("thinking", DEFAULT_LABELS, labelsProp);
|
|
96
|
+
const label = labelProp ?? labels.label;
|
|
97
|
+
const accessibleLabel = accessibleLabelProp ?? labels.accessibleLabel;
|
|
98
|
+
const { styles } = useStyles(sheet, { tone, size });
|
|
99
|
+
const theme = useLoamTheme("thinking");
|
|
100
|
+
const android = isAndroidIdiom(theme, platform);
|
|
101
|
+
const pulse = loading && motion === "full" && !theme.reduceMotion;
|
|
102
|
+
const pulseStyle = useThinkingPulse(pulse);
|
|
103
|
+
const shimmerOpacity = useShimmer(shimmer && pulse);
|
|
104
|
+
const elapsedAfter = showElapsed === true ? 5e3 : showElapsed === false ? Infinity : showElapsed;
|
|
105
|
+
const elapsed = useElapsed(loading && (Number.isFinite(elapsedAfter) || Boolean(onCancel)));
|
|
106
|
+
const seconds = loading && elapsed >= elapsedAfter ? Math.floor(elapsed / 1e3) : null;
|
|
107
|
+
const canCancel = loading && Boolean(onCancel) && elapsed >= cancelAfter;
|
|
108
|
+
const [open, setOpen] = React.useState(defaultOpen);
|
|
109
|
+
if (thoughtFor !== void 0) {
|
|
110
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles.done, style], testID, children: [
|
|
111
|
+
/* @__PURE__ */ jsxs(
|
|
112
|
+
Pressable,
|
|
113
|
+
{
|
|
114
|
+
accessibilityRole: "button",
|
|
115
|
+
accessibilityState: { expanded: open },
|
|
116
|
+
onPress: () => setOpen((o) => !o),
|
|
117
|
+
hitSlop: theme.space.s2,
|
|
118
|
+
style: styles.doneToggle,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsx(View, { style: open ? styles.chevronOpen : null, children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 12, color: theme.color.text2 }) }),
|
|
121
|
+
/* @__PURE__ */ jsx(Text, { style: styles.doneLabel, children: labels.thoughtFor(thoughtFor) })
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
open ? typeof reasoning === "string" ? /* @__PURE__ */ jsx(Text, { style: styles.reasoning, children: reasoning }) : /* @__PURE__ */ jsx(View, { style: styles.reasoningBox, children: reasoning }) : null
|
|
126
|
+
] });
|
|
127
|
+
}
|
|
128
|
+
const hasLabel = label !== "";
|
|
129
|
+
const box = DOT_BOX[size];
|
|
130
|
+
const dotColor = tone === "accent" ? theme.color.accent : tone === "neutral" ? theme.color.text2 : theme.status.working;
|
|
131
|
+
const name = hasLabel ? label : accessibleLabel;
|
|
132
|
+
const liveProps = announce ? { accessibilityLiveRegion: "polite", role: "status", accessibilityLabel: name } : {};
|
|
133
|
+
return /* @__PURE__ */ jsxs(
|
|
134
|
+
View,
|
|
135
|
+
{
|
|
136
|
+
...liveProps,
|
|
137
|
+
"aria-busy": loading || void 0,
|
|
138
|
+
testID,
|
|
139
|
+
style: [styles.root, style],
|
|
140
|
+
children: [
|
|
141
|
+
indicator === "ring" ? /* @__PURE__ */ jsx(Spinner, { size: "sm", color: dotColor, motion, accessibilityLabel: name }) : /* @__PURE__ */ jsx(
|
|
142
|
+
Animated.View,
|
|
143
|
+
{
|
|
144
|
+
style: [
|
|
145
|
+
{ width: box, height: box, borderRadius: theme.radius.full, backgroundColor: dotColor },
|
|
146
|
+
pulseStyle
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
hasLabel ? /* @__PURE__ */ jsx(
|
|
151
|
+
Animated.Text,
|
|
152
|
+
{
|
|
153
|
+
style: [styles.label, shimmer && pulse ? { opacity: shimmerOpacity } : null],
|
|
154
|
+
children: label
|
|
155
|
+
}
|
|
156
|
+
) : null,
|
|
157
|
+
seconds !== null ? (
|
|
158
|
+
// Hidden from the live region: a count that re-announces every second
|
|
159
|
+
// would drown out everything else.
|
|
160
|
+
/* @__PURE__ */ jsx(
|
|
161
|
+
Text,
|
|
162
|
+
{
|
|
163
|
+
accessibilityElementsHidden: true,
|
|
164
|
+
importantForAccessibility: "no-hide-descendants",
|
|
165
|
+
style: styles.elapsed,
|
|
166
|
+
children: labels.elapsed(seconds)
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
) : null,
|
|
170
|
+
canCancel ? /* @__PURE__ */ jsx(
|
|
171
|
+
Pressable,
|
|
172
|
+
{
|
|
173
|
+
accessibilityRole: "button",
|
|
174
|
+
accessibilityLabel: labels.cancel,
|
|
175
|
+
onPress: onCancel,
|
|
176
|
+
hitSlop: Math.max(0, Math.round((theme.tapMin - theme.ctl.sm) / 2)),
|
|
177
|
+
android_ripple: android ? { color: theme.state.pressed } : void 0,
|
|
178
|
+
style: ({ pressed }) => [
|
|
179
|
+
styles.cancelBox,
|
|
180
|
+
pressed && !android && { backgroundColor: theme.state.hover }
|
|
181
|
+
],
|
|
182
|
+
children: /* @__PURE__ */ jsx(
|
|
183
|
+
Text,
|
|
184
|
+
{
|
|
185
|
+
style: [
|
|
186
|
+
styles.cancel,
|
|
187
|
+
android && { fontWeight: theme.fontWeight.medium },
|
|
188
|
+
cancelTone === "accent" && { color: theme.color.accentStrong }
|
|
189
|
+
],
|
|
190
|
+
children: labels.cancel
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
) : null
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
var sheet = createStyleSheet((theme) => ({
|
|
200
|
+
done: { alignSelf: "flex-start", alignItems: "flex-start", gap: theme.space.s1 },
|
|
201
|
+
doneToggle: {
|
|
202
|
+
flexDirection: "row",
|
|
203
|
+
alignItems: "center",
|
|
204
|
+
gap: theme.space[6],
|
|
205
|
+
paddingHorizontal: theme.space.s1,
|
|
206
|
+
borderRadius: theme.radius.sm
|
|
207
|
+
},
|
|
208
|
+
chevronOpen: { transform: [{ rotate: "90deg" }] },
|
|
209
|
+
doneLabel: { ...theme.type.footnote, color: theme.color.text2 },
|
|
210
|
+
reasoningBox: { paddingStart: theme.space.s5 },
|
|
211
|
+
reasoning: { ...theme.type.footnote, color: theme.color.text2, paddingStart: theme.space.s5 },
|
|
212
|
+
root: {
|
|
213
|
+
flexDirection: "row",
|
|
214
|
+
alignItems: "center",
|
|
215
|
+
alignSelf: "flex-start",
|
|
216
|
+
gap: theme.space.s2
|
|
217
|
+
},
|
|
218
|
+
// The count style: mono 12 / 500 tabular text-2.
|
|
219
|
+
elapsed: {
|
|
220
|
+
fontFamily: theme.font.mono,
|
|
221
|
+
fontSize: theme.fontSize[12],
|
|
222
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
223
|
+
fontWeight: theme.fontWeight.medium,
|
|
224
|
+
color: theme.color.text2,
|
|
225
|
+
fontVariant: ["tabular-nums"]
|
|
226
|
+
},
|
|
227
|
+
// Cancel is the shared text action — 12 / 600 text-2 (was accent 700), on the
|
|
228
|
+
// 30 status row (F43).
|
|
229
|
+
cancelBox: {
|
|
230
|
+
minHeight: theme.ctl.sm,
|
|
231
|
+
justifyContent: "center",
|
|
232
|
+
paddingHorizontal: theme.space[6],
|
|
233
|
+
borderRadius: theme.radius.sm
|
|
234
|
+
},
|
|
235
|
+
cancel: {
|
|
236
|
+
fontFamily: theme.font.sans,
|
|
237
|
+
fontSize: theme.fontSize[12],
|
|
238
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
239
|
+
fontWeight: theme.fontWeight.semibold,
|
|
240
|
+
color: theme.color.text2
|
|
241
|
+
},
|
|
242
|
+
label: {
|
|
243
|
+
fontFamily: theme.font.sans,
|
|
244
|
+
variants: {
|
|
245
|
+
tone: {
|
|
246
|
+
working: { color: theme.color.text },
|
|
247
|
+
accent: { color: theme.color.text },
|
|
248
|
+
neutral: { color: theme.color.text2 }
|
|
249
|
+
},
|
|
250
|
+
size: {
|
|
251
|
+
sm: {
|
|
252
|
+
fontSize: theme.type.caption1.fontSize,
|
|
253
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
254
|
+
letterSpacing: theme.type.caption1.letterSpacing
|
|
255
|
+
},
|
|
256
|
+
md: {
|
|
257
|
+
fontSize: theme.type.footnote.fontSize,
|
|
258
|
+
lineHeight: theme.type.footnote.lineHeight,
|
|
259
|
+
letterSpacing: theme.type.footnote.letterSpacing
|
|
260
|
+
},
|
|
261
|
+
lg: {
|
|
262
|
+
fontSize: theme.type.subheadline.fontSize,
|
|
263
|
+
lineHeight: theme.type.subheadline.lineHeight,
|
|
264
|
+
letterSpacing: theme.type.subheadline.letterSpacing
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}));
|
|
270
|
+
|
|
271
|
+
export { Thinking, useThinkingPulse };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { alignItemsStyle } from './chunk-TUACVJNG.js';
|
|
2
|
+
import { useInputPlatform } from './chunk-KXLDK6HB.js';
|
|
1
3
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
2
|
-
import { Icon } from './chunk-
|
|
4
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
3
5
|
import * as React2 from 'react';
|
|
4
6
|
import { Platform, Easing, Keyboard, Animated, View, Pressable, Text, useWindowDimensions, ScrollView } from 'react-native';
|
|
5
7
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
@@ -85,13 +87,21 @@ var DEFAULT_LABELS = {
|
|
|
85
87
|
previous: "Previous field",
|
|
86
88
|
next: "Next field"
|
|
87
89
|
};
|
|
88
|
-
var PREVIOUS_ICON = "
|
|
89
|
-
var NEXT_ICON = "
|
|
90
|
+
var PREVIOUS_ICON = "chevron-up";
|
|
91
|
+
var NEXT_ICON = "chevron-down";
|
|
90
92
|
var ACCESSORY_NAV_MIN_FIELDS = 3;
|
|
93
|
+
var SELF_ALIGN = {
|
|
94
|
+
start: "flex-start",
|
|
95
|
+
center: "center",
|
|
96
|
+
end: "flex-end",
|
|
97
|
+
stretch: "stretch"
|
|
98
|
+
};
|
|
91
99
|
function KeyboardSpacer({
|
|
92
100
|
extra = 0,
|
|
93
101
|
enabled = true,
|
|
94
|
-
testID
|
|
102
|
+
testID,
|
|
103
|
+
orientation = "vertical",
|
|
104
|
+
align
|
|
95
105
|
}) {
|
|
96
106
|
const { inset } = useAnimatedKeyboardInset(extra);
|
|
97
107
|
return /* @__PURE__ */ jsx(
|
|
@@ -99,7 +109,10 @@ function KeyboardSpacer({
|
|
|
99
109
|
{
|
|
100
110
|
accessibilityElementsHidden: true,
|
|
101
111
|
importantForAccessibility: "no-hide-descendants",
|
|
102
|
-
style:
|
|
112
|
+
style: [
|
|
113
|
+
orientation === "horizontal" ? { width: enabled ? inset : 0 } : { height: enabled ? inset : 0 },
|
|
114
|
+
align ? { alignSelf: SELF_ALIGN[align] } : null
|
|
115
|
+
],
|
|
103
116
|
testID
|
|
104
117
|
}
|
|
105
118
|
);
|
|
@@ -109,7 +122,9 @@ function KeyboardStickyView({
|
|
|
109
122
|
offset = 0,
|
|
110
123
|
enabled = true,
|
|
111
124
|
style,
|
|
112
|
-
testID
|
|
125
|
+
testID,
|
|
126
|
+
align,
|
|
127
|
+
orientation = "vertical"
|
|
113
128
|
}) {
|
|
114
129
|
const { styles } = useStyles(sheet);
|
|
115
130
|
const { inset } = useAnimatedKeyboardInset(offset);
|
|
@@ -117,7 +132,13 @@ function KeyboardStickyView({
|
|
|
117
132
|
return /* @__PURE__ */ jsx(
|
|
118
133
|
Animated.View,
|
|
119
134
|
{
|
|
120
|
-
style: [
|
|
135
|
+
style: [
|
|
136
|
+
styles.stickyBar,
|
|
137
|
+
orientation === "horizontal" ? { flexDirection: "row" } : null,
|
|
138
|
+
alignItemsStyle(align),
|
|
139
|
+
{ transform: [{ translateY: enabled ? lift : 0 }] },
|
|
140
|
+
style
|
|
141
|
+
],
|
|
121
142
|
testID,
|
|
122
143
|
children
|
|
123
144
|
}
|
|
@@ -138,23 +159,41 @@ function KeyboardAccessoryBar({
|
|
|
138
159
|
children,
|
|
139
160
|
sticky = false,
|
|
140
161
|
style,
|
|
141
|
-
testID
|
|
162
|
+
testID,
|
|
163
|
+
platform,
|
|
164
|
+
variant = "default",
|
|
165
|
+
size,
|
|
166
|
+
density,
|
|
167
|
+
orientation = "horizontal"
|
|
142
168
|
}) {
|
|
169
|
+
const os = useInputPlatform(platform);
|
|
143
170
|
const labels = useLabels("keyboard", DEFAULT_LABELS, labelsProp);
|
|
144
171
|
const doneLabel = doneLabelProp ?? labels.done;
|
|
145
172
|
const previousLabel = previousLabelProp ?? labels.previous;
|
|
146
173
|
const nextLabel = nextLabelProp ?? labels.next;
|
|
147
|
-
const
|
|
174
|
+
const theme = useLoamTheme("keyboard");
|
|
175
|
+
const { styles } = useStyles(sheet, { os });
|
|
176
|
+
const vertical = orientation === "vertical";
|
|
177
|
+
const compact = density === "compact";
|
|
148
178
|
const showNav = navigable && (fieldCount == null || fieldCount > ACCESSORY_NAV_MIN_FIELDS);
|
|
149
|
-
const bar = /* @__PURE__ */ jsxs(View, { accessibilityRole: "toolbar", style: [
|
|
150
|
-
|
|
179
|
+
const bar = /* @__PURE__ */ jsxs(View, { accessibilityRole: "toolbar", style: [
|
|
180
|
+
styles.accessoryBar,
|
|
181
|
+
variant === "plain" ? styles.accessoryBarPlain : null,
|
|
182
|
+
size ? { height: theme.ctl[size] } : null,
|
|
183
|
+
compact ? { paddingHorizontal: theme.space.s1 } : null,
|
|
184
|
+
vertical ? styles.accessoryBarVertical : null,
|
|
185
|
+
style
|
|
186
|
+
], testID, children: [
|
|
187
|
+
showNav ? /* @__PURE__ */ jsxs(View, { style: [styles.accessoryNav, compact ? { gap: theme.space.s1 } : null], children: [
|
|
151
188
|
/* @__PURE__ */ jsx(
|
|
152
189
|
AccessoryButton,
|
|
153
190
|
{
|
|
154
191
|
icon: PREVIOUS_ICON,
|
|
155
192
|
label: previousLabel,
|
|
156
193
|
disabled: !canGoPrevious,
|
|
157
|
-
onPress: onPrevious
|
|
194
|
+
onPress: onPrevious,
|
|
195
|
+
os,
|
|
196
|
+
size
|
|
158
197
|
}
|
|
159
198
|
),
|
|
160
199
|
/* @__PURE__ */ jsx(
|
|
@@ -163,7 +202,9 @@ function KeyboardAccessoryBar({
|
|
|
163
202
|
icon: NEXT_ICON,
|
|
164
203
|
label: nextLabel,
|
|
165
204
|
disabled: !canGoNext,
|
|
166
|
-
onPress: onNext
|
|
205
|
+
onPress: onNext,
|
|
206
|
+
os,
|
|
207
|
+
size
|
|
167
208
|
}
|
|
168
209
|
)
|
|
169
210
|
] }) : /* @__PURE__ */ jsx(View, {}),
|
|
@@ -185,10 +226,12 @@ function AccessoryButton({
|
|
|
185
226
|
icon,
|
|
186
227
|
label,
|
|
187
228
|
disabled,
|
|
188
|
-
onPress
|
|
229
|
+
onPress,
|
|
230
|
+
os,
|
|
231
|
+
size
|
|
189
232
|
}) {
|
|
190
233
|
const theme = useLoamTheme("keyboard");
|
|
191
|
-
const { styles } = useStyles(sheet, { disabled });
|
|
234
|
+
const { styles } = useStyles(sheet, { disabled, os });
|
|
192
235
|
return /* @__PURE__ */ jsx(
|
|
193
236
|
Pressable,
|
|
194
237
|
{
|
|
@@ -199,9 +242,17 @@ function AccessoryButton({
|
|
|
199
242
|
onPress: disabled ? void 0 : onPress,
|
|
200
243
|
style: ({ pressed }) => [
|
|
201
244
|
styles.accessoryButton,
|
|
245
|
+
size ? { width: theme.ctl[size], height: theme.ctl[size] } : null,
|
|
202
246
|
pressed && !disabled ? { backgroundColor: theme.state.pressed } : null
|
|
203
247
|
],
|
|
204
|
-
children: /* @__PURE__ */ jsx(
|
|
248
|
+
children: /* @__PURE__ */ jsx(
|
|
249
|
+
Icon,
|
|
250
|
+
{
|
|
251
|
+
name: icon,
|
|
252
|
+
size: theme.ctl.icon.lg,
|
|
253
|
+
color: disabled ? theme.color.text3 : theme.color.text2
|
|
254
|
+
}
|
|
255
|
+
)
|
|
205
256
|
}
|
|
206
257
|
);
|
|
207
258
|
}
|
|
@@ -213,6 +264,8 @@ function KeyboardAvoidingScrollView({
|
|
|
213
264
|
contentContainerStyle,
|
|
214
265
|
onScroll,
|
|
215
266
|
testID,
|
|
267
|
+
align,
|
|
268
|
+
orientation = "vertical",
|
|
216
269
|
...rest
|
|
217
270
|
}) {
|
|
218
271
|
const theme = useLoamTheme("keyboard");
|
|
@@ -223,8 +276,9 @@ function KeyboardAvoidingScrollView({
|
|
|
223
276
|
const offset = React2.useRef(0);
|
|
224
277
|
const restoreTo = React2.useRef(null);
|
|
225
278
|
const pendingNode = React2.useRef(null);
|
|
226
|
-
const
|
|
227
|
-
latest
|
|
279
|
+
const horizontal = orientation === "horizontal";
|
|
280
|
+
const latest = React2.useRef({ inset, windowHeight, clearance, horizontal });
|
|
281
|
+
latest.current = { inset, windowHeight, clearance, horizontal };
|
|
228
282
|
const handleScroll = React2.useCallback(
|
|
229
283
|
(event) => {
|
|
230
284
|
offset.current = event.nativeEvent.contentOffset.y;
|
|
@@ -234,6 +288,7 @@ function KeyboardAvoidingScrollView({
|
|
|
234
288
|
);
|
|
235
289
|
const bringIntoView = React2.useCallback((node) => {
|
|
236
290
|
if (!node || typeof node.measureInWindow !== "function") return;
|
|
291
|
+
if (latest.current.horizontal) return;
|
|
237
292
|
const { inset: kbd, windowHeight: winH, clearance: pad } = latest.current;
|
|
238
293
|
if (!kbd.visible) {
|
|
239
294
|
pendingNode.current = node;
|
|
@@ -268,11 +323,16 @@ function KeyboardAvoidingScrollView({
|
|
|
268
323
|
ScrollView,
|
|
269
324
|
{
|
|
270
325
|
ref: scrollRef,
|
|
326
|
+
horizontal,
|
|
271
327
|
keyboardDismissMode,
|
|
272
328
|
keyboardShouldPersistTaps: "handled",
|
|
273
329
|
scrollEventThrottle: 16,
|
|
274
330
|
onScroll: handleScroll,
|
|
275
|
-
contentContainerStyle: [
|
|
331
|
+
contentContainerStyle: [
|
|
332
|
+
{ paddingBottom: inset.height + clearance },
|
|
333
|
+
alignItemsStyle(align),
|
|
334
|
+
contentContainerStyle
|
|
335
|
+
],
|
|
276
336
|
testID,
|
|
277
337
|
...rest,
|
|
278
338
|
children
|
|
@@ -288,10 +348,14 @@ function useScrollIntoView() {
|
|
|
288
348
|
return { ref, onFocus };
|
|
289
349
|
}
|
|
290
350
|
var sheet = createStyleSheet((theme) => ({
|
|
291
|
-
//
|
|
292
|
-
// token for exactly this surface and also clears `tapMin`.
|
|
351
|
+
// F64: the bar is 44 on iOS (the keyboard accessory) and 48 on Android.
|
|
293
352
|
accessoryBar: {
|
|
294
|
-
|
|
353
|
+
variants: {
|
|
354
|
+
os: {
|
|
355
|
+
ios: { height: theme.space[44] },
|
|
356
|
+
android: { height: theme.space[48] }
|
|
357
|
+
}
|
|
358
|
+
},
|
|
295
359
|
flexDirection: "row",
|
|
296
360
|
alignItems: "center",
|
|
297
361
|
justifyContent: "space-between",
|
|
@@ -300,19 +364,33 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
300
364
|
borderTopWidth: theme.borderWidth.base,
|
|
301
365
|
borderTopColor: theme.color.border
|
|
302
366
|
},
|
|
367
|
+
// `orientation="vertical"`: a column that grows to its content.
|
|
368
|
+
accessoryBarVertical: {
|
|
369
|
+
flexDirection: "column",
|
|
370
|
+
alignItems: "stretch",
|
|
371
|
+
height: "auto",
|
|
372
|
+
paddingVertical: theme.space.s2,
|
|
373
|
+
gap: theme.space.s2
|
|
374
|
+
},
|
|
375
|
+
accessoryBarPlain: {
|
|
376
|
+
backgroundColor: theme.color.bg,
|
|
377
|
+
borderTopWidth: 0
|
|
378
|
+
},
|
|
303
379
|
accessoryNav: {
|
|
304
380
|
flexDirection: "row",
|
|
305
381
|
alignItems: "center",
|
|
306
382
|
gap: theme.space.s2
|
|
307
383
|
},
|
|
308
384
|
accessoryMiddle: { flex: 1, alignItems: "center" },
|
|
385
|
+
// Ghost icon button on the lg tier.
|
|
309
386
|
accessoryButton: {
|
|
310
|
-
|
|
311
|
-
|
|
387
|
+
width: theme.ctl.lg,
|
|
388
|
+
height: theme.ctl.lg,
|
|
312
389
|
alignItems: "center",
|
|
313
390
|
justifyContent: "center",
|
|
314
|
-
borderRadius: theme.
|
|
391
|
+
borderRadius: theme.ctl.r.lg,
|
|
315
392
|
variants: {
|
|
393
|
+
os: { ios: {}, android: {} },
|
|
316
394
|
disabled: {
|
|
317
395
|
true: { opacity: theme.state.disabledOpacity },
|
|
318
396
|
false: {}
|
|
@@ -326,13 +404,16 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
326
404
|
justifyContent: "center",
|
|
327
405
|
paddingHorizontal: theme.space.s1
|
|
328
406
|
},
|
|
407
|
+
// Done is a link: 17 / 600 on iOS, 14 / 500 on Android.
|
|
329
408
|
accessoryDoneLabel: {
|
|
330
409
|
fontFamily: theme.font.sans,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
410
|
+
color: theme.color.accentStrong,
|
|
411
|
+
variants: {
|
|
412
|
+
os: {
|
|
413
|
+
ios: { fontSize: theme.fontSize[17], fontWeight: theme.fontWeight.semibold },
|
|
414
|
+
android: { fontSize: theme.fontSize[14], fontWeight: theme.fontWeight.medium }
|
|
415
|
+
}
|
|
416
|
+
}
|
|
336
417
|
},
|
|
337
418
|
stickyBar: {
|
|
338
419
|
flexDirection: "column",
|