@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,10 +1,11 @@
|
|
|
1
|
+
import { Skeleton } from './chunk-YJ5PXOX3.js';
|
|
1
2
|
import { NAMED_ROLE } from './chunk-W23G6JLF.js';
|
|
2
3
|
import { useLoamLocale } from './chunk-APCWFOZW.js';
|
|
3
4
|
import { useResolvedMotion } from './chunk-J64KGCGX.js';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { StyleSheet, AccessibilityInfo, View, Text, Animated, Easing } from 'react-native';
|
|
6
7
|
import { useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
7
|
-
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
var DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
10
11
|
function isDigit(ch) {
|
|
@@ -55,7 +56,12 @@ function NumberRoll({
|
|
|
55
56
|
decorative = false,
|
|
56
57
|
accessibilityLabel,
|
|
57
58
|
style,
|
|
58
|
-
testID
|
|
59
|
+
testID,
|
|
60
|
+
size,
|
|
61
|
+
unit,
|
|
62
|
+
tone = "default",
|
|
63
|
+
loading = false,
|
|
64
|
+
align
|
|
59
65
|
}) {
|
|
60
66
|
const theme = useLoamTheme("number-roll");
|
|
61
67
|
const resolved = useResolvedMotion(motion, "number-roll");
|
|
@@ -75,7 +81,13 @@ function NumberRoll({
|
|
|
75
81
|
React.useEffect(() => {
|
|
76
82
|
if (announce && !decorative) AccessibilityInfo.announceForAccessibility(text);
|
|
77
83
|
}, [announce, decorative, text]);
|
|
78
|
-
const
|
|
84
|
+
const sizePx = size ? { sm: 14, md: 16, lg: 24, xl: 34 }[size] : void 0;
|
|
85
|
+
const toneColor = tone === "default" ? theme.color.text : tone === "accent" ? theme.color.accentStrong : tone === "good" ? theme.color.good : tone === "warn" ? theme.color.warn : theme.color.danger;
|
|
86
|
+
const flat = {
|
|
87
|
+
...sizePx ? { fontSize: sizePx, fontWeight: theme.fontWeight.semibold } : null,
|
|
88
|
+
...toneColor ? { color: toneColor } : null,
|
|
89
|
+
...StyleSheet.flatten(textStyle) ?? {}
|
|
90
|
+
};
|
|
79
91
|
const fontSize = typeof flat.fontSize === "number" ? flat.fontSize : 16;
|
|
80
92
|
const lineHeight = typeof flat.lineHeight === "number" ? flat.lineHeight : Math.round(fontSize * 1.2);
|
|
81
93
|
const glyphStyle = {
|
|
@@ -95,37 +107,53 @@ function NumberRoll({
|
|
|
95
107
|
"aria-hidden": true
|
|
96
108
|
} : {
|
|
97
109
|
accessibilityRole: NAMED_ROLE,
|
|
98
|
-
accessibilityLabel: accessibilityLabel ?? text,
|
|
110
|
+
accessibilityLabel: accessibilityLabel ?? (unit ? `${text} ${unit}` : text),
|
|
99
111
|
accessibilityLiveRegion: announce ? "polite" : "none"
|
|
100
112
|
};
|
|
101
|
-
|
|
113
|
+
const alignStyle = align ? { alignSelf: align === "start" ? "flex-start" : align === "end" ? "flex-end" : "center" } : void 0;
|
|
114
|
+
if (loading) {
|
|
115
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.row, alignStyle, style], testID, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: fontSize * 3, height: lineHeight, decorative: true }) });
|
|
116
|
+
}
|
|
117
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.row, alignStyle, style], testID, ...a11y, children: /* @__PURE__ */ jsxs(
|
|
102
118
|
View,
|
|
103
119
|
{
|
|
104
120
|
style: styles.row,
|
|
105
121
|
accessibilityElementsHidden: true,
|
|
106
122
|
importantForAccessibility: "no-hide-descendants",
|
|
107
123
|
"aria-hidden": true,
|
|
108
|
-
children:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
children: [
|
|
125
|
+
tokens.map((ch, i) => {
|
|
126
|
+
const key = String(tokens.length - 1 - i);
|
|
127
|
+
if (isDigit(ch)) {
|
|
128
|
+
const index = digitIndex++;
|
|
129
|
+
return /* @__PURE__ */ jsx(
|
|
130
|
+
RollDigit,
|
|
131
|
+
{
|
|
132
|
+
digit: rollInPending ? 0 : Number(ch),
|
|
133
|
+
index,
|
|
134
|
+
lineHeight,
|
|
135
|
+
glyphStyle,
|
|
136
|
+
animate,
|
|
137
|
+
duration,
|
|
138
|
+
easing: springEasing,
|
|
139
|
+
stagger
|
|
140
|
+
},
|
|
141
|
+
key
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
return /* @__PURE__ */ jsx(Text, { style: glyphStyle, children: ch }, key);
|
|
145
|
+
}),
|
|
146
|
+
unit ? /* @__PURE__ */ jsx(
|
|
147
|
+
Text,
|
|
148
|
+
{
|
|
149
|
+
style: [
|
|
118
150
|
glyphStyle,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
return /* @__PURE__ */ jsx(Text, { style: glyphStyle, children: ch }, key);
|
|
128
|
-
})
|
|
151
|
+
{ fontWeight: theme.fontWeight.regular, marginStart: theme.space.s1 }
|
|
152
|
+
],
|
|
153
|
+
children: unit
|
|
154
|
+
}
|
|
155
|
+
) : null
|
|
156
|
+
]
|
|
129
157
|
}
|
|
130
158
|
) });
|
|
131
159
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ContextMenuOverlay, LONG_PRESS_DELAY_MS } from './chunk-
|
|
1
|
+
import { ContextMenuOverlay, LONG_PRESS_DELAY_MS } from './chunk-7CGJBQUA.js';
|
|
2
|
+
import { resolveTextRole } from './chunk-L4D5LHCH.js';
|
|
2
3
|
import { haptics } from './chunk-NY2U3PBI.js';
|
|
4
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
3
5
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
4
|
-
import { Icon } from './chunk-
|
|
6
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
5
7
|
import * as React from 'react';
|
|
6
8
|
import { View, Animated, Easing, PanResponder, Pressable, StyleSheet, Text } from 'react-native';
|
|
7
9
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
@@ -164,9 +166,11 @@ function RowBody({
|
|
|
164
166
|
trailing,
|
|
165
167
|
onPress,
|
|
166
168
|
divider = false,
|
|
167
|
-
|
|
169
|
+
chevron = false,
|
|
170
|
+
platform,
|
|
171
|
+
disabled: disabledProp,
|
|
168
172
|
accessibilityLabel,
|
|
169
|
-
density
|
|
173
|
+
density: densityProp,
|
|
170
174
|
selectable = false,
|
|
171
175
|
selected = false,
|
|
172
176
|
onToggleSelected,
|
|
@@ -178,19 +182,55 @@ function RowBody({
|
|
|
178
182
|
accessibilityHint,
|
|
179
183
|
dragHandle
|
|
180
184
|
}) {
|
|
181
|
-
const
|
|
185
|
+
const theme = useLoamTheme("list-row");
|
|
186
|
+
const group = React.useContext(ListGroupContext);
|
|
187
|
+
const android = isAndroidIdiom(theme, platform ?? group?.platform);
|
|
188
|
+
const density = densityProp ?? group?.density ?? "comfortable";
|
|
189
|
+
const disabled = disabledProp ?? group?.disabled ?? false;
|
|
190
|
+
const { styles } = useStyles(sheet, {
|
|
191
|
+
divider: divider && !group && !android,
|
|
192
|
+
disabled,
|
|
193
|
+
density
|
|
194
|
+
});
|
|
195
|
+
const [textStart, setTextStart] = React.useState();
|
|
196
|
+
const separator = !android && group?.separator === true;
|
|
197
|
+
const metrics = density === "compact" ? {} : {
|
|
198
|
+
minHeight: android ? subtitle != null ? theme.space[72] : theme.space[56] : subtitle != null ? theme.space[60] : theme.space[44],
|
|
199
|
+
paddingVertical: theme.space[android ? 8 : 6]
|
|
200
|
+
};
|
|
201
|
+
const titleRole = resolveTextRole(theme, "body", android);
|
|
202
|
+
const subtitleRole = resolveTextRole(theme, "subheadline", android);
|
|
203
|
+
const fill = selected ? { backgroundColor: theme.state.selected } : group && android ? { backgroundColor: theme.color.surface } : null;
|
|
182
204
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
183
|
-
selectable && selected ? /* @__PURE__ */ jsx(View, { accessible: false, style: styles.selectBar }) : null,
|
|
184
205
|
selectable ? /* @__PURE__ */ jsx(View, { style: styles.slot, children: /* @__PURE__ */ jsx(SelectionIndicator, { selected }) }) : null,
|
|
185
206
|
leading != null ? /* @__PURE__ */ jsx(View, { style: styles.slot, children: leading }) : null,
|
|
186
|
-
/* @__PURE__ */ jsxs(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
207
|
+
/* @__PURE__ */ jsxs(
|
|
208
|
+
View,
|
|
209
|
+
{
|
|
210
|
+
style: styles.main,
|
|
211
|
+
onLayout: separator ? (e) => setTextStart(e.nativeEvent.layout.x) : void 0,
|
|
212
|
+
children: [
|
|
213
|
+
line(title, [styles.title, titleRole]),
|
|
214
|
+
line(subtitle, [styles.subtitle, subtitleRole])
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
),
|
|
190
218
|
trailing != null ? /* @__PURE__ */ jsx(View, { style: styles.slot, children: trailing }) : null,
|
|
191
|
-
|
|
219
|
+
chevron ? /* @__PURE__ */ jsx(View, { style: styles.slot, children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: theme.icon.sm, color: theme.color.text3 }) }) : null,
|
|
220
|
+
dragHandle != null ? dragHandle : null,
|
|
221
|
+
separator ? /* @__PURE__ */ jsx(
|
|
222
|
+
View,
|
|
223
|
+
{
|
|
224
|
+
"aria-hidden": true,
|
|
225
|
+
accessibilityElementsHidden: true,
|
|
226
|
+
importantForAccessibility: "no-hide-descendants",
|
|
227
|
+
testID: "list-row-separator",
|
|
228
|
+
style: [styles.separator, { start: textStart ?? theme.space.s4 }]
|
|
229
|
+
}
|
|
230
|
+
) : null
|
|
192
231
|
] });
|
|
193
|
-
const
|
|
232
|
+
const readOnly = group?.interactive === false;
|
|
233
|
+
const primaryPress = readOnly ? void 0 : selectable ? onToggleSelected : onPress;
|
|
194
234
|
if (primaryPress || interactive) {
|
|
195
235
|
const label = accessibilityLabel ?? (typeof title === "string" ? title : void 0);
|
|
196
236
|
return /* @__PURE__ */ jsx(
|
|
@@ -207,12 +247,19 @@ function RowBody({
|
|
|
207
247
|
onPress: disabled ? void 0 : primaryPress,
|
|
208
248
|
onLongPress: disabled ? void 0 : onLongPress,
|
|
209
249
|
delayLongPress: LONG_PRESS_DELAY_MS,
|
|
210
|
-
|
|
250
|
+
android_ripple: android ? { color: theme.state.pressed, borderless: false } : void 0,
|
|
251
|
+
style: ({ pressed }) => [
|
|
252
|
+
styles.base,
|
|
253
|
+
metrics,
|
|
254
|
+
fill,
|
|
255
|
+
style,
|
|
256
|
+
pressed && !disabled && !android ? styles.pressed : null
|
|
257
|
+
],
|
|
211
258
|
children: content
|
|
212
259
|
}
|
|
213
260
|
);
|
|
214
261
|
}
|
|
215
|
-
return /* @__PURE__ */ jsx(View, { style: [styles.base, style], children: content });
|
|
262
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.base, metrics, fill, style], children: content });
|
|
216
263
|
}
|
|
217
264
|
function ListRow(props) {
|
|
218
265
|
const {
|
|
@@ -225,6 +272,7 @@ function ListRow(props) {
|
|
|
225
272
|
onSwipePeek,
|
|
226
273
|
selectable = false,
|
|
227
274
|
selected,
|
|
275
|
+
value,
|
|
228
276
|
defaultSelected = false,
|
|
229
277
|
onSelectedChange,
|
|
230
278
|
draggable = false,
|
|
@@ -239,9 +287,11 @@ function ListRow(props) {
|
|
|
239
287
|
...rest
|
|
240
288
|
} = props;
|
|
241
289
|
const labels = useLabels("listRow", DEFAULT_LABELS, labelsProp);
|
|
242
|
-
const
|
|
290
|
+
const groupSelected = React.useContext(ListGroupContext)?.selected;
|
|
291
|
+
const effectiveSelected = selected ?? (selectable && groupSelected && value !== void 0 ? groupSelected.includes(value) : void 0);
|
|
292
|
+
const isControlled = effectiveSelected !== void 0;
|
|
243
293
|
const [internalSelected, setInternalSelected] = React.useState(defaultSelected);
|
|
244
|
-
const isSelected =
|
|
294
|
+
const isSelected = effectiveSelected ?? internalSelected;
|
|
245
295
|
const toggleSelected = React.useCallback(() => {
|
|
246
296
|
const next = !isSelected;
|
|
247
297
|
if (!isControlled) setInternalSelected(next);
|
|
@@ -318,7 +368,16 @@ function MenuRow({
|
|
|
318
368
|
}
|
|
319
369
|
}
|
|
320
370
|
),
|
|
321
|
-
/* @__PURE__ */ jsx(
|
|
371
|
+
/* @__PURE__ */ jsx(
|
|
372
|
+
ContextMenuOverlay,
|
|
373
|
+
{
|
|
374
|
+
open,
|
|
375
|
+
onClose: () => setOpen(false),
|
|
376
|
+
items,
|
|
377
|
+
anchor,
|
|
378
|
+
accessibilityLabel: menuLabel
|
|
379
|
+
}
|
|
380
|
+
)
|
|
322
381
|
] });
|
|
323
382
|
}
|
|
324
383
|
function SwipeRow({
|
|
@@ -880,29 +939,67 @@ function DraggableRow({
|
|
|
880
939
|
}
|
|
881
940
|
);
|
|
882
941
|
}
|
|
883
|
-
|
|
942
|
+
var ListGroupContext = React.createContext(null);
|
|
943
|
+
function List({
|
|
944
|
+
children,
|
|
945
|
+
role,
|
|
946
|
+
platform,
|
|
947
|
+
density,
|
|
948
|
+
disabled,
|
|
949
|
+
interactive,
|
|
950
|
+
leading,
|
|
951
|
+
trailing,
|
|
952
|
+
tone,
|
|
953
|
+
selected
|
|
954
|
+
}) {
|
|
955
|
+
const theme = useLoamTheme("list-row");
|
|
884
956
|
const { styles } = useStyles(sheet, { divider: false, disabled: false });
|
|
957
|
+
const android = isAndroidIdiom(theme, platform);
|
|
885
958
|
const items = React.Children.toArray(children).filter(Boolean);
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
959
|
+
const isRow = (child) => React.isValidElement(child) && child.type === ListRow;
|
|
960
|
+
return /* @__PURE__ */ jsxs(
|
|
961
|
+
View,
|
|
962
|
+
{
|
|
963
|
+
role,
|
|
964
|
+
accessibilityRole: role,
|
|
965
|
+
style: [
|
|
966
|
+
styles.list,
|
|
967
|
+
android ? styles.listAndroid : null,
|
|
968
|
+
tone && { backgroundColor: theme.color[`${tone}Soft`], borderColor: theme.edge[tone] }
|
|
969
|
+
],
|
|
970
|
+
children: [
|
|
971
|
+
leading != null ? /* @__PURE__ */ jsx(View, { style: styles.listSlot, children: leading }) : null,
|
|
972
|
+
items.map((child, i) => /* @__PURE__ */ jsxs(
|
|
973
|
+
ListGroupContext.Provider,
|
|
974
|
+
{
|
|
975
|
+
value: { platform, separator: i < items.length - 1, density, disabled, interactive, selected },
|
|
976
|
+
children: [
|
|
977
|
+
child,
|
|
978
|
+
i < items.length - 1 && !isRow(child) && !android ? (
|
|
979
|
+
// Hidden, not just unlabelled. The dividers are interleaved between
|
|
980
|
+
// the children, so under `role="list"` they would be owned children
|
|
981
|
+
// of the list alongside the items — and a `list` may own only
|
|
982
|
+
// `listitem`s. Hiding them keeps `aria-required-children` satisfied
|
|
983
|
+
// while `role="list"` satisfies `aria-required-parent`, which is the
|
|
984
|
+
// trade the board and notification-center notes both warn about.
|
|
985
|
+
/* @__PURE__ */ jsx(
|
|
986
|
+
View,
|
|
987
|
+
{
|
|
988
|
+
"aria-hidden": true,
|
|
989
|
+
accessibilityElementsHidden: true,
|
|
990
|
+
importantForAccessibility: "no-hide-descendants",
|
|
991
|
+
style: styles.listDivider
|
|
992
|
+
}
|
|
993
|
+
)
|
|
994
|
+
) : null
|
|
995
|
+
]
|
|
996
|
+
},
|
|
997
|
+
i
|
|
998
|
+
)),
|
|
999
|
+
trailing != null ? /* @__PURE__ */ jsx(View, { style: styles.listSlot, children: trailing }) : null
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
);
|
|
906
1003
|
}
|
|
907
1004
|
var sheet = createStyleSheet((theme) => ({
|
|
908
1005
|
base: {
|
|
@@ -920,14 +1017,6 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
920
1017
|
comfortable: { minHeight: theme.layout.listRowH, paddingVertical: theme.space.s3 },
|
|
921
1018
|
compact: { minHeight: theme.ctl.lg, paddingVertical: theme.space.s2 }
|
|
922
1019
|
},
|
|
923
|
-
// A selected row is drawn on an opaque `surface` — not the translucent
|
|
924
|
-
// `selected` wash — so its `text2` subtitle keeps a full AA margin (5.65:1
|
|
925
|
-
// in light) instead of the 4.28:1 the wash would leave it with over the
|
|
926
|
-
// page background. The accent signal is the start-edge bar + filled check.
|
|
927
|
-
selected: {
|
|
928
|
-
true: { backgroundColor: theme.color.surface },
|
|
929
|
-
false: {}
|
|
930
|
-
},
|
|
931
1020
|
divider: {
|
|
932
1021
|
true: { borderBottomWidth: theme.borderWidth.thin, borderBottomColor: theme.color.border },
|
|
933
1022
|
false: {}
|
|
@@ -938,16 +1027,13 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
938
1027
|
}
|
|
939
1028
|
}
|
|
940
1029
|
},
|
|
941
|
-
pressed: { backgroundColor: theme.
|
|
1030
|
+
pressed: { backgroundColor: theme.state.pressed },
|
|
942
1031
|
slot: { flexShrink: 0 },
|
|
943
1032
|
main: { flex: 1, minWidth: 0, gap: theme.space.s1 },
|
|
944
|
-
// Row title
|
|
1033
|
+
// Row title: the font family, ink and platform role come from resolveTextRole
|
|
1034
|
+
// at render (body 17 / 400 iOS, bodyLarge Android); only the ink is fixed here.
|
|
945
1035
|
title: {
|
|
946
1036
|
fontFamily: theme.font.sans,
|
|
947
|
-
fontWeight: theme.type.headline.fontWeight,
|
|
948
|
-
fontSize: theme.type.headline.fontSize,
|
|
949
|
-
lineHeight: theme.type.headline.lineHeight,
|
|
950
|
-
letterSpacing: theme.type.headline.letterSpacing,
|
|
951
1037
|
color: theme.color.text
|
|
952
1038
|
},
|
|
953
1039
|
// Row subtitle = the "Subheadline" role (supporting text under the title).
|
|
@@ -962,10 +1048,25 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
962
1048
|
backgroundColor: theme.color.surface,
|
|
963
1049
|
borderWidth: theme.borderWidth.thin,
|
|
964
1050
|
borderColor: theme.color.border,
|
|
965
|
-
borderRadius: theme.radius.
|
|
1051
|
+
borderRadius: theme.radius.lg,
|
|
966
1052
|
overflow: "hidden"
|
|
967
1053
|
},
|
|
1054
|
+
listSlot: { paddingHorizontal: theme.space.s4, paddingVertical: theme.space.s2 },
|
|
968
1055
|
listDivider: { height: theme.space[1], backgroundColor: theme.color.border },
|
|
1056
|
+
// Android: no dividers — the rows sit on surface tiles separated by space.
|
|
1057
|
+
listAndroid: {
|
|
1058
|
+
backgroundColor: "transparent",
|
|
1059
|
+
borderWidth: 0,
|
|
1060
|
+
gap: theme.space[2]
|
|
1061
|
+
},
|
|
1062
|
+
separator: {
|
|
1063
|
+
position: "absolute",
|
|
1064
|
+
end: 0,
|
|
1065
|
+
bottom: 0,
|
|
1066
|
+
height: theme.borderWidth.thin,
|
|
1067
|
+
backgroundColor: theme.color.border,
|
|
1068
|
+
pointerEvents: "none"
|
|
1069
|
+
},
|
|
969
1070
|
/* ---- selection affordance ---- */
|
|
970
1071
|
/**
|
|
971
1072
|
* The leading selection circle. `w2` is the static ring weight (part of the
|
|
@@ -991,20 +1092,6 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
991
1092
|
}
|
|
992
1093
|
}
|
|
993
1094
|
},
|
|
994
|
-
/**
|
|
995
|
-
* The start-edge accent bar marking a selected row. Absolutely positioned so
|
|
996
|
-
* it adds no layout shift between selected/unselected, and `accent` clears the
|
|
997
|
-
* 3:1 non-text-contrast bar against the surface in both modes.
|
|
998
|
-
*/
|
|
999
|
-
selectBar: {
|
|
1000
|
-
position: "absolute",
|
|
1001
|
-
top: 0,
|
|
1002
|
-
bottom: 0,
|
|
1003
|
-
start: 0,
|
|
1004
|
-
width: theme.space.s1,
|
|
1005
|
-
backgroundColor: theme.color.accent,
|
|
1006
|
-
pointerEvents: "none"
|
|
1007
|
-
},
|
|
1008
1095
|
/* ---- drag layer ---- */
|
|
1009
1096
|
/** The draggable root at rest — transparent, so a grouped List's surface shows. */
|
|
1010
1097
|
dragRoot: { backgroundColor: "transparent" },
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Thinking } from './chunk-
|
|
1
|
+
import { Thinking } from './chunk-LUZFCCSD.js';
|
|
2
|
+
import { Spinner } from './chunk-G7H3NX3G.js';
|
|
2
3
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
3
|
-
import { Icon } from './chunk-
|
|
4
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
4
5
|
import * as React from 'react';
|
|
5
|
-
import { Animated, Easing, View, Text, Pressable } from 'react-native';
|
|
6
|
+
import { Platform, Animated, Easing, View, Text, Pressable } from 'react-native';
|
|
6
7
|
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
7
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
9
|
|
|
@@ -49,7 +50,11 @@ function SaveStatus({
|
|
|
49
50
|
queued,
|
|
50
51
|
onRetry,
|
|
51
52
|
variant = "inline",
|
|
53
|
+
platform,
|
|
52
54
|
size = "md",
|
|
55
|
+
labelTone = "tinted",
|
|
56
|
+
savingIndicator = "pulse",
|
|
57
|
+
errorGlyph = "triangle",
|
|
53
58
|
motion = "full",
|
|
54
59
|
accessibilityLabel,
|
|
55
60
|
labels: labelsProp,
|
|
@@ -65,9 +70,12 @@ function SaveStatus({
|
|
|
65
70
|
const animate = motion === "full" && !theme.reduceMotion;
|
|
66
71
|
const label = status === "saved" && savedAt != null ? labels.savedAt(formatSavedAt(savedAt, labels)) : status === "offline" && queued != null && queued > 0 ? labels.offlineQueued(queued) : labels.states[status];
|
|
67
72
|
const chipPad = variant === "toolbar" ? {
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
// Final 03 (R12): the chip sits on the control tier — ctl-sm / ctl-md, px 10 / 12.
|
|
74
|
+
height: size === "sm" ? theme.ctl.sm : theme.ctl.md,
|
|
75
|
+
paddingHorizontal: size === "sm" ? theme.space[10] : theme.space.s3
|
|
70
76
|
} : null;
|
|
77
|
+
const android = platform !== void 0 ? platform === "android" : Platform.OS === "android" || Platform.OS !== "ios" && theme.platform === "Android";
|
|
78
|
+
const retryHit = Math.max(8, Math.round((theme.tapMin - theme.type.footnote.lineHeight) / 2));
|
|
71
79
|
const fade = React.useRef(new Animated.Value(1)).current;
|
|
72
80
|
const mounted = React.useRef(false);
|
|
73
81
|
React.useEffect(() => {
|
|
@@ -96,7 +104,7 @@ function SaveStatus({
|
|
|
96
104
|
testID,
|
|
97
105
|
style: [styles.root, chipPad, style],
|
|
98
106
|
children: [
|
|
99
|
-
/* @__PURE__ */ jsx(Animated.View, { style: [styles.line, animate ? { opacity: fade } : null], children: meta.spin ? (
|
|
107
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.line, animate ? { opacity: fade } : null], children: meta.spin && savingIndicator === "pulse" ? (
|
|
100
108
|
// `saving` is the single-signal `thinking` recipe: a gently pulsing
|
|
101
109
|
// label says "working". A spinning icon beside it would say it twice.
|
|
102
110
|
// Compose the Thinking primitive as a muted, embedded indicator
|
|
@@ -116,8 +124,23 @@ function SaveStatus({
|
|
|
116
124
|
}
|
|
117
125
|
)
|
|
118
126
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
119
|
-
/* @__PURE__ */ jsx(View, { testID: "save-status-icon", children: /* @__PURE__ */ jsx(
|
|
120
|
-
|
|
127
|
+
/* @__PURE__ */ jsx(View, { testID: "save-status-icon", children: meta.spin ? /* @__PURE__ */ jsx(
|
|
128
|
+
Spinner,
|
|
129
|
+
{
|
|
130
|
+
size: "sm",
|
|
131
|
+
color: tone,
|
|
132
|
+
motion,
|
|
133
|
+
accessibilityLabel: label
|
|
134
|
+
}
|
|
135
|
+
) : /* @__PURE__ */ jsx(
|
|
136
|
+
Icon,
|
|
137
|
+
{
|
|
138
|
+
name: status === "error" && errorGlyph === "circle" ? "alert-circle" : meta.icon,
|
|
139
|
+
size: iconSize,
|
|
140
|
+
color: tone
|
|
141
|
+
}
|
|
142
|
+
) }),
|
|
143
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.label, labelTone === "ink" ? { color: theme.color.text } : null], children: label })
|
|
121
144
|
] }) }),
|
|
122
145
|
status === "error" && onRetry ? /* @__PURE__ */ jsxs(
|
|
123
146
|
Pressable,
|
|
@@ -125,14 +148,23 @@ function SaveStatus({
|
|
|
125
148
|
accessibilityRole: "button",
|
|
126
149
|
accessibilityLabel: labels.retry,
|
|
127
150
|
onPress: onRetry,
|
|
128
|
-
hitSlop:
|
|
151
|
+
hitSlop: retryHit,
|
|
129
152
|
style: ({ pressed }) => [
|
|
130
153
|
styles.retry,
|
|
131
154
|
pressed ? { opacity: theme.state.pressedOpacity } : null
|
|
132
155
|
],
|
|
133
156
|
children: [
|
|
134
157
|
/* @__PURE__ */ jsx(Icon, { name: "refresh", size: iconSize, color: theme.color.danger }),
|
|
135
|
-
/* @__PURE__ */ jsx(
|
|
158
|
+
/* @__PURE__ */ jsx(
|
|
159
|
+
Text,
|
|
160
|
+
{
|
|
161
|
+
style: [
|
|
162
|
+
styles.retryLabel,
|
|
163
|
+
{ fontWeight: android ? theme.fontWeight.medium : theme.fontWeight.semibold }
|
|
164
|
+
],
|
|
165
|
+
children: labels.retry
|
|
166
|
+
}
|
|
167
|
+
)
|
|
136
168
|
]
|
|
137
169
|
}
|
|
138
170
|
) : null
|
|
@@ -151,7 +183,7 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
151
183
|
variant: {
|
|
152
184
|
inline: {},
|
|
153
185
|
toolbar: {
|
|
154
|
-
borderRadius: theme.radius.
|
|
186
|
+
borderRadius: theme.radius.sm,
|
|
155
187
|
borderWidth: theme.borderWidth.base,
|
|
156
188
|
borderColor: theme.color.border,
|
|
157
189
|
backgroundColor: theme.color.surface2
|
|
@@ -191,9 +223,7 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
191
223
|
},
|
|
192
224
|
retryLabel: {
|
|
193
225
|
fontFamily: theme.font.sans,
|
|
194
|
-
fontWeight: theme.fontWeight.bold,
|
|
195
226
|
color: theme.color.danger,
|
|
196
|
-
textDecorationLine: "underline",
|
|
197
227
|
fontSize: theme.type.footnote.fontSize,
|
|
198
228
|
lineHeight: theme.type.footnote.lineHeight,
|
|
199
229
|
letterSpacing: theme.type.footnote.letterSpacing
|