@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,11 +1,11 @@
|
|
|
1
|
-
import { Coachmark, CoachmarkDots } from './chunk-
|
|
2
|
-
import { useTourHost, Highlight, Beacon, useTourInsets } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Coachmark, CoachmarkDots } from './chunk-ZYQ23DPT.js';
|
|
2
|
+
import { useTourHost, Highlight, Beacon, useTourInsets } from './chunk-36DA3IPO.js';
|
|
3
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
4
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
5
5
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
6
|
-
import { Icon } from './chunk-
|
|
6
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import { BackHandler, AccessibilityInfo, Pressable,
|
|
8
|
+
import { BackHandler, AccessibilityInfo, Pressable, Text, View } from 'react-native';
|
|
9
9
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
10
10
|
import { materializeTour, resolveText, stepsForSurface, kindFor, canAttachGate, isStepGated, highlightFor, shouldSkipMissingStep, hintRuns } from '@btndprojects/loam-engage';
|
|
11
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -308,7 +308,7 @@ function Tour({
|
|
|
308
308
|
const variant = cardVariant ?? (kind === "modal" || !resolved ? "centered" : touch ? "docked" : "anchored");
|
|
309
309
|
if (kind === "beacon" && resolved && !beaconOpen) {
|
|
310
310
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
311
|
-
/* @__PURE__ */ jsx(Highlight, { kind: highlight, target: resolved,
|
|
311
|
+
/* @__PURE__ */ jsx(Highlight, { kind: highlight, target: resolved, halo: step.padding, motion }),
|
|
312
312
|
/* @__PURE__ */ jsx(
|
|
313
313
|
Beacon,
|
|
314
314
|
{
|
|
@@ -346,14 +346,16 @@ function Tour({
|
|
|
346
346
|
onAction: onAction ? (action) => onAction(action, step) : void 0
|
|
347
347
|
};
|
|
348
348
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
349
|
-
resolved ? /* @__PURE__ */ jsx(Highlight, { kind: highlight, target: resolved,
|
|
349
|
+
resolved ? /* @__PURE__ */ jsx(Highlight, { kind: highlight, target: resolved, halo: step.padding, motion }) : null,
|
|
350
350
|
/* @__PURE__ */ jsx(React.Fragment, { children: renderCard ? renderCard(cardProps) : /* @__PURE__ */ jsx(TourStepCard, { ...cardProps }) }, renderCard ? index : variant)
|
|
351
351
|
] });
|
|
352
352
|
}
|
|
353
353
|
function TourHint({ text }) {
|
|
354
354
|
const { styles } = useStyles(sheet);
|
|
355
|
+
const theme = useLoamTheme("tour");
|
|
356
|
+
const ios = isAndroidIdiom(theme) ? null : styles.hintIos;
|
|
355
357
|
return /* @__PURE__ */ jsx(Fragment, { children: hintRuns(text).map(
|
|
356
|
-
(run, i) => run.key ? /* @__PURE__ */ jsx(Text, { style: styles.hintKey, children: run.text }, i) : /* @__PURE__ */ jsx(Text, { children: run.text }, i)
|
|
358
|
+
(run, i) => run.key ? /* @__PURE__ */ jsx(Text, { style: [ios, styles.hintKey], children: run.text }, i) : /* @__PURE__ */ jsx(Text, { style: ios, children: run.text }, i)
|
|
357
359
|
) });
|
|
358
360
|
}
|
|
359
361
|
function TourStepCard({
|
|
@@ -385,6 +387,7 @@ function TourStepCard({
|
|
|
385
387
|
const isLast = index === total - 1;
|
|
386
388
|
const kind = kindFor(step.kind, Boolean(step.anchor));
|
|
387
389
|
const cta = step.cta;
|
|
390
|
+
const ios = !isAndroidIdiom(theme);
|
|
388
391
|
return /* @__PURE__ */ jsxs(
|
|
389
392
|
Coachmark,
|
|
390
393
|
{
|
|
@@ -395,7 +398,10 @@ function TourStepCard({
|
|
|
395
398
|
kicker: name,
|
|
396
399
|
title: t(step.title) ?? "",
|
|
397
400
|
body: typeof step.body === "string" ? step.body : void 0,
|
|
398
|
-
media: step.media,
|
|
401
|
+
media: step.media ? /* @__PURE__ */ jsx(View, { style: styles.media, children: step.media }) : void 0,
|
|
402
|
+
titleStyle: ios ? styles.titleIos : void 0,
|
|
403
|
+
bodyStyle: ios ? styles.bodyIos : void 0,
|
|
404
|
+
dockOffset: ios ? theme.space[12] : void 0,
|
|
399
405
|
hint: waiting ?? (gated ? /* @__PURE__ */ jsx(TourHint, { text: t(step.hint) ?? labels.waiting }) : void 0),
|
|
400
406
|
motion,
|
|
401
407
|
onClose,
|
|
@@ -406,26 +412,36 @@ function TourStepCard({
|
|
|
406
412
|
accessibilityRole: "button",
|
|
407
413
|
accessibilityLabel: labels.minimise,
|
|
408
414
|
onPress: onMinimise,
|
|
409
|
-
hitSlop: theme.
|
|
410
|
-
|
|
415
|
+
hitSlop: (theme.hit.sm - theme.ctl.sm) / 2,
|
|
416
|
+
android_ripple: { color: theme.state.pressed, borderless: true },
|
|
417
|
+
style: ({ pressed }) => [
|
|
418
|
+
styles.iconButton,
|
|
419
|
+
pressed ? { backgroundColor: theme.state.pressed } : null
|
|
420
|
+
],
|
|
411
421
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: theme.icon.sm, color: theme.color.text3 })
|
|
412
422
|
}
|
|
413
423
|
) : null,
|
|
414
424
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
415
|
-
onBack ? /* @__PURE__ */ jsx(Button, { size: "
|
|
416
|
-
gated ? step.skippable === false ? null : /* @__PURE__ */ jsx(Button, { size: "
|
|
425
|
+
onBack ? /* @__PURE__ */ jsx(Button, { size: "lg", variant: "outline", onPress: onBack, children: labels.back }) : null,
|
|
426
|
+
gated ? step.skippable === false ? null : /* @__PURE__ */ jsx(Button, { size: "lg", variant: "ghost", onPress: onSkipStep, children: labels.skipStep }) : /* @__PURE__ */ jsx(Button, { size: "lg", variant: "primary", onPress: onNext, children: isLast ? labels.finish : labels.next })
|
|
417
427
|
] }),
|
|
418
428
|
children: [
|
|
419
429
|
typeof step.body !== "string" && step.body ? /* @__PURE__ */ jsx(Fragment, { children: step.body }) : null,
|
|
420
|
-
cta ?
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
430
|
+
cta ? (
|
|
431
|
+
// A Link, not a button: it leaves the card's own flow.
|
|
432
|
+
/* @__PURE__ */ jsx(
|
|
433
|
+
Pressable,
|
|
434
|
+
{
|
|
435
|
+
accessibilityRole: "link",
|
|
436
|
+
onPress: () => onAction?.(cta.action),
|
|
437
|
+
hitSlop: (theme.hit.sm - theme.fontSize[15]) / 2,
|
|
438
|
+
style: styles.cta,
|
|
439
|
+
children: ({ pressed }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
440
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.ctaText, pressed ? styles.ctaPressed : null], children: cta.label }),
|
|
441
|
+
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: theme.icon.xs, color: theme.color.accentStrong })
|
|
442
|
+
] })
|
|
443
|
+
}
|
|
444
|
+
)
|
|
429
445
|
) : null,
|
|
430
446
|
/* @__PURE__ */ jsx(
|
|
431
447
|
TourProgress,
|
|
@@ -453,40 +469,40 @@ function TourProgress({
|
|
|
453
469
|
const { styles } = useStyles(sheet);
|
|
454
470
|
const labels = useLabels("tour", DEFAULT_LABELS, labelsProp);
|
|
455
471
|
const stepLabel = stepLabelProp ?? labels.step;
|
|
456
|
-
return /* @__PURE__ */ jsxs(
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
] })
|
|
482
|
-
] })
|
|
483
|
-
] });
|
|
472
|
+
return /* @__PURE__ */ jsxs(
|
|
473
|
+
View,
|
|
474
|
+
{
|
|
475
|
+
role: "group",
|
|
476
|
+
accessibilityLabel: labels.stepOf(stepLabel, index + 1, total),
|
|
477
|
+
style: styles.progress,
|
|
478
|
+
children: [
|
|
479
|
+
/* @__PURE__ */ jsx(
|
|
480
|
+
CoachmarkDots,
|
|
481
|
+
{
|
|
482
|
+
total,
|
|
483
|
+
index,
|
|
484
|
+
onSelect,
|
|
485
|
+
stepLabel,
|
|
486
|
+
titles
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
/* @__PURE__ */ jsxs(Text, { style: styles.counter, children: [
|
|
490
|
+
index + 1,
|
|
491
|
+
" / ",
|
|
492
|
+
total
|
|
493
|
+
] })
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
);
|
|
484
497
|
}
|
|
485
498
|
function TourLauncher({
|
|
486
499
|
label: labelProp,
|
|
487
500
|
counter,
|
|
488
501
|
onPress,
|
|
502
|
+
icon,
|
|
489
503
|
pinned = true,
|
|
504
|
+
dismissible = false,
|
|
505
|
+
onDismiss,
|
|
490
506
|
labels: labelsProp
|
|
491
507
|
}) {
|
|
492
508
|
const theme = useLoamTheme("tour");
|
|
@@ -494,7 +510,9 @@ function TourLauncher({
|
|
|
494
510
|
const label = labelProp ?? labels.resume;
|
|
495
511
|
const { styles } = useStyles(sheet);
|
|
496
512
|
const insets = useTourInsets();
|
|
497
|
-
|
|
513
|
+
const wrap = dismissible && onDismiss !== void 0;
|
|
514
|
+
const place = pinned ? { end: theme.space[16] + insets.right, bottom: theme.space[16] + insets.bottom } : null;
|
|
515
|
+
const pill = /* @__PURE__ */ jsxs(
|
|
498
516
|
Pressable,
|
|
499
517
|
{
|
|
500
518
|
accessibilityRole: "button",
|
|
@@ -502,17 +520,34 @@ function TourLauncher({
|
|
|
502
520
|
onPress,
|
|
503
521
|
style: ({ pressed }) => [
|
|
504
522
|
styles.launcher,
|
|
505
|
-
pinned ? styles.launcherPinned : null,
|
|
506
|
-
|
|
523
|
+
pinned && !wrap ? styles.launcherPinned : null,
|
|
524
|
+
!wrap ? place : null,
|
|
507
525
|
pressed ? { backgroundColor: theme.state.pressed } : null
|
|
508
526
|
],
|
|
509
527
|
children: [
|
|
510
|
-
/* @__PURE__ */ jsx(Icon, { name:
|
|
528
|
+
icon ? /* @__PURE__ */ jsx(Icon, { name: icon, size: theme.icon.sm, color: theme.color.accentStrong }) : null,
|
|
511
529
|
/* @__PURE__ */ jsx(Text, { style: styles.launcherLabel, children: label }),
|
|
512
|
-
counter ? /* @__PURE__ */ jsx(Text, { style: styles.
|
|
530
|
+
counter ? /* @__PURE__ */ jsx(View, { style: styles.launcherBadge, children: /* @__PURE__ */ jsx(Text, { style: styles.count, children: counter }) }) : null
|
|
513
531
|
]
|
|
514
532
|
}
|
|
515
533
|
);
|
|
534
|
+
if (!wrap) return pill;
|
|
535
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles.launcherGroup, pinned ? styles.launcherPinned : null, place], children: [
|
|
536
|
+
pill,
|
|
537
|
+
/* @__PURE__ */ jsx(
|
|
538
|
+
Pressable,
|
|
539
|
+
{
|
|
540
|
+
accessibilityRole: "button",
|
|
541
|
+
accessibilityLabel: labels.leave,
|
|
542
|
+
onPress: onDismiss,
|
|
543
|
+
style: ({ pressed }) => [
|
|
544
|
+
styles.launcherDismiss,
|
|
545
|
+
pressed ? { backgroundColor: theme.state.pressed } : null
|
|
546
|
+
],
|
|
547
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: theme.icon.sm, color: theme.color.text2 })
|
|
548
|
+
}
|
|
549
|
+
)
|
|
550
|
+
] });
|
|
516
551
|
}
|
|
517
552
|
var sheet = createStyleSheet((theme) => ({
|
|
518
553
|
/** A control named inside a gated hint, shaped like the app's own label. */
|
|
@@ -521,46 +556,105 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
521
556
|
color: theme.color.text,
|
|
522
557
|
textTransform: "none"
|
|
523
558
|
},
|
|
559
|
+
hintIos: { fontSize: theme.fontSize[13] },
|
|
560
|
+
// A ghost icon Button sm: its square, its corner, its pressed layer.
|
|
524
561
|
iconButton: {
|
|
525
562
|
width: theme.ctl.sm,
|
|
526
563
|
height: theme.ctl.sm,
|
|
527
564
|
alignItems: "center",
|
|
528
565
|
justifyContent: "center",
|
|
529
|
-
borderRadius: theme.
|
|
566
|
+
borderRadius: theme.ctl.r.sm
|
|
567
|
+
},
|
|
568
|
+
titleIos: {
|
|
569
|
+
fontFamily: theme.font.sans,
|
|
570
|
+
fontWeight: theme.fontWeight.semibold,
|
|
571
|
+
fontSize: theme.type.headline.fontSize,
|
|
572
|
+
lineHeight: theme.type.headline.lineHeight,
|
|
573
|
+
letterSpacing: theme.type.headline.letterSpacing
|
|
530
574
|
},
|
|
531
|
-
|
|
532
|
-
|
|
575
|
+
bodyIos: {
|
|
576
|
+
fontSize: theme.type.subheadline.fontSize,
|
|
577
|
+
lineHeight: theme.type.subheadline.lineHeight
|
|
578
|
+
},
|
|
579
|
+
media: { borderRadius: theme.radius.sm, overflow: "hidden" },
|
|
580
|
+
cta: { flexDirection: "row", alignItems: "center", alignSelf: "flex-start", gap: theme.space[4] },
|
|
581
|
+
ctaText: {
|
|
582
|
+
fontFamily: theme.font.sans,
|
|
583
|
+
fontWeight: theme.fontWeight.semibold,
|
|
584
|
+
fontSize: theme.fontSize[15],
|
|
585
|
+
color: theme.color.accentStrong
|
|
586
|
+
},
|
|
587
|
+
ctaPressed: { textDecorationLine: "underline" },
|
|
588
|
+
progress: {
|
|
589
|
+
flexDirection: "row",
|
|
590
|
+
alignItems: "center",
|
|
591
|
+
gap: theme.space[6],
|
|
592
|
+
height: theme.space[32],
|
|
593
|
+
marginTop: theme.space[2]
|
|
594
|
+
},
|
|
595
|
+
// The count style: mono 12 / 500, text-2, tabular.
|
|
533
596
|
counter: {
|
|
534
|
-
|
|
597
|
+
marginStart: "auto",
|
|
598
|
+
fontFamily: theme.font.mono,
|
|
599
|
+
fontSize: theme.fontSize[12],
|
|
600
|
+
fontWeight: theme.fontWeight.medium,
|
|
601
|
+
color: theme.color.text2,
|
|
602
|
+
fontVariant: ["tabular-nums"]
|
|
603
|
+
},
|
|
604
|
+
count: {
|
|
535
605
|
fontFamily: theme.font.mono,
|
|
536
|
-
fontSize: theme.
|
|
537
|
-
|
|
606
|
+
fontSize: theme.fontSize[12],
|
|
607
|
+
fontWeight: theme.fontWeight.medium,
|
|
608
|
+
color: theme.color.text2,
|
|
538
609
|
fontVariant: ["tabular-nums"]
|
|
539
610
|
},
|
|
611
|
+
// The ChecklistLauncher recipe.
|
|
540
612
|
launcher: {
|
|
541
613
|
flexDirection: "row",
|
|
542
614
|
alignItems: "center",
|
|
543
|
-
gap: theme.space[
|
|
615
|
+
gap: theme.space[10],
|
|
544
616
|
height: theme.ctl.lg,
|
|
545
|
-
|
|
617
|
+
paddingStart: theme.space[14],
|
|
618
|
+
paddingEnd: theme.space[8],
|
|
546
619
|
borderRadius: theme.radius.full,
|
|
547
|
-
borderWidth: theme.borderWidth.
|
|
620
|
+
borderWidth: theme.borderWidth.thick,
|
|
548
621
|
// The pill's edge is the only thing separating it from the screen behind,
|
|
549
622
|
// so it is a graphical edge at 3:1 — the measured accent, not the raw one.
|
|
550
623
|
borderColor: theme.focus.ringColor,
|
|
551
624
|
backgroundColor: theme.color.surface,
|
|
552
625
|
...theme.shadow.lg
|
|
553
626
|
},
|
|
627
|
+
launcherGroup: { flexDirection: "row", alignItems: "center", gap: theme.space[8] },
|
|
628
|
+
launcherDismiss: {
|
|
629
|
+
width: theme.ctl.lg,
|
|
630
|
+
height: theme.ctl.lg,
|
|
631
|
+
alignItems: "center",
|
|
632
|
+
justifyContent: "center",
|
|
633
|
+
borderRadius: theme.radius.full,
|
|
634
|
+
borderWidth: theme.borderWidth.thick,
|
|
635
|
+
borderColor: theme.color.border,
|
|
636
|
+
backgroundColor: theme.color.surface,
|
|
637
|
+
...theme.shadow.lg
|
|
638
|
+
},
|
|
554
639
|
launcherPinned: {
|
|
555
640
|
position: "absolute",
|
|
556
|
-
|
|
641
|
+
end: theme.space[16],
|
|
557
642
|
bottom: theme.space[16]
|
|
558
643
|
},
|
|
559
644
|
launcherLabel: {
|
|
560
645
|
fontFamily: theme.font.sans,
|
|
561
|
-
fontWeight: theme.fontWeight.
|
|
562
|
-
fontSize: theme.
|
|
646
|
+
fontWeight: theme.fontWeight.semibold,
|
|
647
|
+
fontSize: theme.fontSize[16],
|
|
563
648
|
color: theme.color.accentStrong
|
|
649
|
+
},
|
|
650
|
+
// The 28 capsule.
|
|
651
|
+
launcherBadge: {
|
|
652
|
+
flexDirection: "row",
|
|
653
|
+
alignItems: "center",
|
|
654
|
+
height: theme.space[28],
|
|
655
|
+
paddingHorizontal: theme.space[10],
|
|
656
|
+
borderRadius: theme.radius.full,
|
|
657
|
+
backgroundColor: theme.color.surface2
|
|
564
658
|
}
|
|
565
659
|
}));
|
|
566
660
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { IconTile } from './chunk-XBXUBBJZ.js';
|
|
2
|
+
import { Alert } from './chunk-Z7I4ZSO6.js';
|
|
3
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
4
|
+
import { resolveTextRole } from './chunk-L4D5LHCH.js';
|
|
5
|
+
import { Switch } from './chunk-VFDQAAIW.js';
|
|
6
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
7
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
8
|
+
import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { Animated, Text, View, Linking } from 'react-native';
|
|
11
|
+
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
12
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var DEFAULT_LABELS = {
|
|
15
|
+
allow: "Continue",
|
|
16
|
+
deny: "Not now",
|
|
17
|
+
deniedTitle: "Turned off in Settings",
|
|
18
|
+
openSettings: "Open Settings",
|
|
19
|
+
unavailableCapabilities: "Unavailable until the permission is re-enabled",
|
|
20
|
+
capabilityOff: (capability) => `${capability}, off`
|
|
21
|
+
};
|
|
22
|
+
function PermissionPrimer({
|
|
23
|
+
icon = "bell",
|
|
24
|
+
title,
|
|
25
|
+
description,
|
|
26
|
+
allowLabel,
|
|
27
|
+
onAllow,
|
|
28
|
+
denyLabel,
|
|
29
|
+
onDeny,
|
|
30
|
+
motion = "full",
|
|
31
|
+
tone = "accent",
|
|
32
|
+
size = "md",
|
|
33
|
+
variant = "soft",
|
|
34
|
+
labels: labelsProp,
|
|
35
|
+
platform
|
|
36
|
+
}) {
|
|
37
|
+
const { styles } = useStyles(sheet);
|
|
38
|
+
const theme = useLoamTheme("permission");
|
|
39
|
+
const android = (platform ?? (isAndroidIdiom(theme) ? "android" : "ios")) === "android";
|
|
40
|
+
const labels = useLabels("permission", DEFAULT_LABELS, labelsProp);
|
|
41
|
+
const allow = allowLabel ?? labels.allow;
|
|
42
|
+
const deny = denyLabel ?? labels.deny;
|
|
43
|
+
const level = useResolvedMotion(motion, "permission");
|
|
44
|
+
const rise = React.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (level !== "full") return;
|
|
47
|
+
const run = Animated.spring(rise, {
|
|
48
|
+
...springConfig(theme, "ds"),
|
|
49
|
+
toValue: 1,
|
|
50
|
+
useNativeDriver: true
|
|
51
|
+
});
|
|
52
|
+
run.start();
|
|
53
|
+
return () => run.stop();
|
|
54
|
+
}, []);
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
Animated.View,
|
|
57
|
+
{
|
|
58
|
+
style: [
|
|
59
|
+
styles.primer,
|
|
60
|
+
size === "compact" && styles.primerCompact,
|
|
61
|
+
variant === "outline" && styles.primerOutline,
|
|
62
|
+
variant === "solid" && styles.primerSolid,
|
|
63
|
+
{
|
|
64
|
+
opacity: rise,
|
|
65
|
+
transform: [
|
|
66
|
+
{
|
|
67
|
+
translateY: rise.interpolate({
|
|
68
|
+
inputRange: [0, 1],
|
|
69
|
+
outputRange: [theme.space.s6, 0]
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
accessibilityRole: "alert",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
Animated.View,
|
|
79
|
+
{
|
|
80
|
+
style: [
|
|
81
|
+
{
|
|
82
|
+
transform: [{ scale: rise.interpolate({ inputRange: [0, 1], outputRange: [0.9, 1] }) }]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
children: /* @__PURE__ */ jsx(IconTile, { icon, tone, size: size === "compact" ? "md" : "lg" })
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
Text,
|
|
90
|
+
{
|
|
91
|
+
accessibilityRole: "header",
|
|
92
|
+
style: [
|
|
93
|
+
styles.primerTitle,
|
|
94
|
+
// Android: the sans headline role (24 / 400) at regular weight.
|
|
95
|
+
android && {
|
|
96
|
+
...resolveTextRole(theme, "headlineSmall", true),
|
|
97
|
+
fontFamily: theme.font.sans,
|
|
98
|
+
fontWeight: theme.fontWeight.regular
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
children: title
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsx(Text, { style: styles.primerBody, children: description }),
|
|
105
|
+
/* @__PURE__ */ jsxs(View, { style: styles.primerActions, children: [
|
|
106
|
+
/* @__PURE__ */ jsx(Button, { size: "lg", variant: "primary", fullWidth: true, accessibilityLabel: allow, onPress: onAllow, children: allow }),
|
|
107
|
+
/* @__PURE__ */ jsx(Button, { size: "lg", variant: "ghost", fullWidth: true, accessibilityLabel: deny, onPress: onDeny, children: deny })
|
|
108
|
+
] })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function PermissionDenied({
|
|
114
|
+
icon = "lock",
|
|
115
|
+
title,
|
|
116
|
+
description,
|
|
117
|
+
settingsLabel,
|
|
118
|
+
onOpenSettings,
|
|
119
|
+
capabilities = [],
|
|
120
|
+
tone = "warn",
|
|
121
|
+
variant,
|
|
122
|
+
size,
|
|
123
|
+
labels: labelsProp
|
|
124
|
+
}) {
|
|
125
|
+
const { styles } = useStyles(sheet);
|
|
126
|
+
const labels = useLabels("permission", DEFAULT_LABELS, labelsProp);
|
|
127
|
+
const titleText = title ?? labels.deniedTitle;
|
|
128
|
+
const settings = settingsLabel ?? labels.openSettings;
|
|
129
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.deniedRoot, children: [
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
Alert,
|
|
132
|
+
{
|
|
133
|
+
tone,
|
|
134
|
+
variant,
|
|
135
|
+
size,
|
|
136
|
+
icon,
|
|
137
|
+
title: titleText,
|
|
138
|
+
description,
|
|
139
|
+
action: /* @__PURE__ */ jsx(
|
|
140
|
+
Button,
|
|
141
|
+
{
|
|
142
|
+
size: "sm",
|
|
143
|
+
variant: variant === "solid" ? "tonal" : "outline",
|
|
144
|
+
accessibilityLabel: settings,
|
|
145
|
+
onPress: onOpenSettings ?? (() => void Linking.openSettings?.()),
|
|
146
|
+
children: settings
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
capabilities.length > 0 ? (
|
|
152
|
+
// Dimmed and inert: these rows show the cost of the denial, and must not
|
|
153
|
+
// look like something the user can flip on from here.
|
|
154
|
+
/* @__PURE__ */ jsx(
|
|
155
|
+
View,
|
|
156
|
+
{
|
|
157
|
+
role: "group",
|
|
158
|
+
style: styles.capList,
|
|
159
|
+
accessibilityLabel: labels.unavailableCapabilities,
|
|
160
|
+
children: capabilities.map((c) => /* @__PURE__ */ jsxs(
|
|
161
|
+
View,
|
|
162
|
+
{
|
|
163
|
+
accessible: true,
|
|
164
|
+
accessibilityRole: "text",
|
|
165
|
+
accessibilityLabel: c.on ? c.label : labels.capabilityOff(c.label),
|
|
166
|
+
"aria-disabled": c.managed || void 0,
|
|
167
|
+
style: [styles.capRow, c.managed && styles.managed],
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Text, { style: styles.capLabel, children: c.label }),
|
|
170
|
+
/* @__PURE__ */ jsx(
|
|
171
|
+
View,
|
|
172
|
+
{
|
|
173
|
+
accessible: false,
|
|
174
|
+
accessibilityElementsHidden: true,
|
|
175
|
+
importantForAccessibility: "no-hide-descendants",
|
|
176
|
+
"aria-hidden": true,
|
|
177
|
+
children: /* @__PURE__ */ jsx(Switch, { decorative: true, value: c.on ?? false, disabled: c.managed })
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
c.id
|
|
183
|
+
))
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
) : null
|
|
187
|
+
] });
|
|
188
|
+
}
|
|
189
|
+
var sheet = createStyleSheet((theme) => ({
|
|
190
|
+
// ---- primer ----
|
|
191
|
+
primer: {
|
|
192
|
+
paddingVertical: theme.space.s4,
|
|
193
|
+
paddingHorizontal: theme.space.s6,
|
|
194
|
+
borderRadius: theme.radius.lg,
|
|
195
|
+
backgroundColor: theme.color.surface,
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
gap: theme.space[13],
|
|
198
|
+
// `shadow.lg` is the only thing lifting this card off the page, and high
|
|
199
|
+
// contrast zeroes it — `edge.neutral` takes over there, and is `transparent`
|
|
200
|
+
// before that so the primer keeps its borderless look.
|
|
201
|
+
borderWidth: theme.borderWidth.base,
|
|
202
|
+
borderColor: theme.edge.neutral,
|
|
203
|
+
...theme.shadow.lg
|
|
204
|
+
},
|
|
205
|
+
primerCompact: {
|
|
206
|
+
paddingVertical: theme.space.s2,
|
|
207
|
+
paddingHorizontal: theme.space.s4,
|
|
208
|
+
gap: theme.space.s2
|
|
209
|
+
},
|
|
210
|
+
primerOutline: { borderColor: theme.color.border, shadowOpacity: 0, elevation: 0 },
|
|
211
|
+
primerSolid: { backgroundColor: theme.color.surface2, shadowOpacity: 0, elevation: 0 },
|
|
212
|
+
primerTitle: {
|
|
213
|
+
fontFamily: theme.font.sans,
|
|
214
|
+
fontWeight: theme.fontWeight.semibold,
|
|
215
|
+
fontSize: theme.type.title3.fontSize,
|
|
216
|
+
color: theme.color.text,
|
|
217
|
+
textAlign: "center"
|
|
218
|
+
},
|
|
219
|
+
primerBody: {
|
|
220
|
+
fontFamily: theme.font.sans,
|
|
221
|
+
fontSize: theme.type.footnote.fontSize,
|
|
222
|
+
lineHeight: theme.type.footnote.fontSize * 1.5,
|
|
223
|
+
color: theme.color.text2,
|
|
224
|
+
textAlign: "center"
|
|
225
|
+
},
|
|
226
|
+
primerActions: { alignSelf: "stretch", gap: theme.space.s2 },
|
|
227
|
+
flowRoot: { gap: theme.space.s4 },
|
|
228
|
+
// ---- denied ----
|
|
229
|
+
deniedRoot: { gap: theme.space.s4 },
|
|
230
|
+
capList: {
|
|
231
|
+
borderRadius: theme.radius.lg,
|
|
232
|
+
borderWidth: theme.borderWidth.base,
|
|
233
|
+
borderColor: theme.color.border,
|
|
234
|
+
backgroundColor: theme.color.surface,
|
|
235
|
+
overflow: "hidden",
|
|
236
|
+
pointerEvents: "none"
|
|
237
|
+
},
|
|
238
|
+
capRow: {
|
|
239
|
+
flexDirection: "row",
|
|
240
|
+
alignItems: "center",
|
|
241
|
+
justifyContent: "space-between",
|
|
242
|
+
padding: theme.space[14],
|
|
243
|
+
borderBottomWidth: theme.borderWidth.base,
|
|
244
|
+
borderBottomColor: theme.color.border
|
|
245
|
+
},
|
|
246
|
+
capLabel: {
|
|
247
|
+
fontFamily: theme.font.sans,
|
|
248
|
+
fontSize: theme.fontSize[14],
|
|
249
|
+
color: theme.color.text
|
|
250
|
+
},
|
|
251
|
+
managed: { opacity: theme.state.disabledOpacity }
|
|
252
|
+
}));
|
|
253
|
+
function permissionShowsDenied(status, denials, os) {
|
|
254
|
+
if (status === "blocked") return true;
|
|
255
|
+
if (status !== "denied") return false;
|
|
256
|
+
return os === "ios" || denials >= 2;
|
|
257
|
+
}
|
|
258
|
+
function PermissionFlow({
|
|
259
|
+
status,
|
|
260
|
+
denials = 0,
|
|
261
|
+
platform,
|
|
262
|
+
primer,
|
|
263
|
+
denied,
|
|
264
|
+
icon,
|
|
265
|
+
size,
|
|
266
|
+
variant,
|
|
267
|
+
action
|
|
268
|
+
}) {
|
|
269
|
+
const theme = useLoamTheme("permission");
|
|
270
|
+
const { styles } = useStyles(sheet);
|
|
271
|
+
if (status === "granted") return null;
|
|
272
|
+
const os = platform ?? (isAndroidIdiom(theme) ? "android" : "ios");
|
|
273
|
+
const showsDenied = permissionShowsDenied(status, denials, os);
|
|
274
|
+
const shown = showsDenied ? /* @__PURE__ */ jsx(PermissionDenied, { icon, size, variant, ...denied }) : /* @__PURE__ */ jsx(PermissionPrimer, { platform: os, icon, size, variant, ...primer });
|
|
275
|
+
if (action === void 0 || action === null) return shown;
|
|
276
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.flowRoot, children: [
|
|
277
|
+
shown,
|
|
278
|
+
action
|
|
279
|
+
] });
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export { PermissionDenied, PermissionFlow, PermissionPrimer, permissionShowsDenied };
|