@btndprojects/loam-ui-native 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.js +4 -2
- package/dist/adaptive/index.js +12 -2
- package/dist/address-block/index.js +23 -0
- package/dist/alert/index.js +5 -2
- package/dist/analyzer/index.js +13 -5
- package/dist/announcement/index.js +15 -5
- package/dist/appearance-picker/index.js +15 -0
- package/dist/audio-player/index.js +26 -2
- package/dist/avatar/index.js +2 -2
- package/dist/avatar-group/index.js +5 -3
- package/dist/badge/index.js +6 -3
- package/dist/banner/index.js +3 -2
- package/dist/board/index.js +13 -6
- package/dist/button/index.js +6 -3
- package/dist/camera-permission/index.js +19 -11
- package/dist/capture-result/index.js +26 -16
- package/dist/card/index.js +7 -3
- package/dist/card-form/index.js +15 -9
- package/dist/carousel/index.js +3 -1
- package/dist/chart/index.js +15 -5
- package/dist/charts/index.js +18 -5
- package/dist/chat/index.js +35 -10
- package/dist/checkbox/index.js +6 -4
- package/dist/checklist/index.js +16 -7
- package/dist/checkout/index.js +25 -12
- package/dist/chip/index.js +7 -4
- package/dist/chunk-2BZD3NAP.js +1110 -0
- package/dist/chunk-2YKVID2V.js +35 -0
- package/dist/{chunk-H7DWSL4O.js → chunk-36DA3IPO.js} +115 -27
- package/dist/chunk-3A56MIAN.js +599 -0
- package/dist/{chunk-AEB7KCHQ.js → chunk-3SCKCWF5.js} +39 -28
- package/dist/chunk-3TZNDHKO.js +187 -0
- package/dist/chunk-43K3BLXV.js +9 -0
- package/dist/chunk-46ZJIQ2Z.js +208 -0
- package/dist/{chunk-PMMTGBBS.js → chunk-4CZMQDQL.js} +75 -22
- package/dist/chunk-4QCR3K2J.js +1 -0
- package/dist/{chunk-E2E3I5W2.js → chunk-5DTKORLI.js} +54 -45
- package/dist/{chunk-5VFZRGVD.js → chunk-5J4WFXFA.js} +32 -15
- package/dist/{chunk-JBMLWFSJ.js → chunk-5KJ7TEQ6.js} +83 -48
- package/dist/chunk-5NU33TXK.js +529 -0
- package/dist/chunk-6KSUS7DF.js +690 -0
- package/dist/{chunk-3WEZCGHX.js → chunk-6RV6UW2J.js} +140 -56
- package/dist/chunk-6RZM7RP2.js +520 -0
- package/dist/{chunk-JJLPBRVZ.js → chunk-75BDCC7K.js} +2 -0
- package/dist/{chunk-U5NLHYV6.js → chunk-7CGJBQUA.js} +333 -22
- package/dist/{chunk-I4FHVKEC.js → chunk-7IVF6JLJ.js} +16 -5
- package/dist/chunk-7IWCGXYA.js +143 -0
- package/dist/chunk-7LM4ASFH.js +172 -0
- package/dist/chunk-7MCEJFWV.js +341 -0
- package/dist/{chunk-2SY63FCH.js → chunk-7NGMUVNU.js} +66 -30
- package/dist/chunk-7PBSIXT7.js +355 -0
- package/dist/chunk-7QOYGENL.js +443 -0
- package/dist/{chunk-TDMG26JI.js → chunk-A7SWYDE5.js} +40 -9
- package/dist/chunk-ADHPJALR.js +3051 -0
- package/dist/{chunk-ZLTO5VQI.js → chunk-ALJYZLNQ.js} +131 -61
- package/dist/{chunk-GDKVKNR2.js → chunk-AQ5FIG74.js} +110 -30
- package/dist/chunk-B2MMZZQB.js +426 -0
- package/dist/{chunk-QYPE5JX3.js → chunk-B7JZ3N5G.js} +142 -105
- package/dist/{chunk-QHTVYA65.js → chunk-BL37SW6G.js} +388 -102
- package/dist/chunk-BTRMA7GC.js +21 -0
- package/dist/{chunk-FUMHAAF3.js → chunk-C7IUWIUZ.js} +243 -92
- package/dist/chunk-CA3DUVYD.js +10 -0
- package/dist/{chunk-FYWNRX4F.js → chunk-CBCJSO2B.js} +143 -13
- package/dist/chunk-CHPX4MFI.js +239 -0
- package/dist/chunk-CLGAMIOT.js +648 -0
- package/dist/chunk-CUE7VML6.js +1141 -0
- package/dist/{chunk-D5N5QWI7.js → chunk-CVU6S2E5.js} +497 -235
- package/dist/{chunk-U23FYWME.js → chunk-CXPQMA6Z.js} +101 -34
- package/dist/{chunk-36EC2T6P.js → chunk-D2LN4I7I.js} +1 -1
- package/dist/{chunk-TLCIR6RG.js → chunk-D34LNBO5.js} +411 -155
- package/dist/{chunk-FV6HMP7W.js → chunk-D4BCQICM.js} +207 -65
- package/dist/chunk-EABKIIA4.js +1 -0
- package/dist/chunk-EICSYRAG.js +341 -0
- package/dist/chunk-EMWAJMAS.js +83 -0
- package/dist/chunk-EOLZWRV6.js +149 -0
- package/dist/chunk-EOQVTGB6.js +350 -0
- package/dist/{chunk-ZVATDZOM.js → chunk-ESGUHNB2.js} +106 -28
- package/dist/{chunk-46MMSDGL.js → chunk-F2KNBPKY.js} +104 -73
- package/dist/{chunk-KQZ3GLHR.js → chunk-G7H3NX3G.js} +40 -17
- package/dist/{chunk-3QMEOFW5.js → chunk-GM7YIPB7.js} +421 -207
- package/dist/{chunk-QHAITQIF.js → chunk-GVQQG435.js} +256 -86
- package/dist/chunk-HE43OMEL.js +1056 -0
- package/dist/{chunk-XIDTBCBA.js → chunk-HHOMFQ7R.js} +1049 -207
- package/dist/chunk-HNAKS4Z3.js +207 -0
- package/dist/chunk-HP6ST2OW.js +352 -0
- package/dist/chunk-HW3OWDTU.js +1 -0
- package/dist/{chunk-QP3KMOVF.js → chunk-HZDB44K4.js} +24 -14
- package/dist/chunk-I6CUP2LW.js +1155 -0
- package/dist/chunk-ICV4Y2WY.js +27 -0
- package/dist/chunk-IHSIENOE.js +3950 -0
- package/dist/{chunk-T5LTPKX6.js → chunk-IMMALLRU.js} +53 -25
- package/dist/{chunk-C4GTDLRC.js → chunk-JA6TK7H2.js} +154 -67
- package/dist/{chunk-EVOIGUBI.js → chunk-JAVZ5JPV.js} +43 -13
- package/dist/{chunk-CPTOADB2.js → chunk-JCMTP3E4.js} +527 -201
- package/dist/{chunk-OJQUBQWA.js → chunk-JCXFFK64.js} +73 -16
- package/dist/{chunk-V2OEB75Z.js → chunk-JWCVBFDU.js} +75 -35
- package/dist/chunk-JXRTD5RI.js +414 -0
- package/dist/chunk-JYIUZUIQ.js +1567 -0
- package/dist/chunk-K3TK3GIV.js +219 -0
- package/dist/chunk-KEVZIHM2.js +1511 -0
- package/dist/{chunk-VAOAKWUK.js → chunk-KHZDNQQD.js} +42 -8
- package/dist/chunk-KL4GDV4V.js +131 -0
- package/dist/{chunk-Q6NKEPRE.js → chunk-KNILMM4H.js} +73 -28
- package/dist/chunk-KRBUZV45.js +25 -0
- package/dist/{chunk-7BUIKDD6.js → chunk-KXLDK6HB.js} +91 -30
- package/dist/chunk-KZ3X7TSL.js +196 -0
- package/dist/{chunk-5UTRIXQ6.js → chunk-L2WMOA2V.js} +187 -43
- package/dist/chunk-L4D5LHCH.js +109 -0
- package/dist/{chunk-W63AJTM7.js → chunk-LAUJPLDB.js} +236 -71
- package/dist/{chunk-TN2ZNJUI.js → chunk-LGNTP5XA.js} +47 -13
- package/dist/chunk-LUZFCCSD.js +271 -0
- package/dist/{chunk-XTORZWRF.js → chunk-LXJCP4PL.js} +111 -30
- package/dist/chunk-MCOZJWPU.js +731 -0
- package/dist/{chunk-SATMR6SG.js → chunk-MG4SKWLL.js} +780 -142
- package/dist/{chunk-JUYWSSKW.js → chunk-MPEPTSER.js} +95 -16
- package/dist/chunk-MWPJ4YGP.js +1 -0
- package/dist/{chunk-LUMVGO2K.js → chunk-N7AX4OA4.js} +80 -29
- package/dist/chunk-NHSLM6SE.js +523 -0
- package/dist/{chunk-IT6FUXXG.js → chunk-NNJLVA7M.js} +43 -11
- package/dist/{chunk-TQVAIKFD.js → chunk-NZG75DGA.js} +102 -62
- package/dist/chunk-O76QXRBV.js +431 -0
- package/dist/chunk-OANH27AK.js +223 -0
- package/dist/chunk-OCHPK5YV.js +609 -0
- package/dist/chunk-OMHVEVX4.js +436 -0
- package/dist/{chunk-SWS5JQIF.js → chunk-ONKQUJWD.js} +187 -60
- package/dist/chunk-OVTK7A6T.js +615 -0
- package/dist/{chunk-UXGIW7OK.js → chunk-PCEFCOLN.js} +5 -1
- package/dist/{chunk-QIKT7LIB.js → chunk-PFLNFIVB.js} +91 -23
- package/dist/chunk-PHSZY37H.js +300 -0
- package/dist/chunk-PJLTKDVY.js +18 -0
- package/dist/{chunk-SHHY5OMK.js → chunk-PK7BN3MI.js} +83 -15
- package/dist/{chunk-YXOAPXMU.js → chunk-PWFRDRGS.js} +101 -14
- package/dist/{chunk-TY4MTKQJ.js → chunk-PYPMD46W.js} +332 -66
- package/dist/chunk-Q6CCHDI7.js +331 -0
- package/dist/chunk-QFA5WS2A.js +750 -0
- package/dist/chunk-QJMMM4RC.js +124 -0
- package/dist/chunk-QYWEVAM6.js +407 -0
- package/dist/chunk-R5T4VZ7Z.js +126 -0
- package/dist/chunk-R77HFLZD.js +1 -0
- package/dist/{chunk-LMPHCVJJ.js → chunk-RAESDNU5.js} +162 -68
- package/dist/chunk-RBYQUXNL.js +1 -0
- package/dist/chunk-RCM3DT5E.js +1 -0
- package/dist/chunk-RGNY56L7.js +282 -0
- package/dist/chunk-RIK6UX2K.js +344 -0
- package/dist/{chunk-5LAAAXFP.js → chunk-RJA3RXO3.js} +63 -54
- package/dist/chunk-RJYRJ3LD.js +1 -0
- package/dist/chunk-RMA3NOY4.js +599 -0
- package/dist/{chunk-VDPK5CY4.js → chunk-RSWKKAHK.js} +143 -61
- package/dist/{chunk-B7N4ASYE.js → chunk-RVOIIX3V.js} +17 -45
- package/dist/chunk-SA2RRBGT.js +1077 -0
- package/dist/{chunk-7OVVSVEZ.js → chunk-SG3J4R45.js} +440 -169
- package/dist/chunk-SPUK7JD4.js +238 -0
- package/dist/chunk-SWXV2K5N.js +434 -0
- package/dist/chunk-SYJEPXP6.js +1303 -0
- package/dist/{chunk-LKFC4CS7.js → chunk-SZLI34TA.js} +18 -9
- package/dist/{chunk-NBEF4EPJ.js → chunk-T77WJA74.js} +131 -16
- package/dist/chunk-TDWWVJA4.js +630 -0
- package/dist/chunk-TFHI5XDR.js +610 -0
- package/dist/chunk-TH4PW2WU.js +17 -0
- package/dist/chunk-TTQ24HQX.js +12 -0
- package/dist/chunk-TUACVJNG.js +12 -0
- package/dist/{chunk-F5B3UINI.js → chunk-TUL5RUIA.js} +171 -62
- package/dist/{chunk-C6APNDVA.js → chunk-TYOSA7JG.js} +63 -34
- package/dist/chunk-TYQTMMEV.js +1 -0
- package/dist/{chunk-DW3L54DQ.js → chunk-TZO6YDS7.js} +53 -12
- package/dist/{chunk-67IZZ2MJ.js → chunk-U3ETF22F.js} +75 -30
- package/dist/{chunk-EDCBJV7J.js → chunk-U6BYHD2N.js} +87 -31
- package/dist/{chunk-ENP3BMZU.js → chunk-UF6EJXPQ.js} +16 -1
- package/dist/{chunk-IPUNJMAQ.js → chunk-UNNQIPGK.js} +304 -68
- package/dist/chunk-UQVO6AJV.js +171 -0
- package/dist/{chunk-FZGAAOKS.js → chunk-VFDQAAIW.js} +138 -32
- package/dist/chunk-VIUE3VQT.js +1 -0
- package/dist/{chunk-5RENVKBQ.js → chunk-VJLSSSGC.js} +126 -30
- package/dist/chunk-VLMT6KYT.js +350 -0
- package/dist/chunk-VMHGBUGS.js +35 -0
- package/dist/{chunk-4IZXHVFJ.js → chunk-VQKPBYW6.js} +228 -172
- package/dist/{chunk-G6UESEVN.js → chunk-VSSTWLC5.js} +49 -11
- package/dist/{chunk-TRGFFU6A.js → chunk-VZYYZRPN.js} +866 -330
- package/dist/{chunk-JLC6PM5S.js → chunk-WAIJCD2V.js} +128 -54
- package/dist/chunk-WFMQ3WKM.js +378 -0
- package/dist/chunk-WJ2KDRMY.js +66 -0
- package/dist/chunk-WKFZJO54.js +437 -0
- package/dist/{chunk-QEYFDRHR.js → chunk-WVVD3XOV.js} +146 -84
- package/dist/chunk-XAIWMSLB.js +1 -0
- package/dist/chunk-XBXUBBJZ.js +98 -0
- package/dist/chunk-XCU7MYBJ.js +1 -0
- package/dist/chunk-XHE4PGCI.js +717 -0
- package/dist/chunk-XRSJ32M3.js +331 -0
- package/dist/chunk-XTCVOEAW.js +1 -0
- package/dist/chunk-XWGXVQF6.js +58 -0
- package/dist/{chunk-MKSNFG7H.js → chunk-Y3XKKO5K.js} +191 -109
- package/dist/chunk-Y4QNMBLO.js +533 -0
- package/dist/chunk-Y5H4CTKO.js +1 -0
- package/dist/chunk-YBQIN75A.js +403 -0
- package/dist/{chunk-PNF3NKB5.js → chunk-YJ5PXOX3.js} +28 -11
- package/dist/{chunk-M656FYNH.js → chunk-YLRSRUPS.js} +63 -49
- package/dist/chunk-YM6MPJ4A.js +1 -0
- package/dist/chunk-YV7KZENV.js +200 -0
- package/dist/chunk-Z7I4ZSO6.js +316 -0
- package/dist/{chunk-EY4DD67D.js → chunk-ZIRMWD2B.js} +199 -126
- package/dist/chunk-ZPMG3FWU.js +75 -0
- package/dist/{chunk-QRUMA22E.js → chunk-ZTXMK2G7.js} +92 -43
- package/dist/{chunk-2OLKPG4E.js → chunk-ZVJCWXAL.js} +189 -87
- package/dist/{chunk-YAAHPATV.js → chunk-ZYQ23DPT.js} +49 -34
- package/dist/coachmark/index.js +7 -3
- package/dist/code-block/index.js +4 -3
- package/dist/color-field/index.js +12 -4
- package/dist/color-picker/index.js +23 -0
- package/dist/commerce/index.js +27 -16
- package/dist/confirm/index.js +31 -0
- package/dist/connection-card/index.js +34 -0
- package/dist/connectivity/index.js +3 -2
- package/dist/context-menu/index.js +10 -2
- package/dist/copy-button/index.js +3 -2
- package/dist/data-grid/index.js +30 -17
- package/dist/date-range-picker/index.js +19 -9
- package/dist/description-list/index.js +4 -1
- package/dist/device-frame/index.js +30 -0
- package/dist/dialog/index.js +8 -2
- package/dist/divider/index.js +2 -0
- package/dist/empty-state/index.js +13 -2
- package/dist/error-summary/index.js +7 -2
- package/dist/fab/index.js +4 -2
- package/dist/file-manager/index.js +33 -17
- package/dist/file-upload/index.js +12 -6
- package/dist/filter-bar/index.js +10 -6
- package/dist/flow-run/index.js +19 -12
- package/dist/form/index.js +30 -3
- package/dist/gallery/index.js +5 -2
- package/dist/hold-to-confirm/index.js +4 -2
- package/dist/hover-card/index.js +18 -0
- package/dist/icon-tile/index.js +10 -0
- package/dist/image/index.js +9 -0
- package/dist/index.d.ts +29826 -17941
- package/dist/index.js +197 -141
- package/dist/infinite-list/index.js +4 -2
- package/dist/inline-edit/index.js +5 -4
- package/dist/input/index.js +4 -3
- package/dist/interactions/index.js +4 -1
- package/dist/invoice/index.js +18 -9
- package/dist/job-row/index.js +22 -0
- package/dist/json-inspector/index.js +20 -0
- package/dist/kbd/index.js +2 -2
- package/dist/keyboard/index.js +7 -2
- package/dist/level-meter/index.js +9 -0
- package/dist/list-row/index.js +11 -3
- package/dist/log-viewer/index.js +9 -2
- package/dist/map-view/index.js +13 -2
- package/dist/markdown/index.js +8 -5
- package/dist/metric/index.js +6 -3
- package/dist/metric-strip/index.js +12 -0
- package/dist/money/index.js +11 -4
- package/dist/nav-drawer/index.js +6 -2
- package/dist/nav-header/index.js +10 -4
- package/dist/navigation/index.js +29 -2
- package/dist/notification-center/index.js +24 -10
- package/dist/number-roll/index.js +3 -1
- package/dist/onboarding-pager/index.js +22 -0
- package/dist/one-handed/index.js +2 -2
- package/dist/os-surfaces/index.js +6 -3
- package/dist/otp/index.js +5 -4
- package/dist/page-header/index.js +2 -1
- package/dist/pagination/index.js +4 -2
- package/dist/payment-method/index.js +17 -11
- package/dist/payment-status/index.js +22 -14
- package/dist/permission/index.js +18 -2
- package/dist/picker/index.js +17 -6
- package/dist/progress/index.js +7 -2
- package/dist/provenance/index.js +16 -0
- package/dist/pull-to-refresh/index.js +2 -2
- package/dist/qr-code/index.js +16 -0
- package/dist/query-builder/index.js +30 -0
- package/dist/radio-group/index.js +6 -4
- package/dist/rating/index.js +7 -2
- package/dist/receivables/index.js +31 -18
- package/dist/recording-indicator/index.js +21 -0
- package/dist/refund/index.js +24 -15
- package/dist/repeatable-rows/index.js +19 -0
- package/dist/save-status/index.js +5 -3
- package/dist/screen/index.js +3 -0
- package/dist/scroll-area/index.js +1 -1
- package/dist/search-field/index.js +8 -3
- package/dist/secret-field/index.js +19 -0
- package/dist/section-header/index.js +4 -0
- package/dist/segmented-control/index.js +2 -2
- package/dist/sheet/index.js +9 -3
- package/dist/shortcuts-sheet/index.js +2 -0
- package/dist/sign-in-screen/index.js +25 -0
- package/dist/skeleton/index.js +3 -1
- package/dist/slider/index.js +2 -1
- package/dist/sortable/index.js +4 -3
- package/dist/spinner/index.js +2 -1
- package/dist/split-button/index.js +17 -5
- package/dist/spotlight/index.js +7 -1
- package/dist/stack/index.js +2 -0
- package/dist/stage-timeline/index.js +6 -3
- package/dist/status-dot/index.js +6 -2
- package/dist/stepper/index.js +7 -3
- package/dist/streaming-text/index.js +2 -1
- package/dist/survey/index.js +24 -14
- package/dist/switch/index.js +6 -2
- package/dist/system-state/index.js +12 -4
- package/dist/tab-bar/index.js +10 -2
- package/dist/tabs/index.js +10 -2
- package/dist/tags-input/index.js +8 -5
- package/dist/text/index.js +4 -0
- package/dist/textarea/index.js +5 -4
- package/dist/thinking/index.js +4 -1
- package/dist/tile-rail/index.js +10 -0
- package/dist/time-field/index.js +15 -7
- package/dist/time-range-control/index.js +26 -12
- package/dist/timeline/index.js +2 -2
- package/dist/toast/index.js +4 -2
- package/dist/toolbar/index.js +3 -2
- package/dist/tour/index.js +12 -10
- package/dist/transcript/index.js +28 -0
- package/dist/truncation-notice/index.js +2 -2
- package/dist/update-notice/index.js +15 -8
- package/dist/video-player/index.js +26 -2
- package/dist/viewfinder/index.js +12 -4
- package/dist/widget/index.js +11 -4
- package/dist/wizard/index.js +7 -4
- package/package.json +13 -13
- package/dist/chunk-2PKYGLQ6.js +0 -268
- package/dist/chunk-2SWKL3AJ.js +0 -466
- package/dist/chunk-2TXERVVA.js +0 -1081
- package/dist/chunk-3DUWIYV5.js +0 -437
- package/dist/chunk-3NMD74ZU.js +0 -4
- package/dist/chunk-4DS5ZWVC.js +0 -83
- package/dist/chunk-6YAQBXB3.js +0 -93
- package/dist/chunk-74FLKD24.js +0 -237
- package/dist/chunk-CMTVNF3D.js +0 -104
- package/dist/chunk-DN7MNQIP.js +0 -799
- package/dist/chunk-DVGBZ3TX.js +0 -455
- package/dist/chunk-F3H33DQX.js +0 -300
- package/dist/chunk-FAJI7BSC.js +0 -443
- package/dist/chunk-G3AFC24V.js +0 -60
- package/dist/chunk-HJLPZA4X.js +0 -369
- package/dist/chunk-HYEOQWT7.js +0 -647
- package/dist/chunk-IDM7JJMO.js +0 -110
- package/dist/chunk-IVKMZ7BB.js +0 -326
- package/dist/chunk-IXKWIFWZ.js +0 -334
- package/dist/chunk-JV5YOTOB.js +0 -164
- package/dist/chunk-KFJGFLMW.js +0 -158
- package/dist/chunk-LQP4KEXZ.js +0 -214
- package/dist/chunk-NTQ2F3AU.js +0 -257
- package/dist/chunk-O5V4TG3V.js +0 -329
- package/dist/chunk-OWAMM2DK.js +0 -280
- package/dist/chunk-PID3NJB7.js +0 -405
- package/dist/chunk-QDZGFXQD.js +0 -176
- package/dist/chunk-QPWDDJJ4.js +0 -385
- package/dist/chunk-ROCUG24E.js +0 -416
- package/dist/chunk-RU3ZPNL6.js +0 -1986
- package/dist/chunk-RXSCIO6W.js +0 -153
- package/dist/chunk-SKWO3SZF.js +0 -2284
- package/dist/chunk-UQGBTPXH.js +0 -218
- package/dist/chunk-UYGDJWMN.js +0 -273
- package/dist/chunk-W74TXYFB.js +0 -107
- package/dist/chunk-WRDSPUE7.js +0 -417
- package/dist/chunk-XBZGDDMR.js +0 -105
- package/dist/chunk-XN4KG3P4.js +0 -1040
- package/dist/chunk-XQXMLMH3.js +0 -211
- package/dist/chunk-ZECZOOSB.js +0 -245
- /package/dist/{chunk-VFCUIDRT.js → chunk-3BKLBYPK.js} +0 -0
- /package/dist/{chunk-GEIGMWNF.js → chunk-QNZII37O.js} +0 -0
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
import { isConnectorTraversed, resolveStepState, NODE_STATE_ICON } from './chunk-YLLCXTMC.js';
|
|
2
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
3
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
4
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
5
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
6
|
+
import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Animated, AccessibilityInfo, Alert, BackHandler, View, Pressable, Text } from 'react-native';
|
|
9
|
+
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
10
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var DEFAULT_LABELS = {
|
|
13
|
+
back: "Back",
|
|
14
|
+
next: "Next",
|
|
15
|
+
finish: "Finish",
|
|
16
|
+
stepOf: (current, total, label) => `Step ${current} of ${total}${label ? `: ${label}` : ""}`,
|
|
17
|
+
completedStep: (label, step, hasErrors) => `${label}, completed${hasErrors ? ", has errors" : ""}. Go to step ${step}`,
|
|
18
|
+
hasErrors: ", has errors",
|
|
19
|
+
cancel: "Cancel",
|
|
20
|
+
close: "Close",
|
|
21
|
+
count: (n, c) => `${n} of ${c}`,
|
|
22
|
+
discardTitle: "Discard changes?",
|
|
23
|
+
keepEditing: "Keep editing",
|
|
24
|
+
discard: "Discard"
|
|
25
|
+
};
|
|
26
|
+
var DOT_SIZE = { sm: 24, md: 30, lg: 36 };
|
|
27
|
+
function clamp(n, lo, hi) {
|
|
28
|
+
return Math.min(hi, Math.max(lo, n));
|
|
29
|
+
}
|
|
30
|
+
function useDotForeground(done, active) {
|
|
31
|
+
const theme = useLoamTheme("wizard");
|
|
32
|
+
if (done) return theme.color.goodInk;
|
|
33
|
+
if (active) return theme.color.accentOnSoft;
|
|
34
|
+
return theme.color.text3;
|
|
35
|
+
}
|
|
36
|
+
function StepDot({
|
|
37
|
+
index,
|
|
38
|
+
current,
|
|
39
|
+
label,
|
|
40
|
+
hasError,
|
|
41
|
+
onPress,
|
|
42
|
+
labels,
|
|
43
|
+
dotSize,
|
|
44
|
+
indicator,
|
|
45
|
+
orientation,
|
|
46
|
+
doneTone,
|
|
47
|
+
errorStyle
|
|
48
|
+
}) {
|
|
49
|
+
const stepState = resolveStepState(index, current);
|
|
50
|
+
const done = stepState === "done";
|
|
51
|
+
const active = stepState === "working";
|
|
52
|
+
const { styles } = useStyles(sheet, { state: done ? "done" : active ? "active" : "upcoming" });
|
|
53
|
+
const theme = useLoamTheme("wizard");
|
|
54
|
+
const errorNode = hasError && errorStyle === "node";
|
|
55
|
+
const accentDone = done && doneTone === "accent" && !errorNode;
|
|
56
|
+
const dotFg = useDotForeground(done, active);
|
|
57
|
+
const fg = errorNode ? theme.color.dangerInk : accentDone ? theme.color.accentInk : dotFg;
|
|
58
|
+
const currentAttr = active ? { "aria-current": "step" } : {};
|
|
59
|
+
const column = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
/* @__PURE__ */ jsxs(
|
|
61
|
+
View,
|
|
62
|
+
{
|
|
63
|
+
style: [
|
|
64
|
+
styles.dot,
|
|
65
|
+
{ width: dotSize, height: dotSize },
|
|
66
|
+
accentDone && { backgroundColor: theme.color.accent, borderColor: theme.color.accent },
|
|
67
|
+
errorNode && { backgroundColor: theme.color.danger, borderColor: theme.color.danger }
|
|
68
|
+
],
|
|
69
|
+
...currentAttr,
|
|
70
|
+
children: [
|
|
71
|
+
indicator === "dots" ? null : errorNode ? /* @__PURE__ */ jsx(Text, { style: [styles.dotNum, { color: fg }], children: "!" }) : done ? /* @__PURE__ */ jsx(Icon, { name: NODE_STATE_ICON.done, size: theme.icon.sm, color: fg }) : /* @__PURE__ */ jsx(Text, { style: [styles.dotNum, { color: fg }], children: index + 1 }),
|
|
72
|
+
hasError && !errorNode ? (
|
|
73
|
+
// A badge on the node rather than a recoloured node: the
|
|
74
|
+
// done/active/pending state stays readable underneath.
|
|
75
|
+
/* @__PURE__ */ jsx(View, { style: styles.errorBadge, children: /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.xs, color: theme.color.dangerInk }) })
|
|
76
|
+
) : null
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
label && indicator !== "dots" ? /* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: [styles.dotLabel, index !== current && styles.dotLabelRest], children: label }) : null
|
|
81
|
+
] });
|
|
82
|
+
if (onPress) {
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
Pressable,
|
|
85
|
+
{
|
|
86
|
+
accessibilityRole: "button",
|
|
87
|
+
accessibilityLabel: labels.completedStep(label, index + 1, hasError),
|
|
88
|
+
onPress,
|
|
89
|
+
style: [styles.dotCol, orientation === "vertical" && styles.dotColRow],
|
|
90
|
+
children: column
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
View,
|
|
96
|
+
{
|
|
97
|
+
style: [styles.dotCol, orientation === "vertical" && styles.dotColRow],
|
|
98
|
+
accessible: hasError,
|
|
99
|
+
accessibilityLabel: hasError ? `${label}${labels.hasErrors}` : void 0,
|
|
100
|
+
children: column
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function Wizard({
|
|
105
|
+
steps,
|
|
106
|
+
step,
|
|
107
|
+
defaultStep = 0,
|
|
108
|
+
onStepChange,
|
|
109
|
+
onFinish,
|
|
110
|
+
backLabel: backLabelProp,
|
|
111
|
+
nextLabel: nextLabelProp,
|
|
112
|
+
finishLabel: finishLabelProp,
|
|
113
|
+
motion = "full",
|
|
114
|
+
keepMounted = true,
|
|
115
|
+
onStepInvalid,
|
|
116
|
+
showHeader = true,
|
|
117
|
+
renderFooter,
|
|
118
|
+
onCancel,
|
|
119
|
+
loading = false,
|
|
120
|
+
disabled = false,
|
|
121
|
+
platform,
|
|
122
|
+
size = "md",
|
|
123
|
+
density = "standard",
|
|
124
|
+
indicator = "numbered",
|
|
125
|
+
variant = "default",
|
|
126
|
+
orientation = "horizontal",
|
|
127
|
+
doneTone = "good",
|
|
128
|
+
errorStyle = "badge",
|
|
129
|
+
labels: labelsProp
|
|
130
|
+
}) {
|
|
131
|
+
const labels = useLabels("wizard", DEFAULT_LABELS, labelsProp);
|
|
132
|
+
const backLabel = backLabelProp ?? labels.back;
|
|
133
|
+
const nextLabel = nextLabelProp ?? labels.next;
|
|
134
|
+
const finishLabel = finishLabelProp ?? labels.finish;
|
|
135
|
+
const isControlled = step !== void 0;
|
|
136
|
+
const last = Math.max(0, steps.length - 1);
|
|
137
|
+
const [internal, setInternal] = React.useState(() => clamp(defaultStep, 0, last));
|
|
138
|
+
const current = clamp(isControlled ? step : internal, 0, last);
|
|
139
|
+
const { styles } = useStyles(sheet);
|
|
140
|
+
const theme = useLoamTheme("wizard");
|
|
141
|
+
const android = isAndroidIdiom(theme, platform);
|
|
142
|
+
const activeStep = steps[current];
|
|
143
|
+
const isFirst = current <= 0;
|
|
144
|
+
const isLast = current >= last;
|
|
145
|
+
const prev = React.useRef(current);
|
|
146
|
+
const opacity = React.useRef(new Animated.Value(1)).current;
|
|
147
|
+
const translateX = React.useRef(new Animated.Value(0)).current;
|
|
148
|
+
const level = useResolvedMotion(motion, "wizard");
|
|
149
|
+
React.useEffect(() => {
|
|
150
|
+
if (prev.current === current) return;
|
|
151
|
+
const direction = current > prev.current ? 1 : -1;
|
|
152
|
+
prev.current = current;
|
|
153
|
+
AccessibilityInfo.announceForAccessibility?.(
|
|
154
|
+
labels.stepOf(current + 1, steps.length, steps[current]?.label)
|
|
155
|
+
);
|
|
156
|
+
if (level === "none") {
|
|
157
|
+
opacity.setValue(1);
|
|
158
|
+
translateX.setValue(0);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
opacity.setValue(0);
|
|
162
|
+
translateX.setValue(level === "full" ? direction * theme.space.s6 : 0);
|
|
163
|
+
Animated.parallel([
|
|
164
|
+
Animated.spring(opacity, {
|
|
165
|
+
...springConfig(theme, "de"),
|
|
166
|
+
toValue: 1,
|
|
167
|
+
useNativeDriver: true
|
|
168
|
+
}),
|
|
169
|
+
...level === "full" ? [
|
|
170
|
+
Animated.spring(translateX, {
|
|
171
|
+
...springConfig(theme, "ds"),
|
|
172
|
+
toValue: 0,
|
|
173
|
+
useNativeDriver: true
|
|
174
|
+
})
|
|
175
|
+
] : []
|
|
176
|
+
]).start();
|
|
177
|
+
}, [current, level, opacity, translateX, theme, steps]);
|
|
178
|
+
const [failed, setFailed] = React.useState(() => /* @__PURE__ */ new Set());
|
|
179
|
+
const markFailed = (index, bad) => setFailed((prev2) => {
|
|
180
|
+
if (prev2.has(index) === bad) return prev2;
|
|
181
|
+
const nextSet = new Set(prev2);
|
|
182
|
+
if (bad) nextSet.add(index);
|
|
183
|
+
else nextSet.delete(index);
|
|
184
|
+
return nextSet;
|
|
185
|
+
});
|
|
186
|
+
const goTo = (next) => {
|
|
187
|
+
const clamped = clamp(next, 0, last);
|
|
188
|
+
if (clamped === current) return;
|
|
189
|
+
if (!isControlled) setInternal(clamped);
|
|
190
|
+
onStepChange?.(clamped);
|
|
191
|
+
};
|
|
192
|
+
const visited = React.useRef(/* @__PURE__ */ new Set());
|
|
193
|
+
if (activeStep) visited.current.add(activeStep.id);
|
|
194
|
+
const onNext = () => {
|
|
195
|
+
if (loading || disabled) return;
|
|
196
|
+
if (activeStep?.validate && !activeStep.validate()) {
|
|
197
|
+
markFailed(current, true);
|
|
198
|
+
onStepInvalid?.(current);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (activeStep?.validate) markFailed(current, false);
|
|
202
|
+
if (isLast) onFinish?.();
|
|
203
|
+
else goTo(current + 1);
|
|
204
|
+
};
|
|
205
|
+
const backRef = React.useRef(() => false);
|
|
206
|
+
backRef.current = () => {
|
|
207
|
+
if (!onCancel) return false;
|
|
208
|
+
if (!isFirst) {
|
|
209
|
+
goTo(current - 1);
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
Alert.alert(labels.discardTitle, void 0, [
|
|
213
|
+
{ text: labels.keepEditing, style: "cancel" },
|
|
214
|
+
{ text: labels.discard, style: "destructive", onPress: onCancel }
|
|
215
|
+
]);
|
|
216
|
+
return true;
|
|
217
|
+
};
|
|
218
|
+
React.useEffect(() => {
|
|
219
|
+
if (!android) return void 0;
|
|
220
|
+
const sub = BackHandler.addEventListener("hardwareBackPress", () => backRef.current());
|
|
221
|
+
return () => sub.remove();
|
|
222
|
+
}, [android]);
|
|
223
|
+
return /* @__PURE__ */ jsxs(
|
|
224
|
+
View,
|
|
225
|
+
{
|
|
226
|
+
style: [
|
|
227
|
+
styles.container,
|
|
228
|
+
density === "compact" && { padding: theme.space.s2, gap: theme.space.s3 },
|
|
229
|
+
density === "comfortable" && { padding: theme.space.s6, gap: theme.space.s6 },
|
|
230
|
+
variant === "elevated" && {
|
|
231
|
+
backgroundColor: theme.color.surface,
|
|
232
|
+
borderRadius: theme.radius.lg,
|
|
233
|
+
...theme.shadow.md
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
children: [
|
|
237
|
+
onCancel ? android ? /* @__PURE__ */ jsx(View, { style: [styles.bar, styles.barAndroid], children: /* @__PURE__ */ jsx(
|
|
238
|
+
Pressable,
|
|
239
|
+
{
|
|
240
|
+
accessibilityRole: "button",
|
|
241
|
+
accessibilityLabel: labels.close,
|
|
242
|
+
onPress: onCancel,
|
|
243
|
+
android_ripple: {
|
|
244
|
+
color: theme.state.pressed,
|
|
245
|
+
borderless: true,
|
|
246
|
+
radius: theme.space[24]
|
|
247
|
+
},
|
|
248
|
+
style: styles.closeButton,
|
|
249
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: theme.icon.md, color: theme.color.text })
|
|
250
|
+
}
|
|
251
|
+
) }) : /* @__PURE__ */ jsxs(View, { style: [styles.bar, styles.barIos], children: [
|
|
252
|
+
/* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", onPress: onCancel, hitSlop: theme.space[8], children: ({ pressed }) => /* @__PURE__ */ jsx(Text, { style: [styles.cancel, pressed && { opacity: theme.state.pressedOpacity }], children: labels.cancel }) }),
|
|
253
|
+
/* @__PURE__ */ jsx(Text, { style: styles.count, children: labels.count(current + 1, steps.length) })
|
|
254
|
+
] }) : null,
|
|
255
|
+
showHeader ? /* @__PURE__ */ jsx(
|
|
256
|
+
WizardSteps,
|
|
257
|
+
{
|
|
258
|
+
steps,
|
|
259
|
+
current,
|
|
260
|
+
errors: failed,
|
|
261
|
+
onStepClick: disabled ? void 0 : goTo,
|
|
262
|
+
labels,
|
|
263
|
+
size,
|
|
264
|
+
indicator,
|
|
265
|
+
orientation,
|
|
266
|
+
doneTone,
|
|
267
|
+
errorStyle
|
|
268
|
+
}
|
|
269
|
+
) : null,
|
|
270
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.content, { opacity, transform: [{ translateX }] }], children: steps.map((s, i) => {
|
|
271
|
+
const isActive = i === current;
|
|
272
|
+
if (!isActive && !(keepMounted && visited.current.has(s.id))) return null;
|
|
273
|
+
return /* @__PURE__ */ jsx(
|
|
274
|
+
View,
|
|
275
|
+
{
|
|
276
|
+
style: isActive ? void 0 : styles.hiddenStep,
|
|
277
|
+
"aria-hidden": isActive ? void 0 : true,
|
|
278
|
+
importantForAccessibility: isActive ? "auto" : "no-hide-descendants",
|
|
279
|
+
children: s.content
|
|
280
|
+
},
|
|
281
|
+
s.id
|
|
282
|
+
);
|
|
283
|
+
}) }),
|
|
284
|
+
renderFooter ? renderFooter({
|
|
285
|
+
index: current,
|
|
286
|
+
count: steps.length,
|
|
287
|
+
isFirst,
|
|
288
|
+
isLast,
|
|
289
|
+
next: onNext,
|
|
290
|
+
back: () => {
|
|
291
|
+
if (!disabled) goTo(current - 1);
|
|
292
|
+
}
|
|
293
|
+
}) : /* @__PURE__ */ jsxs(View, { style: styles.footer, children: [
|
|
294
|
+
/* @__PURE__ */ jsx(View, { style: android ? void 0 : styles.footerShare, children: /* @__PURE__ */ jsx(
|
|
295
|
+
Button,
|
|
296
|
+
{
|
|
297
|
+
size: size === "md" ? void 0 : size,
|
|
298
|
+
variant: android ? "ghost" : "outline",
|
|
299
|
+
...android ? null : { leadingIcon: "arrow-left" },
|
|
300
|
+
disabled: isFirst || loading || disabled,
|
|
301
|
+
onPress: () => goTo(current - 1),
|
|
302
|
+
children: backLabel
|
|
303
|
+
}
|
|
304
|
+
) }),
|
|
305
|
+
/* @__PURE__ */ jsx(View, { style: android ? void 0 : styles.footerShare, children: /* @__PURE__ */ jsx(
|
|
306
|
+
Button,
|
|
307
|
+
{
|
|
308
|
+
size: size === "md" ? void 0 : size,
|
|
309
|
+
variant: "primary",
|
|
310
|
+
...android ? null : { trailingIcon: isLast ? "check" : "arrow-right" },
|
|
311
|
+
loading,
|
|
312
|
+
disabled,
|
|
313
|
+
onPress: onNext,
|
|
314
|
+
children: isLast ? finishLabel : nextLabel
|
|
315
|
+
}
|
|
316
|
+
) })
|
|
317
|
+
] })
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
function WizardSteps({
|
|
323
|
+
steps,
|
|
324
|
+
current,
|
|
325
|
+
onStepClick,
|
|
326
|
+
errors,
|
|
327
|
+
size = "md",
|
|
328
|
+
indicator = "numbered",
|
|
329
|
+
orientation = "horizontal",
|
|
330
|
+
doneTone = "good",
|
|
331
|
+
errorStyle = "badge",
|
|
332
|
+
labels: labelsProp
|
|
333
|
+
}) {
|
|
334
|
+
const { styles } = useStyles(sheet);
|
|
335
|
+
const labels = useLabels("wizard", DEFAULT_LABELS, labelsProp);
|
|
336
|
+
const theme = useLoamTheme("wizard");
|
|
337
|
+
const activeStep = steps[current];
|
|
338
|
+
const dotSize = indicator === "dots" ? theme.space[12] : theme.space[DOT_SIZE[size]];
|
|
339
|
+
const vertical = orientation === "vertical";
|
|
340
|
+
return /* @__PURE__ */ jsx(
|
|
341
|
+
View,
|
|
342
|
+
{
|
|
343
|
+
style: [styles.rail, vertical && styles.railVertical],
|
|
344
|
+
...onStepClick ? { role: "group" } : {
|
|
345
|
+
accessibilityRole: "progressbar",
|
|
346
|
+
accessibilityValue: { min: 1, max: steps.length, now: current + 1 },
|
|
347
|
+
"aria-valuemin": 1,
|
|
348
|
+
"aria-valuemax": steps.length,
|
|
349
|
+
"aria-valuenow": current + 1
|
|
350
|
+
},
|
|
351
|
+
accessibilityLabel: labels.stepOf(current + 1, steps.length, activeStep?.label),
|
|
352
|
+
children: steps.map((s, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
353
|
+
i > 0 ? (
|
|
354
|
+
// The connector carries the state: solid in the done tone once the
|
|
355
|
+
// step it leaves has been traversed, muted otherwise — the shared
|
|
356
|
+
// rule, and the same green the completed dots now use.
|
|
357
|
+
/* @__PURE__ */ jsx(
|
|
358
|
+
View,
|
|
359
|
+
{
|
|
360
|
+
style: [
|
|
361
|
+
styles.line,
|
|
362
|
+
vertical ? {
|
|
363
|
+
flex: 0,
|
|
364
|
+
width: theme.borderWidth.heavy,
|
|
365
|
+
height: theme.space.s4,
|
|
366
|
+
marginHorizontal: 0,
|
|
367
|
+
marginTop: 0,
|
|
368
|
+
marginVertical: theme.space.s1,
|
|
369
|
+
marginStart: dotSize / 2 - theme.borderWidth.heavy / 2
|
|
370
|
+
} : { marginTop: dotSize / 2 - theme.borderWidth.heavy / 2 },
|
|
371
|
+
{
|
|
372
|
+
backgroundColor: isConnectorTraversed(resolveStepState(i - 1, current)) ? doneTone === "accent" ? theme.color.accent : theme.color.good : theme.color.surface3
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
) : null,
|
|
378
|
+
/* @__PURE__ */ jsx(
|
|
379
|
+
StepDot,
|
|
380
|
+
{
|
|
381
|
+
index: i,
|
|
382
|
+
current,
|
|
383
|
+
label: s.label,
|
|
384
|
+
labels,
|
|
385
|
+
dotSize,
|
|
386
|
+
indicator,
|
|
387
|
+
orientation,
|
|
388
|
+
doneTone,
|
|
389
|
+
errorStyle,
|
|
390
|
+
hasError: !!s.error || !!errors?.has(i),
|
|
391
|
+
onPress: onStepClick && resolveStepState(i, current) === "done" ? () => onStepClick(i) : void 0
|
|
392
|
+
}
|
|
393
|
+
)
|
|
394
|
+
] }, s.id))
|
|
395
|
+
}
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
var sheet = createStyleSheet((theme) => ({
|
|
399
|
+
hiddenStep: { display: "none" },
|
|
400
|
+
// The wizard owns its own gutter: it is a whole flow, not a control dropped
|
|
401
|
+
// into someone else's padded box, and without one the footer buttons sat flush
|
|
402
|
+
// against whatever container it was placed in.
|
|
403
|
+
container: {
|
|
404
|
+
padding: theme.space.s4,
|
|
405
|
+
gap: theme.space.s4
|
|
406
|
+
},
|
|
407
|
+
// Step titles sit *in flow* under their dot rather than absolutely positioned:
|
|
408
|
+
// an absolute label is measured against the 32pt dot, so it either overflowed
|
|
409
|
+
// into its neighbours or (once clamped) truncated to "Acc…". The connecting
|
|
410
|
+
// lines stay level with the dot centres by being offset to that centre
|
|
411
|
+
// themselves, which is why the rail aligns to `flex-start`.
|
|
412
|
+
rail: {
|
|
413
|
+
flexDirection: "row",
|
|
414
|
+
alignItems: "flex-start"
|
|
415
|
+
},
|
|
416
|
+
railVertical: { flexDirection: "column", alignItems: "flex-start" },
|
|
417
|
+
dotColRow: { flexDirection: "row", alignItems: "center", gap: theme.space.s3 },
|
|
418
|
+
line: {
|
|
419
|
+
flex: 1,
|
|
420
|
+
// The 2 px connector, level with the 30 dot centres (Final 05).
|
|
421
|
+
height: theme.borderWidth.heavy,
|
|
422
|
+
borderRadius: theme.radius.full,
|
|
423
|
+
marginHorizontal: theme.space.s1,
|
|
424
|
+
marginTop: theme.space[30] / 2 - theme.borderWidth.heavy / 2
|
|
425
|
+
},
|
|
426
|
+
errorBadge: {
|
|
427
|
+
position: "absolute",
|
|
428
|
+
top: -theme.space.s1,
|
|
429
|
+
end: -theme.space.s1,
|
|
430
|
+
width: theme.icon.sm,
|
|
431
|
+
height: theme.icon.sm,
|
|
432
|
+
borderRadius: theme.radius.full,
|
|
433
|
+
alignItems: "center",
|
|
434
|
+
justifyContent: "center",
|
|
435
|
+
backgroundColor: theme.color.danger
|
|
436
|
+
},
|
|
437
|
+
dotCol: { alignItems: "center", flexShrink: 0, gap: theme.space.s1 },
|
|
438
|
+
dot: {
|
|
439
|
+
width: theme.space[30],
|
|
440
|
+
height: theme.space[30],
|
|
441
|
+
borderRadius: theme.radius.full,
|
|
442
|
+
alignItems: "center",
|
|
443
|
+
justifyContent: "center",
|
|
444
|
+
variants: {
|
|
445
|
+
state: {
|
|
446
|
+
// `done` uses the family's done tone (`status.done` === `good`), so a
|
|
447
|
+
// completed wizard step is the same green as a `done` Timeline/Stage node
|
|
448
|
+
// and matches the web wizard — the native wizard previously diverged to
|
|
449
|
+
// `accent` (blue) here, the one inconsistency this unification resolves.
|
|
450
|
+
done: {
|
|
451
|
+
backgroundColor: theme.status.done,
|
|
452
|
+
borderWidth: theme.borderWidth.thick,
|
|
453
|
+
borderColor: theme.status.done
|
|
454
|
+
},
|
|
455
|
+
// The active step's edge is `focus.ringColor` — the only mark of "you
|
|
456
|
+
// are here" once high contrast drops the `accentSoft` fill, so it owes
|
|
457
|
+
// SC 1.4.11's 3:1, which the raw accent misses in four palettes.
|
|
458
|
+
active: {
|
|
459
|
+
backgroundColor: theme.color.accentSoft,
|
|
460
|
+
borderWidth: theme.borderWidth.thick,
|
|
461
|
+
borderColor: theme.focus.ringColor
|
|
462
|
+
},
|
|
463
|
+
upcoming: {
|
|
464
|
+
backgroundColor: theme.color.surface3,
|
|
465
|
+
borderWidth: theme.borderWidth.thick,
|
|
466
|
+
borderColor: theme.color.surface3
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
dotNum: {
|
|
472
|
+
fontFamily: theme.font.sans,
|
|
473
|
+
fontWeight: theme.fontWeight.bold,
|
|
474
|
+
fontSize: theme.type.footnote.fontSize,
|
|
475
|
+
lineHeight: theme.type.footnote.lineHeight
|
|
476
|
+
},
|
|
477
|
+
dotLabel: {
|
|
478
|
+
// Wide enough for a real step name, capped so a long one wraps instead of
|
|
479
|
+
// shouldering the next step out of the rail.
|
|
480
|
+
maxWidth: theme.space.s8 + theme.space.s4,
|
|
481
|
+
textAlign: "center",
|
|
482
|
+
fontFamily: theme.font.sans,
|
|
483
|
+
fontWeight: theme.fontWeight.semibold,
|
|
484
|
+
fontSize: theme.type.caption1.fontSize,
|
|
485
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
486
|
+
color: theme.color.text
|
|
487
|
+
},
|
|
488
|
+
// Active 600 text; the others 500 text-2.
|
|
489
|
+
dotLabelRest: { fontWeight: theme.fontWeight.medium, color: theme.color.text2 },
|
|
490
|
+
content: { gap: theme.space.s3 },
|
|
491
|
+
footer: {
|
|
492
|
+
flexDirection: "row",
|
|
493
|
+
alignItems: "center",
|
|
494
|
+
justifyContent: "space-between",
|
|
495
|
+
gap: theme.space.s3
|
|
496
|
+
},
|
|
497
|
+
footerShare: { flex: 1, alignItems: "stretch" },
|
|
498
|
+
bar: { flexDirection: "row", alignItems: "center" },
|
|
499
|
+
// The iOS page-sheet bar: 44, Cancel 17 / 400 accent, count 15 text-2.
|
|
500
|
+
barIos: { height: theme.ctl.lg, justifyContent: "space-between" },
|
|
501
|
+
// The Android full-screen dialog bar: 64 with a 48 close target.
|
|
502
|
+
barAndroid: { height: theme.space[64], marginHorizontal: -theme.space[12] },
|
|
503
|
+
closeButton: {
|
|
504
|
+
width: theme.space[48],
|
|
505
|
+
height: theme.space[48],
|
|
506
|
+
alignItems: "center",
|
|
507
|
+
justifyContent: "center"
|
|
508
|
+
},
|
|
509
|
+
cancel: {
|
|
510
|
+
fontFamily: theme.font.sans,
|
|
511
|
+
fontSize: theme.fontSize[17],
|
|
512
|
+
fontWeight: theme.fontWeight.regular,
|
|
513
|
+
color: theme.color.accentStrong
|
|
514
|
+
},
|
|
515
|
+
count: {
|
|
516
|
+
fontFamily: theme.font.sans,
|
|
517
|
+
fontSize: theme.fontSize[15],
|
|
518
|
+
color: theme.color.text2,
|
|
519
|
+
fontVariant: ["tabular-nums"]
|
|
520
|
+
}
|
|
521
|
+
}));
|
|
522
|
+
|
|
523
|
+
export { Wizard, WizardSteps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useThinkingPulse } from './chunk-W74TXYFB.js';
|
|
2
1
|
import { NODE_STATE_WORD, NODE_STATE_ICON, NODE_STATE_SHAPE } from './chunk-YLLCXTMC.js';
|
|
2
|
+
import { useThinkingPulse } from './chunk-LUZFCCSD.js';
|
|
3
3
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
4
|
-
import { Icon } from './chunk-
|
|
4
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { View, Text, ScrollView, Animated, Easing } from 'react-native';
|
|
7
7
|
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
@@ -16,7 +16,8 @@ var NODE_ICON = { sm: 14, md: 18, lg: 22 };
|
|
|
16
16
|
function StageNode({
|
|
17
17
|
state,
|
|
18
18
|
size,
|
|
19
|
-
pulse
|
|
19
|
+
pulse,
|
|
20
|
+
outline
|
|
20
21
|
}) {
|
|
21
22
|
const { styles } = useStyles(sheet, { state });
|
|
22
23
|
const theme = useLoamTheme("stage-timeline");
|
|
@@ -29,6 +30,7 @@ function StageNode({
|
|
|
29
30
|
style: [
|
|
30
31
|
styles.node,
|
|
31
32
|
{ width: box, height: box, borderRadius: shapeRadius(state, theme.radius.full) },
|
|
33
|
+
outline ? { backgroundColor: theme.color.surface } : null,
|
|
32
34
|
pulseStyle
|
|
33
35
|
],
|
|
34
36
|
children: /* @__PURE__ */ jsx(Icon, { name: NODE_STATE_ICON[state], size: NODE_ICON[size], color: glyphColor })
|
|
@@ -75,7 +77,7 @@ function Connector({
|
|
|
75
77
|
{
|
|
76
78
|
style: [
|
|
77
79
|
horizontal ? styles.fillH : styles.fillV,
|
|
78
|
-
{ backgroundColor: theme.color.
|
|
80
|
+
{ backgroundColor: theme.color.good },
|
|
79
81
|
fillStyle
|
|
80
82
|
]
|
|
81
83
|
}
|
|
@@ -88,6 +90,8 @@ function StageTimeline({
|
|
|
88
90
|
orientation = "horizontal",
|
|
89
91
|
size = "md",
|
|
90
92
|
motion = "full",
|
|
93
|
+
variant = "soft",
|
|
94
|
+
density = "comfortable",
|
|
91
95
|
labels: labelsProp,
|
|
92
96
|
style,
|
|
93
97
|
testID
|
|
@@ -114,9 +118,17 @@ function StageTimeline({
|
|
|
114
118
|
accessibilityLabel: name,
|
|
115
119
|
"aria-label": name,
|
|
116
120
|
...currentAttr,
|
|
117
|
-
style: styles.stageH,
|
|
121
|
+
style: [styles.stageH, density === "compact" && styles.stageHCompact],
|
|
118
122
|
children: [
|
|
119
|
-
/* @__PURE__ */ jsx(
|
|
123
|
+
/* @__PURE__ */ jsx(
|
|
124
|
+
StageNode,
|
|
125
|
+
{
|
|
126
|
+
state: stage.state,
|
|
127
|
+
size,
|
|
128
|
+
pulse: isWorking && pulseOn,
|
|
129
|
+
outline: variant === "outline"
|
|
130
|
+
}
|
|
131
|
+
),
|
|
120
132
|
/* @__PURE__ */ jsx(Text, { style: styles.label, numberOfLines: 2, children: stage.label }),
|
|
121
133
|
stage.detail ? /* @__PURE__ */ jsx(Text, { style: styles.detail, numberOfLines: 1, children: stage.detail }) : null
|
|
122
134
|
]
|
|
@@ -136,13 +148,32 @@ function StageTimeline({
|
|
|
136
148
|
style: styles.stageV,
|
|
137
149
|
children: [
|
|
138
150
|
/* @__PURE__ */ jsxs(View, { style: styles.railV, children: [
|
|
139
|
-
/* @__PURE__ */ jsx(
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
StageNode,
|
|
153
|
+
{
|
|
154
|
+
state: stage.state,
|
|
155
|
+
size,
|
|
156
|
+
pulse: isWorking && pulseOn,
|
|
157
|
+
outline: variant === "outline"
|
|
158
|
+
}
|
|
159
|
+
),
|
|
140
160
|
showConnector ? /* @__PURE__ */ jsx(Connector, { from: stage.state, orientation, motion }) : null
|
|
141
161
|
] }),
|
|
142
|
-
/* @__PURE__ */ jsxs(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
162
|
+
/* @__PURE__ */ jsxs(
|
|
163
|
+
View,
|
|
164
|
+
{
|
|
165
|
+
style: [
|
|
166
|
+
styles.textV,
|
|
167
|
+
showConnector && {
|
|
168
|
+
paddingBottom: density === "compact" ? theme.space.s2 : theme.space.s5
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ jsx(Text, { style: styles.label, children: stage.label }),
|
|
173
|
+
stage.detail ? /* @__PURE__ */ jsx(Text, { style: styles.detail, children: stage.detail }) : null
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
)
|
|
146
177
|
]
|
|
147
178
|
},
|
|
148
179
|
stage.id
|
|
@@ -182,6 +213,7 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
182
213
|
}
|
|
183
214
|
}
|
|
184
215
|
},
|
|
216
|
+
stageHCompact: { paddingHorizontal: theme.space.s1, gap: theme.space.s1 },
|
|
185
217
|
stageV: { flexDirection: "row", alignItems: "stretch", gap: theme.space.s3 },
|
|
186
218
|
railV: { alignItems: "center" },
|
|
187
219
|
textV: { flexShrink: 1, gap: theme.space.s1, paddingTop: theme.space[2] },
|