@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,7 +1,8 @@
|
|
|
1
1
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
2
|
-
import { Icon } from './chunk-
|
|
2
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
3
|
+
import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
|
|
3
4
|
import * as React from 'react';
|
|
4
|
-
import { View, Text, Pressable,
|
|
5
|
+
import { Animated, View, Text, Pressable, Platform, Easing, PanResponder } from 'react-native';
|
|
5
6
|
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
6
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
|
@@ -54,16 +55,28 @@ var DEFAULT_LABELS = {
|
|
|
54
55
|
};
|
|
55
56
|
function ToastCard({
|
|
56
57
|
message,
|
|
58
|
+
description,
|
|
57
59
|
severity = "info",
|
|
58
60
|
action,
|
|
59
61
|
countdown,
|
|
60
62
|
onPress,
|
|
61
|
-
labels: labelsProp
|
|
63
|
+
labels: labelsProp,
|
|
64
|
+
platform,
|
|
65
|
+
variant = "default",
|
|
66
|
+
size = "md",
|
|
67
|
+
dismissible = true,
|
|
68
|
+
motion = "full"
|
|
62
69
|
}) {
|
|
63
70
|
const labels = useLabels("toast", DEFAULT_LABELS, labelsProp);
|
|
64
71
|
const { styles } = useStyles(sheet);
|
|
65
72
|
const theme = useLoamTheme("toast");
|
|
66
73
|
const colors = severityColors(theme, severity);
|
|
74
|
+
const level = useResolvedMotion(motion, "toast");
|
|
75
|
+
const pressScale = React.useRef(new Animated.Value(1)).current;
|
|
76
|
+
const pressTo = (to) => {
|
|
77
|
+
if (level !== "full") return;
|
|
78
|
+
Animated.spring(pressScale, { toValue: to, ...springConfig(theme, "fs"), useNativeDriver: true }).start();
|
|
79
|
+
};
|
|
67
80
|
const actionHitSlop = Math.max(0, Math.round((theme.tapMin - theme.ctl.sm) / 2));
|
|
68
81
|
const copy = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69
82
|
/* @__PURE__ */ jsx(
|
|
@@ -72,50 +85,97 @@ function ToastCard({
|
|
|
72
85
|
style: [styles.disc, { backgroundColor: colors.soft, borderColor: colors.edge }],
|
|
73
86
|
accessibilityElementsHidden: true,
|
|
74
87
|
importantForAccessibility: "no-hide-descendants",
|
|
75
|
-
children: /* @__PURE__ */ jsx(Icon, { name: SEVERITY_ICON[severity], size: theme.
|
|
88
|
+
children: /* @__PURE__ */ jsx(Icon, { name: SEVERITY_ICON[severity], size: theme.space[18], color: colors.glyph })
|
|
76
89
|
}
|
|
77
90
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ jsxs(View, { style: styles.textCol, children: [
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
Text,
|
|
94
|
+
{
|
|
95
|
+
style: [
|
|
96
|
+
styles.message,
|
|
97
|
+
isAndroid(theme, platform) && { fontWeight: theme.fontWeight.regular }
|
|
98
|
+
],
|
|
99
|
+
children: message
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
description ? /* @__PURE__ */ jsx(Text, { style: styles.description, children: description }) : null
|
|
103
|
+
] })
|
|
79
104
|
] });
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
accessibilityLabel: labels.dismiss,
|
|
94
|
-
onPress,
|
|
95
|
-
style: styles.copyRegion,
|
|
96
|
-
children: copy
|
|
97
|
-
}
|
|
98
|
-
) : /* @__PURE__ */ jsx(View, { style: styles.copyRegion, children: copy }),
|
|
99
|
-
action ? /* @__PURE__ */ jsx(
|
|
100
|
-
Pressable,
|
|
105
|
+
return (
|
|
106
|
+
// No start bar (F8): the disc carries the tone, its edge in high contrast.
|
|
107
|
+
/* @__PURE__ */ jsxs(
|
|
108
|
+
Animated.View,
|
|
109
|
+
{
|
|
110
|
+
style: [
|
|
111
|
+
styles.card,
|
|
112
|
+
variant === "soft" ? { backgroundColor: colors.soft, borderColor: colors.edge } : null,
|
|
113
|
+
onPress && level === "full" ? { transform: [{ scale: pressScale }] } : null
|
|
114
|
+
],
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ jsxs(
|
|
117
|
+
View,
|
|
101
118
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
children:
|
|
119
|
+
style: [
|
|
120
|
+
styles.body,
|
|
121
|
+
size === "compact" ? { paddingVertical: theme.space.s2 } : null,
|
|
122
|
+
countdown ? styles.bodyTimed : null
|
|
123
|
+
],
|
|
124
|
+
children: [
|
|
125
|
+
onPress ? /* @__PURE__ */ jsx(
|
|
126
|
+
Pressable,
|
|
127
|
+
{
|
|
128
|
+
accessibilityRole: "button",
|
|
129
|
+
accessibilityLabel: description ? `${message}. ${description}` : message,
|
|
130
|
+
onPress,
|
|
131
|
+
onPressIn: () => pressTo(PRESS_SCALE),
|
|
132
|
+
onPressOut: () => pressTo(1),
|
|
133
|
+
style: styles.copyRegion,
|
|
134
|
+
children: copy
|
|
135
|
+
}
|
|
136
|
+
) : /* @__PURE__ */ jsx(View, { style: styles.copyRegion, children: copy }),
|
|
137
|
+
action ? /* @__PURE__ */ jsx(
|
|
138
|
+
Pressable,
|
|
139
|
+
{
|
|
140
|
+
accessibilityRole: "button",
|
|
141
|
+
accessibilityLabel: action.label,
|
|
142
|
+
onPress: action.onPress,
|
|
143
|
+
hitSlop: actionHitSlop,
|
|
144
|
+
style: ({ pressed }) => [styles.action, pressed && styles.actionPressed],
|
|
145
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles.actionLabel, children: action.label })
|
|
146
|
+
}
|
|
147
|
+
) : null,
|
|
148
|
+
onPress && dismissible ? /* @__PURE__ */ jsx(
|
|
149
|
+
Pressable,
|
|
150
|
+
{
|
|
151
|
+
accessibilityRole: "button",
|
|
152
|
+
accessibilityLabel: labels.dismiss,
|
|
153
|
+
onPress,
|
|
154
|
+
hitSlop: Math.max(0, Math.round((theme.tapMin - theme.space[26]) / 2)),
|
|
155
|
+
style: ({ pressed }) => [styles.dismiss, pressed && styles.actionPressed],
|
|
156
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: theme.space[16], color: theme.color.text3 })
|
|
157
|
+
}
|
|
158
|
+
) : null
|
|
159
|
+
]
|
|
108
160
|
}
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
161
|
+
),
|
|
162
|
+
countdown ? /* @__PURE__ */ jsx(View, { style: styles.countdownTrack, children: countdown }) : null
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
)
|
|
114
166
|
);
|
|
115
167
|
}
|
|
168
|
+
var PRESS_SCALE = 0.98;
|
|
169
|
+
function isAndroid(theme, platform) {
|
|
170
|
+
if (platform) return platform === "android";
|
|
171
|
+
if (Platform.OS === "android") return true;
|
|
172
|
+
if (Platform.OS === "ios") return false;
|
|
173
|
+
return theme.platform === "Android";
|
|
174
|
+
}
|
|
116
175
|
var TRAVEL = 12;
|
|
117
176
|
function Toast({
|
|
118
177
|
message,
|
|
178
|
+
description,
|
|
119
179
|
severity = "info",
|
|
120
180
|
action,
|
|
121
181
|
open = true,
|
|
@@ -124,10 +184,18 @@ function Toast({
|
|
|
124
184
|
countdown = false,
|
|
125
185
|
motion = "full",
|
|
126
186
|
safeAreaTop = 0,
|
|
127
|
-
|
|
187
|
+
safeAreaBottom = 0,
|
|
188
|
+
platform,
|
|
189
|
+
labels,
|
|
190
|
+
variant,
|
|
191
|
+
size,
|
|
192
|
+
dismissible
|
|
128
193
|
}) {
|
|
129
194
|
const theme = useLoamTheme("toast");
|
|
130
195
|
const { styles } = useStyles(sheet);
|
|
196
|
+
const android = isAndroid(theme, platform);
|
|
197
|
+
const androidRef = React.useRef(android);
|
|
198
|
+
androidRef.current = android;
|
|
131
199
|
const reduced = theme.reduceMotion || motion === "reduced";
|
|
132
200
|
const instant = motion === "none";
|
|
133
201
|
const offset = reduced || instant ? 0 : TRAVEL;
|
|
@@ -205,13 +273,14 @@ function Toast({
|
|
|
205
273
|
const pan = React.useRef(
|
|
206
274
|
// eslint-disable-next-line loam/no-pan-responder
|
|
207
275
|
PanResponder.create({
|
|
208
|
-
onMoveShouldSetPanResponder: (_e, g) => g.dy < -2 && Math.abs(g.dy) > Math.abs(g.dx),
|
|
276
|
+
onMoveShouldSetPanResponder: (_e, g) => androidRef.current ? Math.abs(g.dx) > 2 && Math.abs(g.dx) > Math.abs(g.dy) : g.dy < -2 && Math.abs(g.dy) > Math.abs(g.dx),
|
|
209
277
|
onPanResponderMove: (_e, g) => {
|
|
210
|
-
const
|
|
211
|
-
progress.setValue(Math.max(0, 1 +
|
|
278
|
+
const travel = androidRef.current ? -Math.abs(g.dx) : Math.min(0, g.dy);
|
|
279
|
+
progress.setValue(Math.max(0, 1 + travel / 80));
|
|
212
280
|
},
|
|
213
281
|
onPanResponderRelease: (_e, g) => {
|
|
214
|
-
|
|
282
|
+
const past = androidRef.current ? Math.abs(g.dx) > 32 || Math.abs(g.vx) > 0.5 : g.dy < -32 || g.vy < -0.5;
|
|
283
|
+
if (past) {
|
|
215
284
|
requestDismiss();
|
|
216
285
|
} else {
|
|
217
286
|
Animated.timing(progress, {
|
|
@@ -226,7 +295,7 @@ function Toast({
|
|
|
226
295
|
).current;
|
|
227
296
|
const translateY = progress.interpolate({
|
|
228
297
|
inputRange: [0, 1],
|
|
229
|
-
outputRange: [-offset, 0]
|
|
298
|
+
outputRange: [android ? offset : -offset, 0]
|
|
230
299
|
});
|
|
231
300
|
const bar = showCountdown ? /* @__PURE__ */ jsx(
|
|
232
301
|
Animated.View,
|
|
@@ -234,7 +303,7 @@ function Toast({
|
|
|
234
303
|
style: [
|
|
235
304
|
styles.countdownBar,
|
|
236
305
|
{
|
|
237
|
-
backgroundColor: severityColors(theme, severity).
|
|
306
|
+
backgroundColor: severityColors(theme, severity).accent,
|
|
238
307
|
transform: [{ translateX: countdownX }]
|
|
239
308
|
}
|
|
240
309
|
]
|
|
@@ -243,7 +312,7 @@ function Toast({
|
|
|
243
312
|
return /* @__PURE__ */ jsx(
|
|
244
313
|
View,
|
|
245
314
|
{
|
|
246
|
-
style: [styles.root, { paddingTop: safeAreaTop + theme.space.s2 }],
|
|
315
|
+
style: android ? [styles.root, styles.rootBottom, { paddingBottom: safeAreaBottom + theme.space.s4 }] : [styles.root, { paddingTop: safeAreaTop + theme.space.s2 }],
|
|
247
316
|
pointerEvents: "box-none",
|
|
248
317
|
children: /* @__PURE__ */ jsx(
|
|
249
318
|
Animated.View,
|
|
@@ -258,11 +327,17 @@ function Toast({
|
|
|
258
327
|
ToastCard,
|
|
259
328
|
{
|
|
260
329
|
message,
|
|
330
|
+
description,
|
|
261
331
|
severity,
|
|
262
332
|
action,
|
|
263
333
|
countdown: bar,
|
|
264
334
|
onPress: requestDismiss,
|
|
265
|
-
labels
|
|
335
|
+
labels,
|
|
336
|
+
platform: android ? "android" : "ios",
|
|
337
|
+
variant,
|
|
338
|
+
size,
|
|
339
|
+
dismissible,
|
|
340
|
+
motion
|
|
266
341
|
}
|
|
267
342
|
)
|
|
268
343
|
}
|
|
@@ -277,6 +352,7 @@ var nextId = () => `loam-toast-${++idCounter}`;
|
|
|
277
352
|
function ToastProvider({
|
|
278
353
|
children,
|
|
279
354
|
safeAreaTop = 0,
|
|
355
|
+
safeAreaBottom = 0,
|
|
280
356
|
motion = "full"
|
|
281
357
|
}) {
|
|
282
358
|
const [queue, setQueue] = React.useState([]);
|
|
@@ -338,12 +414,17 @@ function ToastProvider({
|
|
|
338
414
|
{
|
|
339
415
|
open: current.open,
|
|
340
416
|
message: current.message,
|
|
417
|
+
description: current.description,
|
|
341
418
|
severity: current.severity,
|
|
342
419
|
action: current.action,
|
|
343
420
|
duration: current.duration,
|
|
344
421
|
countdown: current.countdown,
|
|
422
|
+
variant: current.variant,
|
|
423
|
+
size: current.size,
|
|
424
|
+
dismissible: current.dismissible,
|
|
345
425
|
motion,
|
|
346
426
|
safeAreaTop,
|
|
427
|
+
safeAreaBottom,
|
|
347
428
|
onDismiss: () => close(current.id)
|
|
348
429
|
},
|
|
349
430
|
current.id
|
|
@@ -357,6 +438,9 @@ function useToast() {
|
|
|
357
438
|
}
|
|
358
439
|
return ctx;
|
|
359
440
|
}
|
|
441
|
+
function useOptionalToast() {
|
|
442
|
+
return React.useContext(ToastContext);
|
|
443
|
+
}
|
|
360
444
|
var TOAST_MAX_W = 480;
|
|
361
445
|
var sheet = createStyleSheet((theme) => ({
|
|
362
446
|
// Full-bleed top overlay; `box-none` so touches pass through the empty gutters.
|
|
@@ -369,14 +453,15 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
369
453
|
paddingHorizontal: theme.space.s4,
|
|
370
454
|
alignItems: "center"
|
|
371
455
|
},
|
|
456
|
+
rootBottom: { top: void 0, bottom: 0 },
|
|
372
457
|
animated: {
|
|
373
458
|
width: "100%",
|
|
374
459
|
maxWidth: TOAST_MAX_W
|
|
375
460
|
},
|
|
376
461
|
// The surface card. `overflow: hidden` clips the countdown bar to the radius.
|
|
377
462
|
card: {
|
|
378
|
-
borderRadius: theme.radius.
|
|
379
|
-
borderWidth: theme.borderWidth.
|
|
463
|
+
borderRadius: theme.radius.md,
|
|
464
|
+
borderWidth: theme.borderWidth.thin,
|
|
380
465
|
borderColor: theme.color.border,
|
|
381
466
|
backgroundColor: theme.color.surface,
|
|
382
467
|
overflow: "hidden",
|
|
@@ -387,8 +472,11 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
387
472
|
alignItems: "center",
|
|
388
473
|
gap: theme.space.s3,
|
|
389
474
|
paddingVertical: theme.space.s3,
|
|
390
|
-
|
|
475
|
+
paddingStart: theme.space.s3,
|
|
476
|
+
paddingEnd: theme.space[6]
|
|
391
477
|
},
|
|
478
|
+
// The timer line sits 6 above the edge; the card owes it 16 below.
|
|
479
|
+
bodyTimed: { paddingBottom: theme.space[16] },
|
|
392
480
|
// The tap-to-dismiss region: icon + message. `flex: 1` lets it absorb the
|
|
393
481
|
// width so the action sits flush at the trailing edge.
|
|
394
482
|
copyRegion: {
|
|
@@ -402,43 +490,64 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
402
490
|
width: theme.space[32],
|
|
403
491
|
height: theme.space[32],
|
|
404
492
|
borderRadius: theme.radius.full,
|
|
405
|
-
borderWidth: theme.borderWidth.
|
|
493
|
+
borderWidth: theme.borderWidth.thin,
|
|
406
494
|
alignItems: "center",
|
|
407
495
|
justifyContent: "center"
|
|
408
496
|
},
|
|
409
497
|
// `flex: 1` + `minWidth: 0` lets the message wrap instead of shoving the action off-card.
|
|
410
498
|
message: {
|
|
411
|
-
flex: 1,
|
|
412
|
-
minWidth: 0,
|
|
413
499
|
fontFamily: theme.font.sans,
|
|
414
|
-
|
|
500
|
+
fontWeight: theme.fontWeight.bold,
|
|
501
|
+
fontSize: theme.fontSize[14],
|
|
415
502
|
lineHeight: theme.type.subheadline.lineHeight,
|
|
416
503
|
color: theme.color.text
|
|
417
504
|
},
|
|
505
|
+
textCol: { flex: 1, minWidth: 0, gap: theme.space[2] },
|
|
506
|
+
description: {
|
|
507
|
+
fontFamily: theme.font.sans,
|
|
508
|
+
fontSize: theme.fontSize[13],
|
|
509
|
+
lineHeight: theme.type.footnote.lineHeight,
|
|
510
|
+
color: theme.color.text2
|
|
511
|
+
},
|
|
512
|
+
dismiss: {
|
|
513
|
+
width: theme.ctl.xs,
|
|
514
|
+
height: theme.ctl.xs,
|
|
515
|
+
borderRadius: theme.ctl.r.xs,
|
|
516
|
+
alignItems: "center",
|
|
517
|
+
justifyContent: "center"
|
|
518
|
+
},
|
|
519
|
+
// A ghost sm Button: ctl.sm tall, r sm, state-hover on press.
|
|
418
520
|
action: {
|
|
419
521
|
flexShrink: 0,
|
|
420
|
-
|
|
421
|
-
|
|
522
|
+
minHeight: theme.ctl.sm,
|
|
523
|
+
justifyContent: "center",
|
|
524
|
+
paddingHorizontal: theme.space[10],
|
|
422
525
|
borderRadius: theme.radius.sm
|
|
423
526
|
},
|
|
527
|
+
actionPressed: { backgroundColor: theme.state.hover },
|
|
424
528
|
actionLabel: {
|
|
425
529
|
fontFamily: theme.font.sans,
|
|
426
|
-
fontWeight: theme.fontWeight.
|
|
530
|
+
fontWeight: theme.fontWeight.semibold,
|
|
427
531
|
fontSize: theme.type.footnote.fontSize,
|
|
428
532
|
color: theme.color.accentStrong
|
|
429
533
|
},
|
|
534
|
+
// A 2 px tone line, inset 12 / 6 on a surface-3 track, so nothing runs along
|
|
535
|
+
// the rounded edge (G13 S1).
|
|
430
536
|
countdownTrack: {
|
|
431
537
|
position: "absolute",
|
|
432
|
-
bottom:
|
|
433
|
-
start:
|
|
434
|
-
end:
|
|
435
|
-
height: theme.space[
|
|
538
|
+
bottom: theme.space[6],
|
|
539
|
+
start: theme.space[12],
|
|
540
|
+
end: theme.space[12],
|
|
541
|
+
height: theme.space[2],
|
|
542
|
+
borderRadius: theme.radius.full,
|
|
543
|
+
backgroundColor: theme.color.surface3,
|
|
436
544
|
overflow: "hidden"
|
|
437
545
|
},
|
|
438
546
|
countdownBar: {
|
|
439
547
|
width: "100%",
|
|
440
|
-
height: theme.space[
|
|
548
|
+
height: theme.space[2],
|
|
549
|
+
borderRadius: theme.radius.full
|
|
441
550
|
}
|
|
442
551
|
}));
|
|
443
552
|
|
|
444
|
-
export { SEVERITY_DURATION, Toast, ToastCard, ToastProvider, useToast };
|
|
553
|
+
export { SEVERITY_DURATION, Toast, ToastCard, ToastProvider, useOptionalToast, useToast };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
1
2
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
2
|
-
import { Icon } from './chunk-
|
|
3
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
3
4
|
import * as React from 'react';
|
|
4
|
-
import { Animated, Easing, Pressable, View, Text, AccessibilityInfo } from 'react-native';
|
|
5
|
+
import { Animated, Easing, Pressable, View, ActivityIndicator, Text, AccessibilityInfo } from 'react-native';
|
|
5
6
|
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
9
|
var DEFAULT_LABELS = {
|
|
9
10
|
copy: "Copy",
|
|
@@ -17,14 +18,21 @@ function CopyButton({
|
|
|
17
18
|
timeout = 2e3,
|
|
18
19
|
motion = "full",
|
|
19
20
|
accessibilityLabel,
|
|
21
|
+
disabled = false,
|
|
22
|
+
fullWidth = false,
|
|
23
|
+
tone = "neutral",
|
|
24
|
+
loading = false,
|
|
25
|
+
leading,
|
|
26
|
+
trailing,
|
|
20
27
|
labels: labelsProp
|
|
21
28
|
}) {
|
|
22
29
|
const labels = useLabels("copyButton", DEFAULT_LABELS, labelsProp);
|
|
23
30
|
const { styles } = useStyles(sheet, { variant, size });
|
|
24
31
|
const theme = useLoamTheme("copy-button");
|
|
25
|
-
const fg = theme.color.text;
|
|
32
|
+
const fg = tone === "accent" ? theme.color.accentStrong : tone === "good" ? theme.color.goodOnSoft : tone === "warn" ? theme.color.warnOnSoft : tone === "danger" ? theme.color.danger : theme.color.text;
|
|
26
33
|
const iconSize = theme.ctl.icon[size];
|
|
27
34
|
const slop = Math.max(0, (theme.hit[size] - theme.ctl[size]) / 2);
|
|
35
|
+
const android = isAndroidIdiom(theme);
|
|
28
36
|
const reduced = theme.reduceMotion || motion === "reduced" || motion === "none";
|
|
29
37
|
const [copied, setCopied] = React.useState(false);
|
|
30
38
|
const timer = React.useRef();
|
|
@@ -50,6 +58,7 @@ function CopyButton({
|
|
|
50
58
|
bounciness: 6
|
|
51
59
|
}).start();
|
|
52
60
|
const handlePress = () => {
|
|
61
|
+
if (loading) return;
|
|
53
62
|
onCopy?.();
|
|
54
63
|
setCopied(true);
|
|
55
64
|
AccessibilityInfo.announceForAccessibility(labels.copied);
|
|
@@ -66,37 +75,57 @@ function CopyButton({
|
|
|
66
75
|
{
|
|
67
76
|
accessibilityRole: "button",
|
|
68
77
|
accessibilityLabel: accessibilityLabel ?? label ?? labels.copy,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
accessibilityState: { disabled, busy: loading },
|
|
79
|
+
"aria-disabled": disabled || void 0,
|
|
80
|
+
disabled,
|
|
81
|
+
onPress: disabled ? void 0 : handlePress,
|
|
82
|
+
onPressIn: disabled || android ? void 0 : () => press(0.97),
|
|
83
|
+
onPressOut: disabled || android ? void 0 : () => press(1),
|
|
72
84
|
hitSlop: { top: slop, bottom: slop, left: slop, right: slop },
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
85
|
+
android_ripple: android && !disabled ? { color: theme.state.pressed, borderless: false, foreground: true } : void 0,
|
|
86
|
+
style: [
|
|
87
|
+
android ? { borderRadius: theme.ctl.r[size], overflow: "hidden" } : null,
|
|
88
|
+
fullWidth ? { alignSelf: "stretch" } : null
|
|
89
|
+
],
|
|
90
|
+
children: /* @__PURE__ */ jsxs(
|
|
91
|
+
Animated.View,
|
|
92
|
+
{
|
|
93
|
+
style: [
|
|
94
|
+
styles.base,
|
|
95
|
+
{ transform: [{ scale: pressScale }] },
|
|
96
|
+
disabled ? { opacity: theme.state.disabledOpacity } : null
|
|
97
|
+
],
|
|
98
|
+
children: [
|
|
99
|
+
leading,
|
|
100
|
+
/* @__PURE__ */ jsx(View, { style: glyphBox, children: loading ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: fg, accessibilityLabel: "Loading" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
Animated.View,
|
|
103
|
+
{
|
|
104
|
+
testID: "copy-glyph",
|
|
105
|
+
style: [
|
|
106
|
+
styles.glyph,
|
|
107
|
+
reduced ? { opacity: copied ? 0 : 1 } : { opacity: copyOpacity, transform: [{ scale: copyScale }] }
|
|
108
|
+
],
|
|
109
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "copy", size: iconSize, color: fg })
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsx(
|
|
113
|
+
Animated.View,
|
|
114
|
+
{
|
|
115
|
+
testID: "check-glyph",
|
|
116
|
+
style: [
|
|
117
|
+
styles.glyph,
|
|
118
|
+
reduced ? { opacity: copied ? 1 : 0 } : { opacity: checkOpacity, transform: [{ scale: checkScale }] }
|
|
119
|
+
],
|
|
120
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "check", size: iconSize, color: fg })
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] }) }),
|
|
124
|
+
label ? /* @__PURE__ */ jsx(Text, { style: [styles.label, { color: fg }], children: label }) : null,
|
|
125
|
+
trailing
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
)
|
|
100
129
|
}
|
|
101
130
|
);
|
|
102
131
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -2,7 +2,7 @@ import { useLabels } from './chunk-APCWFOZW.js';
|
|
|
2
2
|
import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
|
|
3
3
|
import { DEFAULT_DATE_LABELS, localeNames, monthGrid, weekdayOrder, dayDisabled, dayLabel } from '@btndprojects/loam-date';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { ScrollView, View, Text, Animated, Pressable
|
|
5
|
+
import { ScrollView, View, Text, Animated, Pressable } from 'react-native';
|
|
6
6
|
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
8
|
|
|
@@ -12,6 +12,8 @@ var DEFAULT_LABELS = {
|
|
|
12
12
|
pickRange: "Pick a range",
|
|
13
13
|
triggerNamed: (label, value) => `${label}, ${value}`,
|
|
14
14
|
triggerHint: "Double tap to change the date range",
|
|
15
|
+
valid: "Valid",
|
|
16
|
+
loading: "Loading",
|
|
15
17
|
startTime: "Start time, 24-hour",
|
|
16
18
|
endTime: "End time, 24-hour",
|
|
17
19
|
timeTo: "to",
|
|
@@ -92,7 +94,7 @@ function MonthList({
|
|
|
92
94
|
item.weeks.map((week) => /* @__PURE__ */ jsxs(View, { style: styles.weekRow, children: [
|
|
93
95
|
weekNumbers ? /* @__PURE__ */ jsx(View, { style: styles.weekNumber, children: /* @__PURE__ */ jsx(Text, { style: styles.weekNumberText, children: week.week }) }) : null,
|
|
94
96
|
week.days.map(
|
|
95
|
-
(day) => (
|
|
97
|
+
(day, column) => (
|
|
96
98
|
// A day borrowed from the neighbouring month is **not** rendered
|
|
97
99
|
// as a cell here, unlike in the web picker's two-month view. In a
|
|
98
100
|
// continuous scroll that month is a thumb-flick away, so a
|
|
@@ -112,6 +114,7 @@ function MonthList({
|
|
|
112
114
|
level,
|
|
113
115
|
labels,
|
|
114
116
|
names: names.days,
|
|
117
|
+
column,
|
|
115
118
|
onPick
|
|
116
119
|
},
|
|
117
120
|
day.key
|
|
@@ -134,6 +137,7 @@ function DayCell({
|
|
|
134
137
|
level,
|
|
135
138
|
labels,
|
|
136
139
|
names,
|
|
140
|
+
column,
|
|
137
141
|
onPick
|
|
138
142
|
}) {
|
|
139
143
|
const { styles } = useStyles(sheet);
|
|
@@ -199,19 +203,27 @@ function DayCell({
|
|
|
199
203
|
onPress: () => onPick(day.ms),
|
|
200
204
|
style: ({ pressed }) => [styles.day, pressed && !disabled && styles.pressed],
|
|
201
205
|
children: [
|
|
202
|
-
/* @__PURE__ */ jsx(
|
|
206
|
+
selection !== "none" && selection !== "both" ? /* @__PURE__ */ jsx(
|
|
203
207
|
Animated.View,
|
|
204
208
|
{
|
|
205
209
|
pointerEvents: "none",
|
|
206
|
-
style: [
|
|
210
|
+
style: [
|
|
211
|
+
styles.capsule,
|
|
212
|
+
{
|
|
213
|
+
opacity: endpoint ? 1 : wash,
|
|
214
|
+
left: isStart ? "50%" : 0,
|
|
215
|
+
right: isEnd ? "50%" : 0
|
|
216
|
+
},
|
|
217
|
+
!isStart && column === 0 && styles.capsuleRoundStart,
|
|
218
|
+
!isEnd && column === 6 && styles.capsuleRoundEnd
|
|
219
|
+
]
|
|
207
220
|
}
|
|
208
|
-
),
|
|
221
|
+
) : null,
|
|
209
222
|
endpoint ? /* @__PURE__ */ jsx(
|
|
210
223
|
Animated.View,
|
|
211
224
|
{
|
|
212
225
|
pointerEvents: "none",
|
|
213
226
|
style: [
|
|
214
|
-
StyleSheet.absoluteFill,
|
|
215
227
|
styles.dayEnd,
|
|
216
228
|
{
|
|
217
229
|
transform: [
|
|
@@ -221,12 +233,12 @@ function DayCell({
|
|
|
221
233
|
]
|
|
222
234
|
}
|
|
223
235
|
) : null,
|
|
236
|
+
today && !endpoint ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles.dayToday }) : null,
|
|
224
237
|
/* @__PURE__ */ jsx(
|
|
225
238
|
Text,
|
|
226
239
|
{
|
|
227
240
|
style: [
|
|
228
241
|
styles.dayText,
|
|
229
|
-
today && styles.dayToday,
|
|
230
242
|
(isStart || isEnd) && styles.dayEndText,
|
|
231
243
|
disabled && styles.dayDisabled
|
|
232
244
|
],
|
|
@@ -275,15 +287,36 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
275
287
|
},
|
|
276
288
|
day: {
|
|
277
289
|
flex: 1,
|
|
278
|
-
|
|
290
|
+
height: theme.tapMin,
|
|
279
291
|
alignItems: "center",
|
|
280
292
|
justifyContent: "center",
|
|
281
293
|
gap: theme.space[1]
|
|
282
294
|
},
|
|
283
295
|
// The in-range wash is a state layer, not a tint: it has to composite over the
|
|
284
296
|
// sheet surface and over a pressed cell without either turning muddy.
|
|
285
|
-
|
|
286
|
-
|
|
297
|
+
// loam-contrast-ignore — the range band runs behind consecutive day cells; an edge per cell would break the capsule.
|
|
298
|
+
capsule: {
|
|
299
|
+
position: "absolute",
|
|
300
|
+
top: 0,
|
|
301
|
+
bottom: 0,
|
|
302
|
+
backgroundColor: theme.color.accentSoft
|
|
303
|
+
},
|
|
304
|
+
capsuleRoundStart: {
|
|
305
|
+
borderTopLeftRadius: theme.radius.full,
|
|
306
|
+
borderBottomLeftRadius: theme.radius.full
|
|
307
|
+
},
|
|
308
|
+
capsuleRoundEnd: {
|
|
309
|
+
borderTopRightRadius: theme.radius.full,
|
|
310
|
+
borderBottomRightRadius: theme.radius.full
|
|
311
|
+
},
|
|
312
|
+
// The end is a filled circle at the day height (44 iOS, 48 Android).
|
|
313
|
+
dayEnd: {
|
|
314
|
+
position: "absolute",
|
|
315
|
+
width: theme.tapMin,
|
|
316
|
+
height: theme.tapMin,
|
|
317
|
+
borderRadius: theme.radius.full,
|
|
318
|
+
backgroundColor: theme.color.accent
|
|
319
|
+
},
|
|
287
320
|
dayText: {
|
|
288
321
|
fontFamily: theme.font.sans,
|
|
289
322
|
fontSize: theme.type.subheadline.fontSize,
|
|
@@ -291,9 +324,17 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
291
324
|
color: theme.color.text
|
|
292
325
|
},
|
|
293
326
|
dayBlank: { flex: 1, minHeight: theme.tapMin },
|
|
294
|
-
|
|
327
|
+
// Today: a 1.5 accent-strong ring at regular weight.
|
|
328
|
+
dayToday: {
|
|
329
|
+
position: "absolute",
|
|
330
|
+
width: theme.tapMin,
|
|
331
|
+
height: theme.tapMin,
|
|
332
|
+
borderRadius: theme.radius.full,
|
|
333
|
+
borderWidth: theme.borderWidth.strong,
|
|
334
|
+
borderColor: theme.color.accentStrong
|
|
335
|
+
},
|
|
295
336
|
dayEndText: { color: theme.color.accentInk, fontWeight: theme.fontWeight.bold },
|
|
296
|
-
dayDisabled: { color: theme.color.text3
|
|
337
|
+
dayDisabled: { color: theme.color.text3 },
|
|
297
338
|
densityBar: {
|
|
298
339
|
width: theme.space.s3,
|
|
299
340
|
borderRadius: theme.radius.full,
|