@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,12 +1,48 @@
|
|
|
1
|
+
import { Sheet } from './chunk-B7JZ3N5G.js';
|
|
1
2
|
import { expandedProps } from './chunk-W23G6JLF.js';
|
|
2
3
|
import { haptics } from './chunk-NY2U3PBI.js';
|
|
3
4
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
4
|
-
import { Icon } from './chunk-
|
|
5
|
-
import
|
|
6
|
-
import { useWindowDimensions, Animated, Easing, Modal, View, StyleSheet, Pressable, Text, Platform } from 'react-native';
|
|
5
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
6
|
+
import { useWindowDimensions, Platform, View, Pressable, Text, Animated, Easing, Modal, StyleSheet } from 'react-native';
|
|
7
7
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
8
|
+
import * as React from 'react';
|
|
8
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
10
|
|
|
11
|
+
var ANDROID_ANCHORED_MENU_MAX = 5;
|
|
12
|
+
function resolveOverlayPresentation({
|
|
13
|
+
kind,
|
|
14
|
+
platform,
|
|
15
|
+
width,
|
|
16
|
+
regularWidth,
|
|
17
|
+
itemCount = 0,
|
|
18
|
+
presentation
|
|
19
|
+
}) {
|
|
20
|
+
if (presentation) return presentation;
|
|
21
|
+
if (platform === "ios") {
|
|
22
|
+
if (width >= regularWidth) return "anchored";
|
|
23
|
+
return kind === "combobox" ? "full" : "sheet";
|
|
24
|
+
}
|
|
25
|
+
if (kind === "menu" && itemCount <= ANDROID_ANCHORED_MENU_MAX) return "anchored";
|
|
26
|
+
return kind === "combobox" ? "full" : "sheet";
|
|
27
|
+
}
|
|
28
|
+
function useOverlayPresentation({
|
|
29
|
+
kind,
|
|
30
|
+
itemCount,
|
|
31
|
+
presentation,
|
|
32
|
+
platform
|
|
33
|
+
}) {
|
|
34
|
+
const theme = useLoamTheme("overlay-presentation");
|
|
35
|
+
const { width } = useWindowDimensions();
|
|
36
|
+
const os = platform ?? (Platform.OS === "ios" ? "ios" : Platform.OS === "android" ? "android" : theme.platform === "iOS" ? "ios" : "android");
|
|
37
|
+
return resolveOverlayPresentation({
|
|
38
|
+
kind,
|
|
39
|
+
platform: os,
|
|
40
|
+
width,
|
|
41
|
+
itemCount,
|
|
42
|
+
presentation,
|
|
43
|
+
regularWidth: theme.breakpoint.tablet
|
|
44
|
+
});
|
|
45
|
+
}
|
|
10
46
|
var LONG_PRESS_DELAY_MS = 360;
|
|
11
47
|
var PRE_PRESS_SCALE = 0.95;
|
|
12
48
|
var LIFT_SCALE = 1.06;
|
|
@@ -21,6 +57,7 @@ var MENU_OFFSET_Y_ANDROID = -6;
|
|
|
21
57
|
var MENU_OFFSET_X_IOS = 0;
|
|
22
58
|
var MENU_OFFSET_X_ANDROID = 10;
|
|
23
59
|
var MENU_FROM_SCALE_IOS = 0.7;
|
|
60
|
+
var PREVIEW_MAX_WIDTH = 320;
|
|
24
61
|
var MENU_FROM_SCALE_ANDROID = 0.85;
|
|
25
62
|
var IOS_MENU_TRANSLUCENCY = 0.82;
|
|
26
63
|
var IOS_FROST_OPACITY = 0.22;
|
|
@@ -61,18 +98,101 @@ function useResolvedPlatform(explicit) {
|
|
|
61
98
|
if (Platform.OS === "android") return "android";
|
|
62
99
|
return theme.platform === "iOS" ? "ios" : "android";
|
|
63
100
|
}
|
|
64
|
-
function ContextMenuOverlay({
|
|
101
|
+
function ContextMenuOverlay(props) {
|
|
102
|
+
const os = useResolvedPlatform(props.platform);
|
|
103
|
+
const presentation = useOverlayPresentation({
|
|
104
|
+
kind: "menu",
|
|
105
|
+
itemCount: props.items.length,
|
|
106
|
+
platform: os
|
|
107
|
+
});
|
|
108
|
+
if (os === "android" && presentation !== "anchored" && !props.preview) {
|
|
109
|
+
return /* @__PURE__ */ jsx(ContextMenuSheet, { ...props });
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ jsx(AnchoredContextMenu, { ...props });
|
|
112
|
+
}
|
|
113
|
+
function sizeType(theme, size) {
|
|
114
|
+
if (size === "sm") return theme.type.footnote;
|
|
115
|
+
if (size === "lg") return theme.type.body;
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
function ContextMenuSheet({
|
|
119
|
+
open,
|
|
120
|
+
onClose,
|
|
121
|
+
items,
|
|
122
|
+
accessibilityLabel,
|
|
123
|
+
labels: labelsProp,
|
|
124
|
+
density,
|
|
125
|
+
size
|
|
126
|
+
}) {
|
|
127
|
+
const labels = useLabels("contextMenu", DEFAULT_LABELS, labelsProp);
|
|
128
|
+
const { styles, theme } = useStyles(sheet, { platform: "android" });
|
|
129
|
+
const ordered = orderContextMenuItems(items);
|
|
130
|
+
return /* @__PURE__ */ jsx(Sheet, { open, onClose, children: /* @__PURE__ */ jsxs(View, { accessibilityRole: "menu", accessibilityLabel: accessibilityLabel ?? labels.actions, children: [
|
|
131
|
+
ordered.map((item) => {
|
|
132
|
+
const tint = item.destructive ? theme.color.dangerOnSoft : theme.color.text;
|
|
133
|
+
return /* @__PURE__ */ jsxs(
|
|
134
|
+
Pressable,
|
|
135
|
+
{
|
|
136
|
+
accessibilityRole: "menuitem",
|
|
137
|
+
accessibilityLabel: item.label,
|
|
138
|
+
accessibilityState: { disabled: item.disabled === true, checked: item.checked },
|
|
139
|
+
disabled: item.disabled === true,
|
|
140
|
+
onPress: () => {
|
|
141
|
+
haptics.selection();
|
|
142
|
+
onClose();
|
|
143
|
+
item.onSelect?.();
|
|
144
|
+
},
|
|
145
|
+
style: ({ pressed }) => [
|
|
146
|
+
styles.sheetRow,
|
|
147
|
+
density === "compact" ? { paddingVertical: theme.space.s2 } : null,
|
|
148
|
+
pressed ? item.destructive ? styles.rowPressedDanger : styles.sheetRowPressed : null,
|
|
149
|
+
item.disabled ? styles.rowDisabled : null
|
|
150
|
+
],
|
|
151
|
+
children: [
|
|
152
|
+
item.icon ? /* @__PURE__ */ jsx(
|
|
153
|
+
Icon,
|
|
154
|
+
{
|
|
155
|
+
name: item.icon,
|
|
156
|
+
size: theme.icon.md,
|
|
157
|
+
color: item.destructive ? theme.color.dangerOnSoft : theme.color.text2
|
|
158
|
+
}
|
|
159
|
+
) : null,
|
|
160
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.sheetLabel, sizeType(theme, size), { color: tint }], children: item.label }),
|
|
161
|
+
item.checked ? /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.md, color: tint }) : null
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
item.key
|
|
165
|
+
);
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx(
|
|
168
|
+
Pressable,
|
|
169
|
+
{
|
|
170
|
+
accessibilityRole: "menuitem",
|
|
171
|
+
accessibilityLabel: labels.cancel,
|
|
172
|
+
onPress: onClose,
|
|
173
|
+
style: ({ pressed }) => [styles.sheetRow, pressed ? styles.sheetRowPressed : null],
|
|
174
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles.sheetLabel, styles.sheetCancel], children: labels.cancel })
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
] }) });
|
|
178
|
+
}
|
|
179
|
+
function AnchoredContextMenu({
|
|
65
180
|
open,
|
|
66
181
|
onClose,
|
|
67
182
|
items,
|
|
68
183
|
anchor,
|
|
69
184
|
platform,
|
|
70
185
|
lift,
|
|
186
|
+
preview,
|
|
187
|
+
onPreviewPress,
|
|
188
|
+
previewLabel,
|
|
71
189
|
radius,
|
|
72
190
|
accessibilityLabel,
|
|
73
191
|
closeLabel,
|
|
74
192
|
labels: labelsProp,
|
|
75
|
-
motion = "full"
|
|
193
|
+
motion = "full",
|
|
194
|
+
density,
|
|
195
|
+
size
|
|
76
196
|
}) {
|
|
77
197
|
const labels = useLabels("contextMenu", DEFAULT_LABELS, labelsProp);
|
|
78
198
|
const theme = useLoamTheme("context-menu");
|
|
@@ -215,6 +335,13 @@ function ContextMenuOverlay({
|
|
|
215
335
|
const place = placeContextMenu(rect, window, os);
|
|
216
336
|
const ordered = orderContextMenuItems(items);
|
|
217
337
|
const liftRadius = radius ?? theme.radius.lg;
|
|
338
|
+
const [columnHeight, setColumnHeight] = React.useState(0);
|
|
339
|
+
const withPreview = ios && preview != null;
|
|
340
|
+
const columnWidth = Math.min(PREVIEW_MAX_WIDTH, window.width - theme.space.s4 * 2);
|
|
341
|
+
const columnTop = Math.max(
|
|
342
|
+
MENU_MIN_TOP,
|
|
343
|
+
Math.min(rect.y + rect.height + theme.space.s2, window.height - columnHeight - theme.space.s4)
|
|
344
|
+
);
|
|
218
345
|
return /* @__PURE__ */ jsx(
|
|
219
346
|
Modal,
|
|
220
347
|
{
|
|
@@ -237,7 +364,7 @@ function ContextMenuOverlay({
|
|
|
237
364
|
}
|
|
238
365
|
)
|
|
239
366
|
] }),
|
|
240
|
-
ios && lift != null ? /* @__PURE__ */ jsx(
|
|
367
|
+
ios && lift != null && !withPreview ? /* @__PURE__ */ jsx(
|
|
241
368
|
Animated.View,
|
|
242
369
|
{
|
|
243
370
|
pointerEvents: "none",
|
|
@@ -260,7 +387,61 @@ function ContextMenuOverlay({
|
|
|
260
387
|
children: lift
|
|
261
388
|
}
|
|
262
389
|
) : null,
|
|
263
|
-
/* @__PURE__ */ jsxs(
|
|
390
|
+
withPreview ? /* @__PURE__ */ jsxs(
|
|
391
|
+
Animated.View,
|
|
392
|
+
{
|
|
393
|
+
onLayout: (e) => setColumnHeight(e.nativeEvent.layout.height),
|
|
394
|
+
style: [
|
|
395
|
+
styles.previewColumn,
|
|
396
|
+
{
|
|
397
|
+
top: columnTop,
|
|
398
|
+
left: (window.width - columnWidth) / 2,
|
|
399
|
+
width: columnWidth,
|
|
400
|
+
opacity: menuOpacity,
|
|
401
|
+
transform: [{ scale: menuScale }]
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ jsx(
|
|
406
|
+
Pressable,
|
|
407
|
+
{
|
|
408
|
+
accessibilityRole: "button",
|
|
409
|
+
accessibilityLabel: previewLabel,
|
|
410
|
+
onPress: () => {
|
|
411
|
+
onClose();
|
|
412
|
+
onPreviewPress?.();
|
|
413
|
+
},
|
|
414
|
+
style: styles.platter,
|
|
415
|
+
children: preview
|
|
416
|
+
}
|
|
417
|
+
),
|
|
418
|
+
ordered.length > 0 ? /* @__PURE__ */ jsxs(
|
|
419
|
+
View,
|
|
420
|
+
{
|
|
421
|
+
accessibilityViewIsModal: true,
|
|
422
|
+
accessibilityRole: "menu",
|
|
423
|
+
accessibilityLabel: accessibilityLabel ?? labels.actions,
|
|
424
|
+
style: [styles.menu, styles.menuInColumn, { width: place.width }],
|
|
425
|
+
children: [
|
|
426
|
+
/* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles.translucency] }),
|
|
427
|
+
ordered.map((item, i) => /* @__PURE__ */ jsx(
|
|
428
|
+
MenuItem,
|
|
429
|
+
{
|
|
430
|
+
item,
|
|
431
|
+
platform: os,
|
|
432
|
+
last: i === ordered.length - 1,
|
|
433
|
+
onClose,
|
|
434
|
+
density,
|
|
435
|
+
size
|
|
436
|
+
},
|
|
437
|
+
item.key
|
|
438
|
+
))
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
) : null
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
) : /* @__PURE__ */ jsxs(
|
|
264
445
|
Animated.View,
|
|
265
446
|
{
|
|
266
447
|
accessibilityViewIsModal: true,
|
|
@@ -284,7 +465,9 @@ function ContextMenuOverlay({
|
|
|
284
465
|
item,
|
|
285
466
|
platform: os,
|
|
286
467
|
last: i === ordered.length - 1,
|
|
287
|
-
onClose
|
|
468
|
+
onClose,
|
|
469
|
+
density,
|
|
470
|
+
size
|
|
288
471
|
},
|
|
289
472
|
item.key
|
|
290
473
|
))
|
|
@@ -299,7 +482,10 @@ function MenuItem({
|
|
|
299
482
|
item,
|
|
300
483
|
platform,
|
|
301
484
|
last,
|
|
302
|
-
onClose
|
|
485
|
+
onClose,
|
|
486
|
+
density,
|
|
487
|
+
size: labelSize,
|
|
488
|
+
highlighted = false
|
|
303
489
|
}) {
|
|
304
490
|
const theme = useLoamTheme("context-menu");
|
|
305
491
|
const ios = platform === "ios";
|
|
@@ -354,31 +540,45 @@ function MenuItem({
|
|
|
354
540
|
if (ios) onClose();
|
|
355
541
|
else timer.current = setTimeout(onClose, theme.duration.fast);
|
|
356
542
|
};
|
|
357
|
-
const tint = item.destructive === true ? theme.color.
|
|
543
|
+
const tint = item.destructive === true ? theme.color.dangerOnSoft : theme.color.text;
|
|
358
544
|
const glyph = item.icon == null ? null : /* @__PURE__ */ jsx(
|
|
359
545
|
Icon,
|
|
360
546
|
{
|
|
361
547
|
name: item.icon,
|
|
362
548
|
size: theme.icon.sm,
|
|
363
|
-
color: item.destructive === true ? theme.color.
|
|
549
|
+
color: item.destructive === true ? theme.color.dangerOnSoft : theme.color.text3
|
|
364
550
|
}
|
|
365
551
|
);
|
|
552
|
+
const check = item.checked ? /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.sm, color: tint }) : null;
|
|
366
553
|
return /* @__PURE__ */ jsxs(
|
|
367
554
|
Pressable,
|
|
368
555
|
{
|
|
369
556
|
accessibilityRole: "menuitem",
|
|
370
557
|
accessibilityLabel: item.label,
|
|
558
|
+
accessibilityState: { disabled: item.disabled === true, checked: item.checked },
|
|
559
|
+
disabled: item.disabled === true,
|
|
371
560
|
onLayout,
|
|
372
561
|
onPress,
|
|
373
562
|
style: ({ pressed }) => [
|
|
374
563
|
styles.item,
|
|
375
|
-
|
|
376
|
-
|
|
564
|
+
density === "compact" ? { paddingVertical: theme.space.s2 } : null,
|
|
565
|
+
// iOS has no ripple, so it gets the state layer instead; a destructive
|
|
566
|
+
// row presses to the danger-soft fill.
|
|
567
|
+
pressed && ios || highlighted ? item.destructive ? styles.rowPressedDanger : styles.itemPressed : null,
|
|
568
|
+
item.disabled === true ? styles.rowDisabled : null
|
|
377
569
|
],
|
|
378
570
|
children: [
|
|
379
571
|
ios ? null : /* @__PURE__ */ jsx(View, { style: styles.androidGlyph, children: glyph }),
|
|
380
|
-
/* @__PURE__ */ jsx(
|
|
572
|
+
/* @__PURE__ */ jsx(
|
|
573
|
+
Text,
|
|
574
|
+
{
|
|
575
|
+
style: [styles.itemLabel, sizeType(theme, labelSize), { color: tint }],
|
|
576
|
+
numberOfLines: 1,
|
|
577
|
+
children: item.label
|
|
578
|
+
}
|
|
579
|
+
),
|
|
381
580
|
ios ? glyph : null,
|
|
581
|
+
check,
|
|
382
582
|
ripple ? /* @__PURE__ */ jsx(
|
|
383
583
|
Animated.View,
|
|
384
584
|
{
|
|
@@ -401,10 +601,56 @@ function MenuItem({
|
|
|
401
601
|
}
|
|
402
602
|
);
|
|
403
603
|
}
|
|
604
|
+
function ContextMenuPreview({
|
|
605
|
+
items,
|
|
606
|
+
platform,
|
|
607
|
+
highlightedKey,
|
|
608
|
+
title,
|
|
609
|
+
density,
|
|
610
|
+
size,
|
|
611
|
+
labels: labelsProp
|
|
612
|
+
}) {
|
|
613
|
+
const labels = useLabels("contextMenu", DEFAULT_LABELS, labelsProp);
|
|
614
|
+
const os = useResolvedPlatform(platform);
|
|
615
|
+
const { styles } = useStyles(sheet, { platform: os });
|
|
616
|
+
const ordered = orderContextMenuItems(items);
|
|
617
|
+
const { width: menuWidth } = placeContextMenu(
|
|
618
|
+
{ x: 0, y: 0, height: 0 },
|
|
619
|
+
{ width: Infinity, height: Infinity },
|
|
620
|
+
os
|
|
621
|
+
);
|
|
622
|
+
return /* @__PURE__ */ jsxs(
|
|
623
|
+
View,
|
|
624
|
+
{
|
|
625
|
+
accessibilityRole: "menu",
|
|
626
|
+
accessibilityLabel: title ?? labels.actions,
|
|
627
|
+
style: [styles.menu, styles.menuInline, { width: menuWidth }],
|
|
628
|
+
children: [
|
|
629
|
+
os === "ios" ? /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles.translucency] }) : null,
|
|
630
|
+
title ? /* @__PURE__ */ jsx(Text, { style: styles.sectionLabel, children: title }) : null,
|
|
631
|
+
ordered.map((item, i) => /* @__PURE__ */ jsx(
|
|
632
|
+
MenuItem,
|
|
633
|
+
{
|
|
634
|
+
item,
|
|
635
|
+
platform: os,
|
|
636
|
+
last: i === ordered.length - 1,
|
|
637
|
+
onClose: () => {
|
|
638
|
+
},
|
|
639
|
+
density,
|
|
640
|
+
size,
|
|
641
|
+
highlighted: item.key === highlightedKey
|
|
642
|
+
},
|
|
643
|
+
item.key
|
|
644
|
+
))
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
);
|
|
648
|
+
}
|
|
404
649
|
var DEFAULT_LABELS = {
|
|
405
650
|
actions: "Actions",
|
|
406
651
|
closeMenu: "Close menu",
|
|
407
|
-
showActions: "Show actions"
|
|
652
|
+
showActions: "Show actions",
|
|
653
|
+
cancel: "Cancel"
|
|
408
654
|
};
|
|
409
655
|
function ContextMenu({
|
|
410
656
|
items,
|
|
@@ -414,10 +660,14 @@ function ContextMenu({
|
|
|
414
660
|
platform,
|
|
415
661
|
accessibilityLabel,
|
|
416
662
|
radius,
|
|
663
|
+
androidRipple,
|
|
417
664
|
style,
|
|
418
665
|
onOpen,
|
|
419
666
|
onClose,
|
|
420
667
|
motion = "full",
|
|
668
|
+
density,
|
|
669
|
+
size,
|
|
670
|
+
selected = false,
|
|
421
671
|
labels: labelsProp
|
|
422
672
|
}) {
|
|
423
673
|
const labels = useLabels("contextMenu", DEFAULT_LABELS, labelsProp);
|
|
@@ -472,10 +722,14 @@ function ContextMenu({
|
|
|
472
722
|
children: /* @__PURE__ */ jsx(
|
|
473
723
|
Pressable,
|
|
474
724
|
{
|
|
475
|
-
style:
|
|
725
|
+
style: [
|
|
726
|
+
{ borderRadius: triggerRadius },
|
|
727
|
+
selected ? { backgroundColor: theme.state.selected } : null
|
|
728
|
+
],
|
|
729
|
+
android_ripple: androidRipple,
|
|
476
730
|
accessibilityRole: "button",
|
|
477
731
|
accessibilityLabel,
|
|
478
|
-
accessibilityState: { disabled, expanded: open },
|
|
732
|
+
accessibilityState: { disabled, expanded: open, selected: selected || void 0 },
|
|
479
733
|
...expandedProps(open),
|
|
480
734
|
accessibilityActions: [{ name: "longpress", label: labels.showActions }],
|
|
481
735
|
onAccessibilityAction: (e) => {
|
|
@@ -523,12 +777,33 @@ function ContextMenu({
|
|
|
523
777
|
radius: triggerRadius,
|
|
524
778
|
accessibilityLabel,
|
|
525
779
|
labels: labelsProp,
|
|
526
|
-
motion
|
|
780
|
+
motion,
|
|
781
|
+
density,
|
|
782
|
+
size
|
|
527
783
|
}
|
|
528
784
|
)
|
|
529
785
|
] });
|
|
530
786
|
}
|
|
531
787
|
var sheet = createStyleSheet((theme) => ({
|
|
788
|
+
sheetRow: {
|
|
789
|
+
flexDirection: "row",
|
|
790
|
+
alignItems: "center",
|
|
791
|
+
gap: theme.space.s3,
|
|
792
|
+
minHeight: theme.space[48],
|
|
793
|
+
paddingHorizontal: theme.space.s3,
|
|
794
|
+
borderRadius: theme.radius.md
|
|
795
|
+
},
|
|
796
|
+
sheetRowPressed: { backgroundColor: theme.state.pressed },
|
|
797
|
+
sheetLabel: {
|
|
798
|
+
flex: 1,
|
|
799
|
+
fontFamily: theme.font.sans,
|
|
800
|
+
fontSize: theme.fontSize[16]
|
|
801
|
+
},
|
|
802
|
+
sheetCancel: {
|
|
803
|
+
textAlign: "center",
|
|
804
|
+
fontWeight: theme.fontWeight.semibold,
|
|
805
|
+
color: theme.color.text
|
|
806
|
+
},
|
|
532
807
|
/** The dim behind the menu. iOS whispers (`scrimLight`), Android commits (`scrim`). */
|
|
533
808
|
dim: {
|
|
534
809
|
variants: {
|
|
@@ -548,6 +823,25 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
548
823
|
position: "absolute",
|
|
549
824
|
...theme.shadow.lg
|
|
550
825
|
},
|
|
826
|
+
/** The preview platter and the menu under it (iOS context preview). */
|
|
827
|
+
previewColumn: {
|
|
828
|
+
position: "absolute",
|
|
829
|
+
gap: theme.space.s2,
|
|
830
|
+
alignItems: "flex-start",
|
|
831
|
+
transformOrigin: "top center"
|
|
832
|
+
},
|
|
833
|
+
platter: {
|
|
834
|
+
alignSelf: "stretch",
|
|
835
|
+
backgroundColor: theme.color.surface,
|
|
836
|
+
borderRadius: theme.radius.md,
|
|
837
|
+
borderWidth: theme.borderWidth.base,
|
|
838
|
+
borderColor: theme.color.border,
|
|
839
|
+
padding: theme.space.s4,
|
|
840
|
+
gap: theme.space.s3,
|
|
841
|
+
...theme.shadow.lg
|
|
842
|
+
},
|
|
843
|
+
/** The menu laid out in the column rather than placed absolutely. */
|
|
844
|
+
menuInColumn: { position: "relative", transformOrigin: "top left" },
|
|
551
845
|
/** The in-place trigger while its copy is lifted. */
|
|
552
846
|
liftedAway: { opacity: 0 },
|
|
553
847
|
menu: {
|
|
@@ -556,11 +850,12 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
556
850
|
// The reference sets `transform-origin: top left` so the menu grows out of
|
|
557
851
|
// the anchor's corner. RN 0.74+ supports `transformOrigin`.
|
|
558
852
|
transformOrigin: "top left",
|
|
559
|
-
|
|
853
|
+
// An anchored overlay sits at sh-md (was sh-lg); the lifted copy keeps lg.
|
|
854
|
+
...theme.shadow.md,
|
|
560
855
|
variants: {
|
|
561
856
|
platform: {
|
|
562
|
-
//
|
|
563
|
-
ios: { borderRadius: theme.radius.
|
|
857
|
+
// r 12 on both platforms → `radius.md`.
|
|
858
|
+
ios: { borderRadius: theme.radius.md },
|
|
564
859
|
android: {
|
|
565
860
|
borderRadius: theme.radius.md,
|
|
566
861
|
backgroundColor: theme.color.surface,
|
|
@@ -604,6 +899,22 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
604
899
|
}
|
|
605
900
|
},
|
|
606
901
|
itemPressed: { backgroundColor: theme.state.pressed },
|
|
902
|
+
// ContextMenuPreview: the anchored menu in flow, at the reference width.
|
|
903
|
+
menuInline: { position: "relative" },
|
|
904
|
+
sectionLabel: {
|
|
905
|
+
fontFamily: theme.font.sans,
|
|
906
|
+
fontSize: theme.type.caption1.fontSize,
|
|
907
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
908
|
+
fontWeight: theme.fontWeight.semibold,
|
|
909
|
+
textTransform: "uppercase",
|
|
910
|
+
color: theme.color.text3,
|
|
911
|
+
paddingHorizontal: theme.space.s4,
|
|
912
|
+
paddingTop: theme.space.s3,
|
|
913
|
+
paddingBottom: theme.space.s1
|
|
914
|
+
},
|
|
915
|
+
// loam-contrast-ignore — transient pressed-row wash inside a bordered menu; the row has no surface of its own.
|
|
916
|
+
rowPressedDanger: { backgroundColor: theme.color.dangerSoft },
|
|
917
|
+
rowDisabled: { opacity: theme.state.disabledOpacity },
|
|
607
918
|
itemLabel: {
|
|
608
919
|
flexShrink: 1,
|
|
609
920
|
fontFamily: theme.font.sans,
|
|
@@ -631,4 +942,4 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
631
942
|
}
|
|
632
943
|
}));
|
|
633
944
|
|
|
634
|
-
export { ContextMenu, ContextMenuOverlay, LONG_PRESS_DELAY_MS, orderContextMenuItems, placeContextMenu };
|
|
945
|
+
export { ANDROID_ANCHORED_MENU_MAX, ContextMenu, ContextMenuOverlay, ContextMenuPreview, LONG_PRESS_DELAY_MS, orderContextMenuItems, placeContextMenu, useOverlayPresentation };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { alignItemsStyle } from './chunk-TUACVJNG.js';
|
|
2
|
+
import { Spinner } from './chunk-G7H3NX3G.js';
|
|
2
3
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { FlatList, View } from 'react-native';
|
|
@@ -13,8 +14,15 @@ function loadMoreIfNeeded(opts) {
|
|
|
13
14
|
}
|
|
14
15
|
var FOOTER_SPINNER_SIZE = "lg";
|
|
15
16
|
function Footer({ label }) {
|
|
16
|
-
const { styles } = useStyles(sheet);
|
|
17
|
-
return /* @__PURE__ */ jsx(View, { style: styles.footer, children: /* @__PURE__ */ jsx(
|
|
17
|
+
const { styles, theme } = useStyles(sheet);
|
|
18
|
+
return /* @__PURE__ */ jsx(View, { style: styles.footer, children: /* @__PURE__ */ jsx(
|
|
19
|
+
Spinner,
|
|
20
|
+
{
|
|
21
|
+
size: FOOTER_SPINNER_SIZE,
|
|
22
|
+
color: theme.color.text2,
|
|
23
|
+
accessibilityLabel: label
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
18
26
|
}
|
|
19
27
|
function InfiniteList({
|
|
20
28
|
data,
|
|
@@ -28,7 +36,9 @@ function InfiniteList({
|
|
|
28
36
|
// not animate (recycled rows would flicker). Destructured so it is never
|
|
29
37
|
// forwarded onto the underlying FlatList.
|
|
30
38
|
motion: _motion = "full",
|
|
31
|
-
labels: labelsProp
|
|
39
|
+
labels: labelsProp,
|
|
40
|
+
orientation = "vertical",
|
|
41
|
+
align
|
|
32
42
|
}) {
|
|
33
43
|
const { styles } = useStyles(sheet);
|
|
34
44
|
const labels = useLabels("infiniteList", DEFAULT_LABELS, labelsProp);
|
|
@@ -48,7 +58,8 @@ function InfiniteList({
|
|
|
48
58
|
keyExtractor,
|
|
49
59
|
onEndReached: handleEndReached,
|
|
50
60
|
onEndReachedThreshold,
|
|
51
|
-
|
|
61
|
+
horizontal: orientation === "horizontal",
|
|
62
|
+
contentContainerStyle: [styles.content, alignItemsStyle(align)],
|
|
52
63
|
ListFooterComponent: loading ? /* @__PURE__ */ jsx(Footer, { label: labels.loadingMore }) : null
|
|
53
64
|
}
|
|
54
65
|
);
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { View, Text } from 'react-native';
|
|
4
|
+
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function PageHeader({
|
|
8
|
+
breadcrumb,
|
|
9
|
+
title,
|
|
10
|
+
titleAdornment,
|
|
11
|
+
meta,
|
|
12
|
+
actions,
|
|
13
|
+
back,
|
|
14
|
+
tabs,
|
|
15
|
+
// Accepted for API consistency; intentionally unused (see PageHeaderMotion).
|
|
16
|
+
motion: _motion = "none",
|
|
17
|
+
condensed = false,
|
|
18
|
+
density = "comfortable",
|
|
19
|
+
variant = "plain",
|
|
20
|
+
size,
|
|
21
|
+
titleFace = "system",
|
|
22
|
+
platform
|
|
23
|
+
}) {
|
|
24
|
+
const { styles } = useStyles(sheet);
|
|
25
|
+
const theme = useLoamTheme("pageHeader");
|
|
26
|
+
const android = isAndroidIdiom(theme, platform);
|
|
27
|
+
const titleType = android ? condensed ? {
|
|
28
|
+
fontSize: theme.fontSize[22],
|
|
29
|
+
lineHeight: theme.space[28],
|
|
30
|
+
fontWeight: theme.fontWeight.regular
|
|
31
|
+
} : {
|
|
32
|
+
fontSize: theme.fontSize[28],
|
|
33
|
+
lineHeight: theme.space[36],
|
|
34
|
+
fontWeight: theme.fontWeight.regular
|
|
35
|
+
} : condensed ? {
|
|
36
|
+
fontSize: theme.fontSize[17],
|
|
37
|
+
lineHeight: theme.space[22],
|
|
38
|
+
fontWeight: theme.fontWeight.semibold
|
|
39
|
+
} : {
|
|
40
|
+
// iOS Large Title (34 on the Dynamic Type base), at 700.
|
|
41
|
+
fontSize: theme.type.largeTitle.fontSize,
|
|
42
|
+
lineHeight: theme.type.largeTitle.lineHeight,
|
|
43
|
+
fontWeight: theme.fontWeight.bold,
|
|
44
|
+
// loam-audit-ignore raw-style-length: F19 pins the HIG large-title tracking at 0.37; the role token rounds it to 0.4.
|
|
45
|
+
letterSpacing: 0.37
|
|
46
|
+
};
|
|
47
|
+
const smallTitle = size === "sm" && !condensed ? android ? { fontSize: theme.fontSize[22], lineHeight: theme.space[28] } : {
|
|
48
|
+
fontSize: theme.type.title1.fontSize,
|
|
49
|
+
lineHeight: theme.type.title1.lineHeight,
|
|
50
|
+
letterSpacing: theme.type.title1.letterSpacing
|
|
51
|
+
} : null;
|
|
52
|
+
const metaType = android ? { fontSize: theme.fontSize[14], lineHeight: theme.space[20] } : { fontSize: theme.fontSize[15], lineHeight: theme.space[20] };
|
|
53
|
+
return /* @__PURE__ */ jsxs(
|
|
54
|
+
View,
|
|
55
|
+
{
|
|
56
|
+
style: [
|
|
57
|
+
styles.container,
|
|
58
|
+
condensed && styles.condensed,
|
|
59
|
+
density === "compact" && styles.compact,
|
|
60
|
+
variant !== "plain" && styles.bordered,
|
|
61
|
+
variant === "filled" && styles.filled
|
|
62
|
+
],
|
|
63
|
+
children: [
|
|
64
|
+
back != null ? /* @__PURE__ */ jsx(View, { style: styles.backRow, children: back }) : null,
|
|
65
|
+
breadcrumb != null ? /* @__PURE__ */ jsx(View, { children: breadcrumb }) : null,
|
|
66
|
+
/* @__PURE__ */ jsxs(View, { style: styles.titleRow, children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(View, { style: styles.titleGroup, children: [
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
Text,
|
|
70
|
+
{
|
|
71
|
+
accessibilityRole: "header",
|
|
72
|
+
numberOfLines: condensed ? 1 : void 0,
|
|
73
|
+
style: [styles.title, titleType, smallTitle, titleFace === "brand" && styles.titleBrand],
|
|
74
|
+
children: title
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
titleAdornment != null ? /* @__PURE__ */ jsx(View, { style: styles.adornment, children: titleAdornment }) : null
|
|
78
|
+
] }),
|
|
79
|
+
actions != null ? /* @__PURE__ */ jsx(View, { style: styles.actions, children: actions }) : null
|
|
80
|
+
] }),
|
|
81
|
+
meta != null && !condensed ? typeof meta === "string" ? /* @__PURE__ */ jsx(Text, { style: [styles.meta, metaType], children: meta }) : /* @__PURE__ */ jsx(View, { children: meta }) : null,
|
|
82
|
+
tabs != null ? /* @__PURE__ */ jsx(View, { style: styles.tabs, children: tabs }) : null
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
var sheet = createStyleSheet((theme) => ({
|
|
88
|
+
container: {
|
|
89
|
+
gap: theme.space.s3,
|
|
90
|
+
paddingHorizontal: theme.space.s4,
|
|
91
|
+
paddingVertical: theme.space.s4,
|
|
92
|
+
backgroundColor: theme.color.bg,
|
|
93
|
+
borderBottomWidth: theme.borderWidth.hair,
|
|
94
|
+
borderBottomColor: "transparent"
|
|
95
|
+
},
|
|
96
|
+
condensed: { paddingVertical: theme.space.s2, borderBottomColor: theme.color.border },
|
|
97
|
+
compact: { paddingVertical: theme.space.s2, gap: theme.space.s2 },
|
|
98
|
+
bordered: { borderBottomColor: theme.color.border },
|
|
99
|
+
filled: { backgroundColor: theme.color.surface2 },
|
|
100
|
+
backRow: { flexDirection: "row", alignItems: "center" },
|
|
101
|
+
// Wraps the actions block below the title on a narrow viewport.
|
|
102
|
+
titleRow: {
|
|
103
|
+
flexDirection: "row",
|
|
104
|
+
flexWrap: "wrap",
|
|
105
|
+
// Actions sit on the title's first baseline (Final 05).
|
|
106
|
+
alignItems: "baseline",
|
|
107
|
+
justifyContent: "space-between",
|
|
108
|
+
gap: theme.space.s3
|
|
109
|
+
},
|
|
110
|
+
// `flexShrink: 1` + `minWidth: 0` lets a long title ellipsize / wrap instead
|
|
111
|
+
// of pushing the actions off the row.
|
|
112
|
+
titleGroup: {
|
|
113
|
+
flexDirection: "row",
|
|
114
|
+
alignItems: "center",
|
|
115
|
+
flexShrink: 1,
|
|
116
|
+
minWidth: 0,
|
|
117
|
+
gap: theme.space.s2
|
|
118
|
+
},
|
|
119
|
+
// `title1` (28/34) is the content page-title role on the mobile ramp — one
|
|
120
|
+
// step below the app bar's `largeTitle`, so the two never read as the same
|
|
121
|
+
// element.
|
|
122
|
+
// The OS face; size, weight and tracking come from the per-OS ramp above.
|
|
123
|
+
title: {
|
|
124
|
+
fontFamily: theme.font.sans,
|
|
125
|
+
color: theme.color.text,
|
|
126
|
+
flexShrink: 1
|
|
127
|
+
},
|
|
128
|
+
// The brand display face; the size ramp stays the OS one.
|
|
129
|
+
titleBrand: {
|
|
130
|
+
fontFamily: theme.font.display,
|
|
131
|
+
fontWeight: `${theme.font.displayWeight}`
|
|
132
|
+
},
|
|
133
|
+
adornment: { flexDirection: "row", alignItems: "center" },
|
|
134
|
+
actions: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: theme.space.s2 },
|
|
135
|
+
// Secondary ink, callout size — the AA-safe muted line under the title.
|
|
136
|
+
meta: {
|
|
137
|
+
fontFamily: theme.font.sans,
|
|
138
|
+
color: theme.color.text2
|
|
139
|
+
},
|
|
140
|
+
tabs: { marginTop: theme.space.s1 }
|
|
141
|
+
}));
|
|
142
|
+
|
|
143
|
+
export { PageHeader };
|