@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
package/dist/chunk-2TXERVVA.js
DELETED
|
@@ -1,1081 +0,0 @@
|
|
|
1
|
-
import { Avatar } from './chunk-V2OEB75Z.js';
|
|
2
|
-
import { useLabels } from './chunk-APCWFOZW.js';
|
|
3
|
-
import { Icon } from './chunk-UXGIW7OK.js';
|
|
4
|
-
import * as React4 from 'react';
|
|
5
|
-
import { Platform, View, Text, Pressable, Animated, Easing } from 'react-native';
|
|
6
|
-
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
7
|
-
import { MEDIA, OVERLAY_ALPHA } from '@btndprojects/loam-tokens';
|
|
8
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
var APP_ICON_ASSET_PX = {
|
|
11
|
-
store: 1024,
|
|
12
|
-
home: 180,
|
|
13
|
-
spotlight: 120,
|
|
14
|
-
settings: 58
|
|
15
|
-
};
|
|
16
|
-
var APP_ICON_PREVIEW_PX = {
|
|
17
|
-
store: 76,
|
|
18
|
-
home: 56,
|
|
19
|
-
spotlight: 40,
|
|
20
|
-
settings: 28
|
|
21
|
-
};
|
|
22
|
-
var IOS_ICON_CORNER_RATIO = 0.23;
|
|
23
|
-
var ANDROID_ICON_MASK_RATIO = 0.5;
|
|
24
|
-
var ICON_SAFE_MARGIN = { iOS: 0.18, android: 0.25 };
|
|
25
|
-
var ICON_MARK_RATIO = { size: 0.46, radius: 0.1 };
|
|
26
|
-
var LAUNCH_MARK = { size: 64, radius: 18 };
|
|
27
|
-
var DYNAMIC_ISLAND = { height: 37, minWidth: 122 };
|
|
28
|
-
var DYNAMIC_ISLAND_FILL = "#000000";
|
|
29
|
-
var LIVE_ACTIVITY_MAX_H = 160;
|
|
30
|
-
var LIVE_ACTIVITY_CARD = { tile: 34, tileRadius: 11, trackH: 4 };
|
|
31
|
-
var WIDGET_SIZE = {
|
|
32
|
-
small: { width: 170, height: 170 },
|
|
33
|
-
medium: { width: 364, height: 170 },
|
|
34
|
-
large: { width: 364, height: 382 }
|
|
35
|
-
};
|
|
36
|
-
var WIDGET_CORNER = { iOS: 22, android: 28 };
|
|
37
|
-
var WIDGET_INNER_CORNER_ANDROID = 20;
|
|
38
|
-
var IOS_EDIT_MENU_RADIUS = 10;
|
|
39
|
-
var SHEET_GRABBER_W = 36;
|
|
40
|
-
var OS_MATERIAL = {
|
|
41
|
-
/** Live-activity / prominent card fill (reference: `rgba(255,255,255,.14)`). */
|
|
42
|
-
fill: `rgba(255,255,255,${OVERLAY_ALPHA.a5})`,
|
|
43
|
-
/** Notification card fill (reference: `rgba(255,255,255,.12)`). */
|
|
44
|
-
fillWeak: `rgba(255,255,255,${OVERLAY_ALPHA.a4})`,
|
|
45
|
-
/** Progress track over material (reference: `rgba(255,255,255,.25)`). */
|
|
46
|
-
track: `rgba(255,255,255,${OVERLAY_ALPHA.a8})`,
|
|
47
|
-
/** Primary ink on material. White, because the backdrop is a wallpaper. */
|
|
48
|
-
ink: MEDIA.ink,
|
|
49
|
-
/**
|
|
50
|
-
* Divider between items in a system menu (reference: `rgba(128,128,128,.35)`).
|
|
51
|
-
*
|
|
52
|
-
* The one value here that is genuinely not a ramp stop, and could not be: a
|
|
53
|
-
* mid-grey at 35% is the only wash that stays visible over *both* light and
|
|
54
|
-
* dark OS chrome, which is a different requirement from every other entry —
|
|
55
|
-
* those all know the backdrop is dark. Neither a white nor a black stop can
|
|
56
|
-
* do it, so the literal stands, with this as the reason.
|
|
57
|
-
*/
|
|
58
|
-
divider: "rgba(128,128,128,0.35)"
|
|
59
|
-
};
|
|
60
|
-
var OS_MATERIAL_INK_OPACITY = { secondary: 0.85, tertiary: 0.7 };
|
|
61
|
-
var LOCK_SCREEN_WALLPAPER = "#2b2620";
|
|
62
|
-
|
|
63
|
-
// src/os-surfaces/labels.ts
|
|
64
|
-
var DEFAULT_LABELS = {
|
|
65
|
-
appIconPreview: (px, sizeClass, shape) => `App icon preview, ${px} px ${sizeClass}, ${shape} mask`,
|
|
66
|
-
launchScreenPreview: "Launch screen preview",
|
|
67
|
-
cancel: "Cancel",
|
|
68
|
-
moreGrouped: (count) => `+${count} more`,
|
|
69
|
-
lockScreenPreview: "Lock screen preview",
|
|
70
|
-
shareSheetPreview: "Share sheet preview",
|
|
71
|
-
shareWith: (name) => `Share with ${name}`,
|
|
72
|
-
textSelectionMenu: "Text selection menu"
|
|
73
|
-
};
|
|
74
|
-
function AppIconPreview({
|
|
75
|
-
sizeClass = "home",
|
|
76
|
-
size,
|
|
77
|
-
shape,
|
|
78
|
-
showCaption = false,
|
|
79
|
-
accessibilityLabel,
|
|
80
|
-
labels: labelsProp
|
|
81
|
-
}) {
|
|
82
|
-
const { styles } = useStyles(sheet);
|
|
83
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, labelsProp);
|
|
84
|
-
const theme = useLoamTheme("os-surfaces");
|
|
85
|
-
const px = size ?? APP_ICON_PREVIEW_PX[sizeClass];
|
|
86
|
-
const resolved = shape ?? (Platform.OS === "android" ? "circle" : "squircle");
|
|
87
|
-
const radius = resolved === "circle" ? px * ANDROID_ICON_MASK_RATIO : Math.round(px * IOS_ICON_CORNER_RATIO);
|
|
88
|
-
const mark = Math.round(px * ICON_MARK_RATIO.size);
|
|
89
|
-
const caption = `${APP_ICON_ASSET_PX[sizeClass]} ${sizeClass}`;
|
|
90
|
-
return /* @__PURE__ */ jsxs(View, { style: styles.cell, children: [
|
|
91
|
-
/* @__PURE__ */ jsx(
|
|
92
|
-
View,
|
|
93
|
-
{
|
|
94
|
-
accessibilityRole: "image",
|
|
95
|
-
accessibilityLabel: accessibilityLabel ?? labels.appIconPreview(APP_ICON_ASSET_PX[sizeClass], sizeClass, resolved),
|
|
96
|
-
style: [
|
|
97
|
-
styles.tile,
|
|
98
|
-
{
|
|
99
|
-
width: px,
|
|
100
|
-
height: px,
|
|
101
|
-
borderRadius: radius,
|
|
102
|
-
// The reference paints a 160° accent gradient; RN has no gradient
|
|
103
|
-
// primitive without a dependency, so the icon is a flat accent.
|
|
104
|
-
backgroundColor: theme.color.accent
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
children: /* @__PURE__ */ jsx(
|
|
108
|
-
View,
|
|
109
|
-
{
|
|
110
|
-
style: [
|
|
111
|
-
styles.mark,
|
|
112
|
-
{
|
|
113
|
-
width: mark,
|
|
114
|
-
height: mark,
|
|
115
|
-
borderRadius: Math.round(px * ICON_MARK_RATIO.radius)
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
showCaption ? /* @__PURE__ */ jsx(Text, { style: styles.caption, children: caption }) : null
|
|
123
|
-
] });
|
|
124
|
-
}
|
|
125
|
-
var sheet = createStyleSheet((theme) => ({
|
|
126
|
-
cell: { alignItems: "center", gap: theme.space.s1 },
|
|
127
|
-
tile: {
|
|
128
|
-
alignItems: "center",
|
|
129
|
-
justifyContent: "center",
|
|
130
|
-
overflow: "hidden",
|
|
131
|
-
...theme.shadow.md
|
|
132
|
-
},
|
|
133
|
-
// `accentInk` is the measured foreground for the accent fill — the mark must
|
|
134
|
-
// stay legible on it in both modes and under every tenant.
|
|
135
|
-
mark: { backgroundColor: theme.color.accentInk, opacity: theme.opacity[92] },
|
|
136
|
-
caption: {
|
|
137
|
-
fontFamily: theme.font.mono,
|
|
138
|
-
fontSize: theme.type.caption2.fontSize,
|
|
139
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
140
|
-
color: theme.color.text3
|
|
141
|
-
}
|
|
142
|
-
}));
|
|
143
|
-
function LaunchScreenPreview({
|
|
144
|
-
wordmark,
|
|
145
|
-
reviewNote,
|
|
146
|
-
accessibilityLabel,
|
|
147
|
-
labels: labelsProp
|
|
148
|
-
}) {
|
|
149
|
-
const { styles } = useStyles(sheet2);
|
|
150
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, labelsProp);
|
|
151
|
-
return /* @__PURE__ */ jsxs(
|
|
152
|
-
View,
|
|
153
|
-
{
|
|
154
|
-
accessibilityRole: "image",
|
|
155
|
-
accessibilityLabel: accessibilityLabel ?? labels.launchScreenPreview,
|
|
156
|
-
style: styles.screen,
|
|
157
|
-
children: [
|
|
158
|
-
/* @__PURE__ */ jsxs(View, { style: styles.stack, children: [
|
|
159
|
-
/* @__PURE__ */ jsx(View, { style: styles.mark }),
|
|
160
|
-
wordmark ? /* @__PURE__ */ jsx(Text, { style: styles.wordmark, children: wordmark }) : null
|
|
161
|
-
] }),
|
|
162
|
-
reviewNote ? /* @__PURE__ */ jsx(Text, { style: styles.note, children: reviewNote }) : null
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
var sheet2 = createStyleSheet((theme) => ({
|
|
168
|
-
// The reference paints a flat `var(--accent)` here — the one screen in the
|
|
169
|
-
// system that is a single brand colour edge to edge.
|
|
170
|
-
screen: {
|
|
171
|
-
flex: 1,
|
|
172
|
-
backgroundColor: theme.color.accent,
|
|
173
|
-
alignItems: "center",
|
|
174
|
-
justifyContent: "center",
|
|
175
|
-
padding: theme.layout.screenPad
|
|
176
|
-
},
|
|
177
|
-
stack: { alignItems: "center", gap: theme.space.s4 },
|
|
178
|
-
// OS-mandated-ish geometry: 64px at an 18px radius, from the reference. It has
|
|
179
|
-
// to match the app icon's mark, not a Loam radius step.
|
|
180
|
-
mark: {
|
|
181
|
-
width: LAUNCH_MARK.size,
|
|
182
|
-
height: LAUNCH_MARK.size,
|
|
183
|
-
borderRadius: LAUNCH_MARK.radius,
|
|
184
|
-
backgroundColor: theme.color.accentInk,
|
|
185
|
-
opacity: theme.opacity[96]
|
|
186
|
-
},
|
|
187
|
-
wordmark: {
|
|
188
|
-
fontFamily: theme.font.display,
|
|
189
|
-
fontWeight: theme.font.displayWeight,
|
|
190
|
-
fontSize: theme.type.title3.fontSize,
|
|
191
|
-
lineHeight: theme.type.title3.lineHeight,
|
|
192
|
-
letterSpacing: theme.type.title3.letterSpacing,
|
|
193
|
-
color: theme.color.accentInk
|
|
194
|
-
},
|
|
195
|
-
note: {
|
|
196
|
-
position: "absolute",
|
|
197
|
-
bottom: theme.space.s6,
|
|
198
|
-
fontFamily: theme.font.sans,
|
|
199
|
-
fontSize: theme.type.caption1.fontSize,
|
|
200
|
-
lineHeight: theme.type.caption1.lineHeight,
|
|
201
|
-
// Full `accentInk` (no alpha): at 0.7 it composited to ~#ecccc4 on the accent
|
|
202
|
-
// fill = 3.02:1 (WCAG fail); the solid ink clears AA at 4.53:1.
|
|
203
|
-
color: theme.color.accentInk,
|
|
204
|
-
textAlign: "center"
|
|
205
|
-
}
|
|
206
|
-
}));
|
|
207
|
-
var NOTIFICATION_TILE = { size: 26, radius: 8 };
|
|
208
|
-
var GROUP_STACK_OFFSET = 6;
|
|
209
|
-
function announce({ appName, title, body, time, groupCount }, labels) {
|
|
210
|
-
return [
|
|
211
|
-
appName,
|
|
212
|
-
title,
|
|
213
|
-
body,
|
|
214
|
-
time,
|
|
215
|
-
groupCount && groupCount > 0 ? labels.moreGrouped(groupCount) : void 0
|
|
216
|
-
].filter(Boolean).join(", ");
|
|
217
|
-
}
|
|
218
|
-
function NotificationBanner(props) {
|
|
219
|
-
const { styles } = useStyles(sheet3);
|
|
220
|
-
const theme = useLoamTheme("os-surfaces");
|
|
221
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, props.labels);
|
|
222
|
-
const { appName, icon, title, body, time, actionLabel, onAction, onPress, groupCount, style } = props;
|
|
223
|
-
const android = Platform.OS === "android";
|
|
224
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
225
|
-
/* @__PURE__ */ jsx(View, { style: styles.tile, children: /* @__PURE__ */ jsx(Icon, { name: icon ?? "bell", size: theme.icon.sm, color: theme.color.accentInk }) }),
|
|
226
|
-
/* @__PURE__ */ jsxs(View, { style: styles.main, children: [
|
|
227
|
-
android && appName ? /* @__PURE__ */ jsxs(Text, { style: styles.appName, children: [
|
|
228
|
-
appName,
|
|
229
|
-
time ? ` \xB7 ${time}` : ""
|
|
230
|
-
] }) : null,
|
|
231
|
-
/* @__PURE__ */ jsxs(View, { style: styles.titleRow, children: [
|
|
232
|
-
/* @__PURE__ */ jsx(Text, { style: styles.title, numberOfLines: 1, children: title }),
|
|
233
|
-
!android && time ? /* @__PURE__ */ jsx(Text, { style: styles.time, children: time }) : null
|
|
234
|
-
] }),
|
|
235
|
-
/* @__PURE__ */ jsx(Text, { style: styles.body, numberOfLines: 2, children: body }),
|
|
236
|
-
groupCount && groupCount > 0 ? /* @__PURE__ */ jsx(Text, { style: styles.group, children: labels.moreGrouped(groupCount) }) : null
|
|
237
|
-
] })
|
|
238
|
-
] });
|
|
239
|
-
return /* @__PURE__ */ jsxs(View, { style: styles.stackRoot, children: [
|
|
240
|
-
/* @__PURE__ */ jsxs(View, { style: [styles.banner, style], children: [
|
|
241
|
-
onPress ? /* @__PURE__ */ jsx(
|
|
242
|
-
Pressable,
|
|
243
|
-
{
|
|
244
|
-
accessibilityRole: "button",
|
|
245
|
-
accessibilityLabel: announce(props, labels),
|
|
246
|
-
onPress,
|
|
247
|
-
style: ({ pressed }) => [styles.bannerBody, pressed ? styles.pressed : null],
|
|
248
|
-
children: content
|
|
249
|
-
}
|
|
250
|
-
) : /* @__PURE__ */ jsx(
|
|
251
|
-
View,
|
|
252
|
-
{
|
|
253
|
-
accessibilityRole: "image",
|
|
254
|
-
accessibilityLabel: announce(props, labels),
|
|
255
|
-
style: styles.bannerBody,
|
|
256
|
-
children: content
|
|
257
|
-
}
|
|
258
|
-
),
|
|
259
|
-
actionLabel ? /* @__PURE__ */ jsx(
|
|
260
|
-
Pressable,
|
|
261
|
-
{
|
|
262
|
-
accessibilityRole: "button",
|
|
263
|
-
accessibilityLabel: actionLabel,
|
|
264
|
-
onPress: onAction,
|
|
265
|
-
style: ({ pressed }) => [styles.action, pressed ? styles.pressed : null],
|
|
266
|
-
children: /* @__PURE__ */ jsx(Text, { style: styles.actionLabel, children: actionLabel })
|
|
267
|
-
}
|
|
268
|
-
) : null
|
|
269
|
-
] }),
|
|
270
|
-
groupCount && groupCount > 0 ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, style: styles.stackPeek }) : null
|
|
271
|
-
] });
|
|
272
|
-
}
|
|
273
|
-
function LockScreenNotification(props) {
|
|
274
|
-
const { styles } = useStyles(sheet3);
|
|
275
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, props.labels);
|
|
276
|
-
const { title, body, time, actionLabel, onAction, onPress, groupCount, style } = props;
|
|
277
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
278
|
-
/* @__PURE__ */ jsx(View, { style: styles.materialTile }),
|
|
279
|
-
/* @__PURE__ */ jsxs(View, { style: styles.main, children: [
|
|
280
|
-
/* @__PURE__ */ jsxs(View, { style: styles.titleRow, children: [
|
|
281
|
-
/* @__PURE__ */ jsx(Text, { style: styles.materialTitle, numberOfLines: 1, children: title }),
|
|
282
|
-
time ? /* @__PURE__ */ jsx(Text, { style: styles.materialTime, children: time }) : null
|
|
283
|
-
] }),
|
|
284
|
-
/* @__PURE__ */ jsx(Text, { style: styles.materialBody, numberOfLines: 2, children: body }),
|
|
285
|
-
groupCount && groupCount > 0 ? /* @__PURE__ */ jsx(Text, { style: styles.materialTime, children: labels.moreGrouped(groupCount) }) : null
|
|
286
|
-
] })
|
|
287
|
-
] });
|
|
288
|
-
return /* @__PURE__ */ jsxs(View, { style: styles.stackRoot, children: [
|
|
289
|
-
/* @__PURE__ */ jsxs(View, { style: [styles.materialCard, style], children: [
|
|
290
|
-
onPress ? /* @__PURE__ */ jsx(
|
|
291
|
-
Pressable,
|
|
292
|
-
{
|
|
293
|
-
accessibilityRole: "button",
|
|
294
|
-
accessibilityLabel: announce(props, labels),
|
|
295
|
-
onPress,
|
|
296
|
-
style: ({ pressed }) => [styles.materialBodyRow, pressed ? styles.pressed : null],
|
|
297
|
-
children: content
|
|
298
|
-
}
|
|
299
|
-
) : /* @__PURE__ */ jsx(
|
|
300
|
-
View,
|
|
301
|
-
{
|
|
302
|
-
accessibilityRole: "image",
|
|
303
|
-
accessibilityLabel: announce(props, labels),
|
|
304
|
-
style: styles.materialBodyRow,
|
|
305
|
-
children: content
|
|
306
|
-
}
|
|
307
|
-
),
|
|
308
|
-
actionLabel ? /* @__PURE__ */ jsx(
|
|
309
|
-
Pressable,
|
|
310
|
-
{
|
|
311
|
-
accessibilityRole: "button",
|
|
312
|
-
accessibilityLabel: actionLabel,
|
|
313
|
-
onPress: onAction,
|
|
314
|
-
style: ({ pressed }) => [styles.materialAction, pressed ? styles.pressed : null],
|
|
315
|
-
children: /* @__PURE__ */ jsx(Text, { style: styles.materialActionLabel, children: actionLabel })
|
|
316
|
-
}
|
|
317
|
-
) : null
|
|
318
|
-
] }),
|
|
319
|
-
groupCount && groupCount > 0 ? /* @__PURE__ */ jsx(View, { "aria-hidden": true, style: [styles.stackPeek, styles.stackPeekMaterial] }) : null
|
|
320
|
-
] });
|
|
321
|
-
}
|
|
322
|
-
function LockScreenPreview({
|
|
323
|
-
time,
|
|
324
|
-
date,
|
|
325
|
-
activity,
|
|
326
|
-
notifications = [],
|
|
327
|
-
onNotificationPress,
|
|
328
|
-
wallpaperColor = LOCK_SCREEN_WALLPAPER,
|
|
329
|
-
labels: labelsProp
|
|
330
|
-
}) {
|
|
331
|
-
const { styles } = useStyles(sheet3);
|
|
332
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, labelsProp);
|
|
333
|
-
return /* @__PURE__ */ jsxs(
|
|
334
|
-
View,
|
|
335
|
-
{
|
|
336
|
-
role: "group",
|
|
337
|
-
accessibilityLabel: labels.lockScreenPreview,
|
|
338
|
-
style: [styles.lockScreen, { backgroundColor: wallpaperColor }],
|
|
339
|
-
children: [
|
|
340
|
-
/* @__PURE__ */ jsxs(View, { style: styles.clock, children: [
|
|
341
|
-
/* @__PURE__ */ jsx(Text, { style: styles.clockDate, children: date }),
|
|
342
|
-
/* @__PURE__ */ jsx(Text, { style: styles.clockTime, children: time })
|
|
343
|
-
] }),
|
|
344
|
-
activity,
|
|
345
|
-
notifications.map((n) => /* @__PURE__ */ jsx(
|
|
346
|
-
LockScreenNotification,
|
|
347
|
-
{
|
|
348
|
-
title: n.title,
|
|
349
|
-
body: n.body,
|
|
350
|
-
time: n.time,
|
|
351
|
-
appName: n.appName,
|
|
352
|
-
icon: n.icon,
|
|
353
|
-
onPress: onNotificationPress ? () => onNotificationPress(n.id) : void 0
|
|
354
|
-
},
|
|
355
|
-
n.id
|
|
356
|
-
))
|
|
357
|
-
]
|
|
358
|
-
}
|
|
359
|
-
);
|
|
360
|
-
}
|
|
361
|
-
var sheet3 = createStyleSheet((theme) => ({
|
|
362
|
-
stackRoot: { alignSelf: "stretch" },
|
|
363
|
-
// Sits directly under the card, inset on both sides and rounded only at the
|
|
364
|
-
// bottom, so it reads as a second card behind the front one without ever
|
|
365
|
-
// intersecting it (no translucency doubling) or leaving the entry's own box.
|
|
366
|
-
stackPeek: {
|
|
367
|
-
height: theme.space[GROUP_STACK_OFFSET],
|
|
368
|
-
marginHorizontal: theme.space.s2,
|
|
369
|
-
borderBottomStartRadius: theme.radius.lg,
|
|
370
|
-
borderBottomEndRadius: theme.radius.lg,
|
|
371
|
-
backgroundColor: theme.color.surface2
|
|
372
|
-
},
|
|
373
|
-
// Dimmed, because two layers of the same material would read as one tall card
|
|
374
|
-
// rather than as a stack. `surface2` behind the opaque banner needs no help.
|
|
375
|
-
stackPeekMaterial: {
|
|
376
|
-
backgroundColor: OS_MATERIAL.fillWeak,
|
|
377
|
-
opacity: OS_MATERIAL_INK_OPACITY.tertiary
|
|
378
|
-
},
|
|
379
|
-
// ---- banner (over the app's own window: Loam tokens) ----
|
|
380
|
-
banner: {
|
|
381
|
-
flexDirection: "row",
|
|
382
|
-
alignItems: "center",
|
|
383
|
-
gap: theme.space.s3,
|
|
384
|
-
padding: theme.space.s3,
|
|
385
|
-
borderRadius: theme.radius.lg,
|
|
386
|
-
backgroundColor: theme.color.surface,
|
|
387
|
-
borderWidth: theme.borderWidth.base,
|
|
388
|
-
borderColor: theme.color.border,
|
|
389
|
-
...theme.shadow.lg
|
|
390
|
-
},
|
|
391
|
-
bannerBody: {
|
|
392
|
-
flex: 1,
|
|
393
|
-
flexDirection: "row",
|
|
394
|
-
alignItems: "center",
|
|
395
|
-
gap: theme.space.s3,
|
|
396
|
-
minHeight: theme.tapMin
|
|
397
|
-
},
|
|
398
|
-
pressed: { opacity: theme.state.pressedOpacity },
|
|
399
|
-
tile: {
|
|
400
|
-
width: NOTIFICATION_TILE.size,
|
|
401
|
-
height: NOTIFICATION_TILE.size,
|
|
402
|
-
borderRadius: NOTIFICATION_TILE.radius,
|
|
403
|
-
flexShrink: 0,
|
|
404
|
-
alignItems: "center",
|
|
405
|
-
justifyContent: "center",
|
|
406
|
-
backgroundColor: theme.color.accent
|
|
407
|
-
},
|
|
408
|
-
main: { flex: 1, minWidth: 0, gap: theme.space.s1 },
|
|
409
|
-
titleRow: { flexDirection: "row", alignItems: "center", gap: theme.space.s2 },
|
|
410
|
-
appName: {
|
|
411
|
-
fontFamily: theme.font.sans,
|
|
412
|
-
fontSize: theme.type.caption2.fontSize,
|
|
413
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
414
|
-
color: theme.color.text3
|
|
415
|
-
},
|
|
416
|
-
title: {
|
|
417
|
-
flex: 1,
|
|
418
|
-
fontFamily: theme.font.sans,
|
|
419
|
-
fontWeight: theme.fontWeight.bold,
|
|
420
|
-
fontSize: theme.type.footnote.fontSize,
|
|
421
|
-
lineHeight: theme.type.footnote.lineHeight,
|
|
422
|
-
color: theme.color.text
|
|
423
|
-
},
|
|
424
|
-
time: {
|
|
425
|
-
fontFamily: theme.font.sans,
|
|
426
|
-
fontSize: theme.type.caption2.fontSize,
|
|
427
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
428
|
-
color: theme.color.text3
|
|
429
|
-
},
|
|
430
|
-
body: {
|
|
431
|
-
fontFamily: theme.font.sans,
|
|
432
|
-
fontSize: theme.type.footnote.fontSize,
|
|
433
|
-
lineHeight: theme.type.footnote.lineHeight,
|
|
434
|
-
color: theme.color.text2
|
|
435
|
-
},
|
|
436
|
-
group: {
|
|
437
|
-
fontFamily: theme.font.sans,
|
|
438
|
-
fontSize: theme.type.caption2.fontSize,
|
|
439
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
440
|
-
color: theme.color.text3
|
|
441
|
-
},
|
|
442
|
-
action: {
|
|
443
|
-
minHeight: theme.tapMin,
|
|
444
|
-
justifyContent: "center",
|
|
445
|
-
paddingHorizontal: theme.space.s3,
|
|
446
|
-
flexShrink: 0
|
|
447
|
-
},
|
|
448
|
-
actionLabel: {
|
|
449
|
-
fontFamily: theme.font.sans,
|
|
450
|
-
fontWeight: theme.fontWeight.bold,
|
|
451
|
-
fontSize: theme.type.footnote.fontSize,
|
|
452
|
-
color: theme.color.accentStrong
|
|
453
|
-
},
|
|
454
|
-
// ---- lock screen / notification centre (OS material over a wallpaper) ----
|
|
455
|
-
lockScreen: {
|
|
456
|
-
flex: 1,
|
|
457
|
-
paddingHorizontal: theme.space.s3,
|
|
458
|
-
paddingTop: theme.space.s6,
|
|
459
|
-
gap: theme.space.s3
|
|
460
|
-
},
|
|
461
|
-
clock: { alignItems: "center", gap: theme.space.s1 },
|
|
462
|
-
clockDate: {
|
|
463
|
-
fontFamily: theme.font.sans,
|
|
464
|
-
fontSize: theme.type.caption1.fontSize,
|
|
465
|
-
lineHeight: theme.type.caption1.lineHeight,
|
|
466
|
-
color: OS_MATERIAL.ink,
|
|
467
|
-
opacity: OS_MATERIAL_INK_OPACITY.secondary
|
|
468
|
-
},
|
|
469
|
-
// The lock-screen clock is OS chrome with no counterpart in the semantic ramp,
|
|
470
|
-
// so it takes the size-only `hero` step (52) the reference specifies.
|
|
471
|
-
clockTime: {
|
|
472
|
-
fontFamily: theme.font.display,
|
|
473
|
-
fontWeight: theme.font.displayWeight,
|
|
474
|
-
fontSize: theme.fontSize[56],
|
|
475
|
-
lineHeight: theme.fontSize[56] * theme.lineHeight.tight,
|
|
476
|
-
color: OS_MATERIAL.ink
|
|
477
|
-
},
|
|
478
|
-
materialCard: {
|
|
479
|
-
flexDirection: "row",
|
|
480
|
-
alignItems: "center",
|
|
481
|
-
gap: theme.space.s3,
|
|
482
|
-
padding: theme.space.s3,
|
|
483
|
-
borderRadius: theme.radius.lg,
|
|
484
|
-
// Translucent scrim, NOT a blur: RN has no `backdrop-filter`. See OS_MATERIAL.
|
|
485
|
-
backgroundColor: OS_MATERIAL.fillWeak
|
|
486
|
-
},
|
|
487
|
-
materialBodyRow: {
|
|
488
|
-
flex: 1,
|
|
489
|
-
flexDirection: "row",
|
|
490
|
-
alignItems: "center",
|
|
491
|
-
gap: theme.space.s3,
|
|
492
|
-
minHeight: theme.tapMin
|
|
493
|
-
},
|
|
494
|
-
materialTile: {
|
|
495
|
-
width: NOTIFICATION_TILE.size,
|
|
496
|
-
height: NOTIFICATION_TILE.size,
|
|
497
|
-
borderRadius: NOTIFICATION_TILE.radius,
|
|
498
|
-
flexShrink: 0,
|
|
499
|
-
backgroundColor: theme.color.accent
|
|
500
|
-
},
|
|
501
|
-
materialTitle: {
|
|
502
|
-
flex: 1,
|
|
503
|
-
fontFamily: theme.font.sans,
|
|
504
|
-
fontWeight: theme.fontWeight.bold,
|
|
505
|
-
fontSize: theme.type.footnote.fontSize,
|
|
506
|
-
lineHeight: theme.type.footnote.lineHeight,
|
|
507
|
-
color: OS_MATERIAL.ink
|
|
508
|
-
},
|
|
509
|
-
materialTime: {
|
|
510
|
-
fontFamily: theme.font.sans,
|
|
511
|
-
fontSize: theme.type.caption2.fontSize,
|
|
512
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
513
|
-
color: OS_MATERIAL.ink,
|
|
514
|
-
opacity: OS_MATERIAL_INK_OPACITY.tertiary
|
|
515
|
-
},
|
|
516
|
-
materialBody: {
|
|
517
|
-
fontFamily: theme.font.sans,
|
|
518
|
-
fontSize: theme.type.footnote.fontSize,
|
|
519
|
-
lineHeight: theme.type.footnote.lineHeight,
|
|
520
|
-
color: OS_MATERIAL.ink,
|
|
521
|
-
opacity: OS_MATERIAL_INK_OPACITY.secondary
|
|
522
|
-
},
|
|
523
|
-
materialAction: {
|
|
524
|
-
minHeight: theme.tapMin,
|
|
525
|
-
justifyContent: "center",
|
|
526
|
-
paddingHorizontal: theme.space.s3,
|
|
527
|
-
flexShrink: 0
|
|
528
|
-
},
|
|
529
|
-
materialActionLabel: {
|
|
530
|
-
fontFamily: theme.font.sans,
|
|
531
|
-
fontWeight: theme.fontWeight.bold,
|
|
532
|
-
fontSize: theme.type.footnote.fontSize,
|
|
533
|
-
color: OS_MATERIAL.ink
|
|
534
|
-
}
|
|
535
|
-
}));
|
|
536
|
-
function clamp01(n) {
|
|
537
|
-
return Math.max(0, Math.min(1, n));
|
|
538
|
-
}
|
|
539
|
-
function LiveActivityPreview({
|
|
540
|
-
title,
|
|
541
|
-
progress,
|
|
542
|
-
status,
|
|
543
|
-
detail,
|
|
544
|
-
icon = "upload",
|
|
545
|
-
presentation = "lockScreen",
|
|
546
|
-
cancelLabel,
|
|
547
|
-
onCancel,
|
|
548
|
-
accessibilityLabel,
|
|
549
|
-
labels: labelsProp
|
|
550
|
-
}) {
|
|
551
|
-
const { styles } = useStyles(sheet4);
|
|
552
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, labelsProp);
|
|
553
|
-
const theme = useLoamTheme("os-surfaces");
|
|
554
|
-
const announced = accessibilityLabel ?? [title, status, detail].filter(Boolean).join(", ");
|
|
555
|
-
const fraction = progress === void 0 ? void 0 : clamp01(progress);
|
|
556
|
-
const percent = fraction === void 0 ? void 0 : Math.round(fraction * 100);
|
|
557
|
-
const grow = React4.useRef(new Animated.Value(fraction ?? 0)).current;
|
|
558
|
-
React4.useEffect(() => {
|
|
559
|
-
if (fraction === void 0) return;
|
|
560
|
-
Animated.timing(grow, {
|
|
561
|
-
toValue: fraction,
|
|
562
|
-
duration: theme.motion.expand.duration,
|
|
563
|
-
easing: Easing.bezier(...theme.motion.expand.easing),
|
|
564
|
-
useNativeDriver: false
|
|
565
|
-
}).start();
|
|
566
|
-
}, [fraction, grow, theme.motion.expand.duration, theme.motion.expand.easing]);
|
|
567
|
-
const width = grow.interpolate({
|
|
568
|
-
inputRange: [0, 1],
|
|
569
|
-
outputRange: ["0%", "100%"]
|
|
570
|
-
});
|
|
571
|
-
if (presentation === "island") {
|
|
572
|
-
const android = Platform.OS === "android";
|
|
573
|
-
return /* @__PURE__ */ jsxs(
|
|
574
|
-
View,
|
|
575
|
-
{
|
|
576
|
-
accessibilityRole: "progressbar",
|
|
577
|
-
accessibilityLabel: announced,
|
|
578
|
-
accessibilityValue: percent === void 0 ? void 0 : { now: percent, min: 0, max: 100 },
|
|
579
|
-
"aria-valuenow": percent,
|
|
580
|
-
"aria-valuemin": percent === void 0 ? void 0 : 0,
|
|
581
|
-
"aria-valuemax": percent === void 0 ? void 0 : 100,
|
|
582
|
-
style: [styles.island, android ? styles.islandAndroid : null],
|
|
583
|
-
children: [
|
|
584
|
-
/* @__PURE__ */ jsx(
|
|
585
|
-
Icon,
|
|
586
|
-
{
|
|
587
|
-
name: icon,
|
|
588
|
-
size: theme.icon.sm,
|
|
589
|
-
color: android ? theme.color.accentInk : OS_MATERIAL.ink
|
|
590
|
-
}
|
|
591
|
-
),
|
|
592
|
-
/* @__PURE__ */ jsx(
|
|
593
|
-
Text,
|
|
594
|
-
{
|
|
595
|
-
style: [styles.islandLabel, android ? styles.islandLabelAndroid : null],
|
|
596
|
-
numberOfLines: 1,
|
|
597
|
-
children: title
|
|
598
|
-
}
|
|
599
|
-
),
|
|
600
|
-
status ? /* @__PURE__ */ jsx(Text, { style: [styles.islandStatus, android ? styles.islandLabelAndroid : null], children: status }) : null
|
|
601
|
-
]
|
|
602
|
-
}
|
|
603
|
-
);
|
|
604
|
-
}
|
|
605
|
-
return (
|
|
606
|
-
// A `group`, not a `progressbar`: the card also holds the interactive cancel
|
|
607
|
-
// control, and `progressbar` (like `img`) makes its children presentational —
|
|
608
|
-
// nesting a focusable button inside it is a nested-interactive violation. The
|
|
609
|
-
// progressbar role lives on the track below, which owns no interactive content.
|
|
610
|
-
/* @__PURE__ */ jsxs(View, { role: "group", style: styles.card, children: [
|
|
611
|
-
/* @__PURE__ */ jsx(View, { style: styles.cardTile, children: /* @__PURE__ */ jsx(Icon, { name: icon, size: theme.icon.sm, color: theme.color.accentInk }) }),
|
|
612
|
-
/* @__PURE__ */ jsxs(View, { style: styles.cardMain, children: [
|
|
613
|
-
/* @__PURE__ */ jsxs(View, { style: styles.cardTitleRow, children: [
|
|
614
|
-
/* @__PURE__ */ jsx(Text, { style: styles.cardTitle, numberOfLines: 1, children: title }),
|
|
615
|
-
status ? /* @__PURE__ */ jsx(Text, { style: styles.cardStatus, numberOfLines: 1, children: status }) : null
|
|
616
|
-
] }),
|
|
617
|
-
/* @__PURE__ */ jsx(
|
|
618
|
-
View,
|
|
619
|
-
{
|
|
620
|
-
accessibilityRole: "progressbar",
|
|
621
|
-
accessibilityLabel: announced,
|
|
622
|
-
accessibilityValue: percent === void 0 ? void 0 : { now: percent, min: 0, max: 100 },
|
|
623
|
-
"aria-valuenow": percent,
|
|
624
|
-
"aria-valuemin": percent === void 0 ? void 0 : 0,
|
|
625
|
-
"aria-valuemax": percent === void 0 ? void 0 : 100,
|
|
626
|
-
style: styles.track,
|
|
627
|
-
children: /* @__PURE__ */ jsx(
|
|
628
|
-
Animated.View,
|
|
629
|
-
{
|
|
630
|
-
style: [styles.fill, fraction === void 0 ? styles.fillIndeterminate : { width }]
|
|
631
|
-
}
|
|
632
|
-
)
|
|
633
|
-
}
|
|
634
|
-
),
|
|
635
|
-
detail ? /* @__PURE__ */ jsx(Text, { style: styles.cardDetail, numberOfLines: 1, children: detail }) : null
|
|
636
|
-
] }),
|
|
637
|
-
onCancel ? /* @__PURE__ */ jsx(
|
|
638
|
-
Pressable,
|
|
639
|
-
{
|
|
640
|
-
accessibilityRole: "button",
|
|
641
|
-
accessibilityLabel: cancelLabel ?? labels.cancel,
|
|
642
|
-
onPress: onCancel,
|
|
643
|
-
style: ({ pressed }) => [styles.cancel, pressed ? styles.pressed : null],
|
|
644
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: theme.icon.sm, color: OS_MATERIAL.ink })
|
|
645
|
-
}
|
|
646
|
-
) : null
|
|
647
|
-
] })
|
|
648
|
-
);
|
|
649
|
-
}
|
|
650
|
-
var sheet4 = createStyleSheet((theme) => ({
|
|
651
|
-
// ---- compact: the Dynamic Island pill ----
|
|
652
|
-
island: {
|
|
653
|
-
flexDirection: "row",
|
|
654
|
-
alignItems: "center",
|
|
655
|
-
alignSelf: "flex-start",
|
|
656
|
-
gap: theme.space.s2,
|
|
657
|
-
minWidth: DYNAMIC_ISLAND.minWidth,
|
|
658
|
-
height: DYNAMIC_ISLAND.height,
|
|
659
|
-
// Fully rounded: the housing is a capsule, so the radius is half its height,
|
|
660
|
-
// not a Loam radius step.
|
|
661
|
-
borderRadius: DYNAMIC_ISLAND.height / 2,
|
|
662
|
-
paddingHorizontal: theme.space.s3,
|
|
663
|
-
backgroundColor: DYNAMIC_ISLAND_FILL
|
|
664
|
-
},
|
|
665
|
-
islandAndroid: { backgroundColor: theme.color.accent },
|
|
666
|
-
islandLabel: {
|
|
667
|
-
flexShrink: 1,
|
|
668
|
-
fontFamily: theme.font.sans,
|
|
669
|
-
fontWeight: theme.fontWeight.bold,
|
|
670
|
-
fontSize: theme.type.caption1.fontSize,
|
|
671
|
-
lineHeight: theme.type.caption1.lineHeight,
|
|
672
|
-
color: OS_MATERIAL.ink
|
|
673
|
-
},
|
|
674
|
-
islandLabelAndroid: { color: theme.color.accentInk },
|
|
675
|
-
islandStatus: {
|
|
676
|
-
marginStart: "auto",
|
|
677
|
-
fontFamily: theme.font.mono,
|
|
678
|
-
fontSize: theme.type.caption2.fontSize,
|
|
679
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
680
|
-
color: OS_MATERIAL.ink,
|
|
681
|
-
opacity: OS_MATERIAL_INK_OPACITY.secondary
|
|
682
|
-
},
|
|
683
|
-
// ---- expanded: the lock-screen card, on system material ----
|
|
684
|
-
card: {
|
|
685
|
-
flexDirection: "row",
|
|
686
|
-
alignItems: "center",
|
|
687
|
-
gap: theme.space.s3,
|
|
688
|
-
padding: theme.space.s3,
|
|
689
|
-
// The OS clips an expanded Live Activity at 160pt.
|
|
690
|
-
maxHeight: LIVE_ACTIVITY_MAX_H,
|
|
691
|
-
borderRadius: theme.radius.lg,
|
|
692
|
-
// Translucent scrim, NOT a blur — RN has no `backdrop-filter`. See OS_MATERIAL.
|
|
693
|
-
backgroundColor: OS_MATERIAL.fill
|
|
694
|
-
},
|
|
695
|
-
cardTile: {
|
|
696
|
-
width: LIVE_ACTIVITY_CARD.tile,
|
|
697
|
-
height: LIVE_ACTIVITY_CARD.tile,
|
|
698
|
-
borderRadius: LIVE_ACTIVITY_CARD.tileRadius,
|
|
699
|
-
flexShrink: 0,
|
|
700
|
-
alignItems: "center",
|
|
701
|
-
justifyContent: "center",
|
|
702
|
-
backgroundColor: theme.color.accent
|
|
703
|
-
},
|
|
704
|
-
cardMain: { flex: 1, minWidth: 0, gap: theme.space.s1 },
|
|
705
|
-
cardTitleRow: { flexDirection: "row", alignItems: "baseline", gap: theme.space.s2 },
|
|
706
|
-
cardTitle: {
|
|
707
|
-
flex: 1,
|
|
708
|
-
fontFamily: theme.font.sans,
|
|
709
|
-
fontWeight: theme.fontWeight.bold,
|
|
710
|
-
fontSize: theme.type.footnote.fontSize,
|
|
711
|
-
lineHeight: theme.type.footnote.lineHeight,
|
|
712
|
-
color: OS_MATERIAL.ink
|
|
713
|
-
},
|
|
714
|
-
cardDetail: {
|
|
715
|
-
fontFamily: theme.font.sans,
|
|
716
|
-
fontSize: theme.type.caption2.fontSize,
|
|
717
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
718
|
-
color: OS_MATERIAL.ink,
|
|
719
|
-
opacity: OS_MATERIAL_INK_OPACITY.secondary
|
|
720
|
-
},
|
|
721
|
-
track: {
|
|
722
|
-
height: LIVE_ACTIVITY_CARD.trackH,
|
|
723
|
-
borderRadius: LIVE_ACTIVITY_CARD.trackH / 2,
|
|
724
|
-
overflow: "hidden",
|
|
725
|
-
backgroundColor: OS_MATERIAL.track
|
|
726
|
-
},
|
|
727
|
-
fill: { height: "100%", backgroundColor: OS_MATERIAL.ink },
|
|
728
|
-
fillIndeterminate: { width: "100%", opacity: OS_MATERIAL_INK_OPACITY.tertiary },
|
|
729
|
-
cardStatus: {
|
|
730
|
-
flexShrink: 0,
|
|
731
|
-
fontFamily: theme.font.mono,
|
|
732
|
-
fontSize: theme.type.caption2.fontSize,
|
|
733
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
734
|
-
color: OS_MATERIAL.ink,
|
|
735
|
-
opacity: OS_MATERIAL_INK_OPACITY.secondary
|
|
736
|
-
},
|
|
737
|
-
cancel: {
|
|
738
|
-
width: theme.icon["2xl"],
|
|
739
|
-
height: theme.icon["2xl"],
|
|
740
|
-
flexShrink: 0,
|
|
741
|
-
alignItems: "center",
|
|
742
|
-
justifyContent: "center"
|
|
743
|
-
},
|
|
744
|
-
pressed: { opacity: theme.state.pressedOpacity }
|
|
745
|
-
}));
|
|
746
|
-
var STAT_BUDGET = { small: 1, medium: 2, large: 4 };
|
|
747
|
-
var TITLE_LINES = { small: 2, medium: 2, large: 3 };
|
|
748
|
-
function WidgetPreview({
|
|
749
|
-
sizeClass = "small",
|
|
750
|
-
appName,
|
|
751
|
-
icon = "grid",
|
|
752
|
-
title,
|
|
753
|
-
subtitle,
|
|
754
|
-
stats = [],
|
|
755
|
-
caption,
|
|
756
|
-
onPress,
|
|
757
|
-
accessibilityLabel
|
|
758
|
-
}) {
|
|
759
|
-
const { styles } = useStyles(sheet5);
|
|
760
|
-
const theme = useLoamTheme("os-surfaces");
|
|
761
|
-
const size = WIDGET_SIZE[sizeClass];
|
|
762
|
-
const android = Platform.OS === "android";
|
|
763
|
-
const radius = android ? WIDGET_CORNER.android : WIDGET_CORNER.iOS;
|
|
764
|
-
const innerRadius = android ? WIDGET_INNER_CORNER_ANDROID : theme.radius.md;
|
|
765
|
-
const shown = stats.slice(0, STAT_BUDGET[sizeClass]);
|
|
766
|
-
const announced = accessibilityLabel ?? [appName, title, subtitle].filter(Boolean).join(", ");
|
|
767
|
-
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
768
|
-
/* @__PURE__ */ jsxs(View, { style: styles.glance, children: [
|
|
769
|
-
/* @__PURE__ */ jsxs(View, { style: styles.header, children: [
|
|
770
|
-
/* @__PURE__ */ jsx(Icon, { name: icon, size: theme.icon.xs, color: theme.color.accentStrong }),
|
|
771
|
-
/* @__PURE__ */ jsx(Text, { style: styles.appName, numberOfLines: 1, children: appName })
|
|
772
|
-
] }),
|
|
773
|
-
/* @__PURE__ */ jsx(Text, { style: styles.title, numberOfLines: TITLE_LINES[sizeClass], children: title }),
|
|
774
|
-
subtitle ? /* @__PURE__ */ jsx(Text, { style: styles.subtitle, numberOfLines: 1, children: subtitle }) : null
|
|
775
|
-
] }),
|
|
776
|
-
shown.length > 0 || caption ? /* @__PURE__ */ jsxs(View, { style: styles.readout, children: [
|
|
777
|
-
shown.length > 0 ? /* @__PURE__ */ jsx(View, { style: [styles.stats, sizeClass === "large" ? styles.statsWrap : null], children: shown.map((s) => /* @__PURE__ */ jsxs(View, { style: [styles.stat, { borderRadius: innerRadius }], children: [
|
|
778
|
-
/* @__PURE__ */ jsx(Text, { style: styles.statValue, numberOfLines: 1, children: s.value }),
|
|
779
|
-
/* @__PURE__ */ jsx(Text, { style: styles.statLabel, numberOfLines: 1, children: s.label })
|
|
780
|
-
] }, s.id)) }) : null,
|
|
781
|
-
caption ? /* @__PURE__ */ jsx(Text, { style: styles.caption, numberOfLines: 1, children: caption }) : null
|
|
782
|
-
] }) : null
|
|
783
|
-
] });
|
|
784
|
-
const frame = [styles.widget, { width: size.width, height: size.height, borderRadius: radius }];
|
|
785
|
-
if (onPress) {
|
|
786
|
-
return /* @__PURE__ */ jsx(
|
|
787
|
-
Pressable,
|
|
788
|
-
{
|
|
789
|
-
accessibilityRole: "button",
|
|
790
|
-
accessibilityLabel: announced,
|
|
791
|
-
onPress,
|
|
792
|
-
style: frame,
|
|
793
|
-
children: body
|
|
794
|
-
}
|
|
795
|
-
);
|
|
796
|
-
}
|
|
797
|
-
return /* @__PURE__ */ jsx(View, { accessibilityRole: "image", accessibilityLabel: announced, style: frame, children: body });
|
|
798
|
-
}
|
|
799
|
-
var sheet5 = createStyleSheet((theme) => ({
|
|
800
|
-
// `s3` padding, not `s4`: a `systemSmall` widget is 170pt square, so 16pt on
|
|
801
|
-
// every side spent a fifth of the canvas on margin and left the glance and the
|
|
802
|
-
// stat tile fighting over what was left.
|
|
803
|
-
widget: {
|
|
804
|
-
overflow: "hidden",
|
|
805
|
-
padding: theme.space.s3,
|
|
806
|
-
gap: theme.space.s2,
|
|
807
|
-
backgroundColor: theme.color.surface,
|
|
808
|
-
borderWidth: theme.borderWidth.base,
|
|
809
|
-
borderColor: theme.color.border,
|
|
810
|
-
...theme.shadow.md
|
|
811
|
-
},
|
|
812
|
-
glance: { gap: theme.space.s1 },
|
|
813
|
-
readout: { gap: theme.space.s1, marginTop: "auto" },
|
|
814
|
-
header: { flexDirection: "row", alignItems: "center", gap: theme.space.s1 },
|
|
815
|
-
appName: {
|
|
816
|
-
flex: 1,
|
|
817
|
-
fontFamily: theme.font.sans,
|
|
818
|
-
fontWeight: theme.fontWeight.bold,
|
|
819
|
-
fontSize: theme.type.caption2.fontSize,
|
|
820
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
821
|
-
letterSpacing: theme.type.caption2.fontSize * theme.tracking.caps,
|
|
822
|
-
textTransform: "uppercase",
|
|
823
|
-
color: theme.color.text3
|
|
824
|
-
},
|
|
825
|
-
// `subheadline`, not `title3`: two lines of a 20pt serif is 50pt of a 146pt
|
|
826
|
-
// content box, which is what made the headline collide with the rows either
|
|
827
|
-
// side of it. 15/20 is the smallest step that still reads as the glance's
|
|
828
|
-
// headline, and two lines of it fit the family with room to spare.
|
|
829
|
-
title: {
|
|
830
|
-
fontFamily: theme.font.display,
|
|
831
|
-
fontWeight: theme.font.displayWeight,
|
|
832
|
-
fontSize: theme.type.subheadline.fontSize,
|
|
833
|
-
lineHeight: theme.type.subheadline.lineHeight,
|
|
834
|
-
letterSpacing: theme.type.subheadline.letterSpacing,
|
|
835
|
-
color: theme.color.text
|
|
836
|
-
},
|
|
837
|
-
subtitle: {
|
|
838
|
-
fontFamily: theme.font.sans,
|
|
839
|
-
fontSize: theme.type.caption1.fontSize,
|
|
840
|
-
lineHeight: theme.type.caption1.lineHeight,
|
|
841
|
-
color: theme.color.text2
|
|
842
|
-
},
|
|
843
|
-
stats: { flexDirection: "row", gap: theme.space.s2 },
|
|
844
|
-
statsWrap: { flexWrap: "wrap" },
|
|
845
|
-
stat: {
|
|
846
|
-
flexGrow: 1,
|
|
847
|
-
flexBasis: 0,
|
|
848
|
-
minWidth: theme.space.s8,
|
|
849
|
-
paddingVertical: theme.space.s1,
|
|
850
|
-
paddingHorizontal: theme.space.s2,
|
|
851
|
-
backgroundColor: theme.color.surface2
|
|
852
|
-
},
|
|
853
|
-
statValue: {
|
|
854
|
-
fontFamily: theme.font.sans,
|
|
855
|
-
fontWeight: theme.fontWeight.bold,
|
|
856
|
-
fontSize: theme.type.subheadline.fontSize,
|
|
857
|
-
lineHeight: theme.type.subheadline.lineHeight,
|
|
858
|
-
color: theme.color.text
|
|
859
|
-
},
|
|
860
|
-
statLabel: {
|
|
861
|
-
fontFamily: theme.font.sans,
|
|
862
|
-
fontSize: theme.type.caption2.fontSize,
|
|
863
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
864
|
-
color: theme.color.text3
|
|
865
|
-
},
|
|
866
|
-
caption: {
|
|
867
|
-
fontFamily: theme.font.mono,
|
|
868
|
-
fontSize: theme.type.caption2.fontSize,
|
|
869
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
870
|
-
color: theme.color.text3
|
|
871
|
-
}
|
|
872
|
-
}));
|
|
873
|
-
var SHARE_TILE = 40;
|
|
874
|
-
function ShareSheetPreview({
|
|
875
|
-
fileName,
|
|
876
|
-
fileMeta,
|
|
877
|
-
icon = "filedoc",
|
|
878
|
-
people = [],
|
|
879
|
-
onPersonPress,
|
|
880
|
-
actions = [],
|
|
881
|
-
onActionPress,
|
|
882
|
-
labels: labelsProp
|
|
883
|
-
}) {
|
|
884
|
-
const { styles } = useStyles(sheet6);
|
|
885
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, labelsProp);
|
|
886
|
-
const theme = useLoamTheme("os-surfaces");
|
|
887
|
-
return /* @__PURE__ */ jsxs(View, { role: "group", accessibilityLabel: labels.shareSheetPreview, style: styles.sheet, children: [
|
|
888
|
-
/* @__PURE__ */ jsx(View, { style: styles.grabber }),
|
|
889
|
-
/* @__PURE__ */ jsxs(View, { style: styles.preview, children: [
|
|
890
|
-
/* @__PURE__ */ jsx(View, { style: styles.previewTile, children: /* @__PURE__ */ jsx(Icon, { name: icon, size: theme.icon.md, color: theme.color.accentOnSoft }) }),
|
|
891
|
-
/* @__PURE__ */ jsxs(View, { style: styles.previewMain, children: [
|
|
892
|
-
/* @__PURE__ */ jsx(Text, { style: styles.previewTitle, numberOfLines: 1, children: fileName }),
|
|
893
|
-
fileMeta ? /* @__PURE__ */ jsx(Text, { style: styles.previewMeta, numberOfLines: 1, children: fileMeta }) : null
|
|
894
|
-
] })
|
|
895
|
-
] }),
|
|
896
|
-
people.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles.people, children: people.map((p) => /* @__PURE__ */ jsxs(
|
|
897
|
-
Pressable,
|
|
898
|
-
{
|
|
899
|
-
accessibilityRole: "button",
|
|
900
|
-
accessibilityLabel: labels.shareWith(p.name),
|
|
901
|
-
onPress: onPersonPress ? () => onPersonPress(p.id) : void 0,
|
|
902
|
-
style: ({ pressed }) => [styles.person, pressed ? styles.pressed : null],
|
|
903
|
-
children: [
|
|
904
|
-
/* @__PURE__ */ jsx(Avatar, { name: p.name, src: p.src, size: "lg", accent: true }),
|
|
905
|
-
/* @__PURE__ */ jsx(Text, { style: styles.personName, numberOfLines: 1, children: p.name.split(" ")[0] })
|
|
906
|
-
]
|
|
907
|
-
},
|
|
908
|
-
p.id
|
|
909
|
-
)) }) : null,
|
|
910
|
-
actions.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles.actions, children: actions.map((a, i) => /* @__PURE__ */ jsxs(
|
|
911
|
-
Pressable,
|
|
912
|
-
{
|
|
913
|
-
accessibilityRole: "button",
|
|
914
|
-
accessibilityLabel: a.label,
|
|
915
|
-
onPress: onActionPress ? () => onActionPress(a.id) : void 0,
|
|
916
|
-
style: ({ pressed }) => [
|
|
917
|
-
styles.actionRow,
|
|
918
|
-
i > 0 ? styles.actionRowDivided : null,
|
|
919
|
-
pressed ? styles.pressed : null
|
|
920
|
-
],
|
|
921
|
-
children: [
|
|
922
|
-
a.icon ? /* @__PURE__ */ jsx(Icon, { name: a.icon, size: theme.icon.md, color: theme.color.text2 }) : null,
|
|
923
|
-
/* @__PURE__ */ jsx(Text, { style: styles.actionLabel, children: a.label })
|
|
924
|
-
]
|
|
925
|
-
},
|
|
926
|
-
a.id
|
|
927
|
-
)) }) : null
|
|
928
|
-
] });
|
|
929
|
-
}
|
|
930
|
-
function TextSelectionMenu({
|
|
931
|
-
items,
|
|
932
|
-
onItemPress,
|
|
933
|
-
platform,
|
|
934
|
-
labels: labelsProp
|
|
935
|
-
}) {
|
|
936
|
-
const { styles } = useStyles(sheet6);
|
|
937
|
-
const labels = useLabels("osSurfaces", DEFAULT_LABELS, labelsProp);
|
|
938
|
-
const resolved = platform ?? (Platform.OS === "android" ? "Android" : "iOS");
|
|
939
|
-
const ios = resolved === "iOS";
|
|
940
|
-
return /* @__PURE__ */ jsx(
|
|
941
|
-
View,
|
|
942
|
-
{
|
|
943
|
-
accessibilityRole: "menu",
|
|
944
|
-
accessibilityLabel: labels.textSelectionMenu,
|
|
945
|
-
style: [styles.menu, ios ? styles.menuIOS : styles.menuAndroid],
|
|
946
|
-
children: items.map((item, i) => /* @__PURE__ */ jsx(
|
|
947
|
-
Pressable,
|
|
948
|
-
{
|
|
949
|
-
accessibilityRole: "menuitem",
|
|
950
|
-
accessibilityLabel: item.label,
|
|
951
|
-
onPress: onItemPress ? () => onItemPress(item.id) : void 0,
|
|
952
|
-
style: ({ pressed }) => [
|
|
953
|
-
styles.menuItem,
|
|
954
|
-
i > 0 ? styles.menuItemDivided : null,
|
|
955
|
-
pressed ? styles.pressed : null
|
|
956
|
-
],
|
|
957
|
-
children: /* @__PURE__ */ jsx(Text, { style: [styles.menuLabel, ios ? styles.menuLabelIOS : styles.menuLabelAndroid], children: item.label })
|
|
958
|
-
},
|
|
959
|
-
item.id
|
|
960
|
-
))
|
|
961
|
-
}
|
|
962
|
-
);
|
|
963
|
-
}
|
|
964
|
-
var sheet6 = createStyleSheet((theme) => ({
|
|
965
|
-
// ---- share sheet ----
|
|
966
|
-
sheet: {
|
|
967
|
-
// A sheet's top corners are `radius['2xl']` per the reference; the bottom two are
|
|
968
|
-
// square because it is anchored to the screen edge.
|
|
969
|
-
borderTopLeftRadius: theme.radius["2xl"],
|
|
970
|
-
borderTopRightRadius: theme.radius["2xl"],
|
|
971
|
-
backgroundColor: theme.color.surface,
|
|
972
|
-
padding: theme.space.s4,
|
|
973
|
-
gap: theme.space.s4,
|
|
974
|
-
// Anchored to the screen edge with no scrim of its own: `edge.neutral` is
|
|
975
|
-
// what draws the sheet once high contrast zeroes the elevation, and it is
|
|
976
|
-
// `transparent` before that.
|
|
977
|
-
borderTopWidth: theme.borderWidth.base,
|
|
978
|
-
borderTopColor: theme.edge.neutral,
|
|
979
|
-
...theme.shadow.lg
|
|
980
|
-
},
|
|
981
|
-
grabber: {
|
|
982
|
-
alignSelf: "center",
|
|
983
|
-
width: SHEET_GRABBER_W,
|
|
984
|
-
// `sheetGrabber` is fixed at 5 and is deliberately not scaled by density.
|
|
985
|
-
height: theme.layout.sheetGrabber,
|
|
986
|
-
borderRadius: theme.radius.full,
|
|
987
|
-
backgroundColor: theme.color.surface3
|
|
988
|
-
},
|
|
989
|
-
preview: { flexDirection: "row", alignItems: "center", gap: theme.space.s3 },
|
|
990
|
-
previewTile: {
|
|
991
|
-
width: SHARE_TILE,
|
|
992
|
-
height: SHARE_TILE,
|
|
993
|
-
borderRadius: theme.radius.md,
|
|
994
|
-
alignItems: "center",
|
|
995
|
-
justifyContent: "center",
|
|
996
|
-
backgroundColor: theme.color.accentSoft,
|
|
997
|
-
borderWidth: theme.borderWidth.base,
|
|
998
|
-
borderColor: theme.edge.accent
|
|
999
|
-
},
|
|
1000
|
-
previewMain: { flex: 1, minWidth: 0, gap: theme.space.s1 },
|
|
1001
|
-
previewTitle: {
|
|
1002
|
-
fontFamily: theme.font.sans,
|
|
1003
|
-
fontWeight: theme.type.headline.fontWeight,
|
|
1004
|
-
fontSize: theme.type.headline.fontSize,
|
|
1005
|
-
lineHeight: theme.type.headline.lineHeight,
|
|
1006
|
-
letterSpacing: theme.type.headline.letterSpacing,
|
|
1007
|
-
color: theme.color.text
|
|
1008
|
-
},
|
|
1009
|
-
previewMeta: {
|
|
1010
|
-
fontFamily: theme.font.sans,
|
|
1011
|
-
fontSize: theme.type.footnote.fontSize,
|
|
1012
|
-
lineHeight: theme.type.footnote.lineHeight,
|
|
1013
|
-
color: theme.color.text3
|
|
1014
|
-
},
|
|
1015
|
-
people: { flexDirection: "row", gap: theme.space.s4, overflow: "hidden" },
|
|
1016
|
-
person: { alignItems: "center", gap: theme.space.s1, maxWidth: theme.space.s8 },
|
|
1017
|
-
personName: {
|
|
1018
|
-
fontFamily: theme.font.sans,
|
|
1019
|
-
fontSize: theme.type.caption2.fontSize,
|
|
1020
|
-
lineHeight: theme.type.caption2.lineHeight,
|
|
1021
|
-
color: theme.color.text2
|
|
1022
|
-
},
|
|
1023
|
-
actions: {
|
|
1024
|
-
borderRadius: theme.radius.md,
|
|
1025
|
-
backgroundColor: theme.color.surface2,
|
|
1026
|
-
overflow: "hidden"
|
|
1027
|
-
},
|
|
1028
|
-
actionRow: {
|
|
1029
|
-
flexDirection: "row",
|
|
1030
|
-
alignItems: "center",
|
|
1031
|
-
gap: theme.space.s3,
|
|
1032
|
-
minHeight: theme.tapMin,
|
|
1033
|
-
paddingHorizontal: theme.space.s3
|
|
1034
|
-
},
|
|
1035
|
-
actionRowDivided: {
|
|
1036
|
-
borderTopWidth: theme.borderWidth.base,
|
|
1037
|
-
borderTopColor: theme.color.border
|
|
1038
|
-
},
|
|
1039
|
-
actionLabel: {
|
|
1040
|
-
flex: 1,
|
|
1041
|
-
fontFamily: theme.font.sans,
|
|
1042
|
-
fontWeight: theme.fontWeight.semibold,
|
|
1043
|
-
fontSize: theme.type.subheadline.fontSize,
|
|
1044
|
-
lineHeight: theme.type.subheadline.lineHeight,
|
|
1045
|
-
color: theme.color.text
|
|
1046
|
-
},
|
|
1047
|
-
pressed: { opacity: theme.state.pressedOpacity },
|
|
1048
|
-
// ---- system edit menu ----
|
|
1049
|
-
menu: {
|
|
1050
|
-
flexDirection: "row",
|
|
1051
|
-
alignSelf: "flex-start",
|
|
1052
|
-
overflow: "hidden",
|
|
1053
|
-
...theme.shadow.lg
|
|
1054
|
-
},
|
|
1055
|
-
// iOS: dark chrome at the system callout's own tight radius (OS-mandated, not a
|
|
1056
|
-
// Loam radius step) — the menu has to look like the OS's, not ours.
|
|
1057
|
-
menuIOS: { backgroundColor: theme.color.text, borderRadius: IOS_EDIT_MENU_RADIUS },
|
|
1058
|
-
// Android: a Material menu surface, which *is* a Loam radius.
|
|
1059
|
-
menuAndroid: { backgroundColor: theme.color.surface, borderRadius: theme.radius.md },
|
|
1060
|
-
menuItem: {
|
|
1061
|
-
minHeight: theme.tapMin,
|
|
1062
|
-
justifyContent: "center",
|
|
1063
|
-
paddingHorizontal: theme.space.s3
|
|
1064
|
-
},
|
|
1065
|
-
// A grey with enough contrast on both the dark iOS chrome and the light Android
|
|
1066
|
-
// surface — the OS's own separator, not a Loam border token.
|
|
1067
|
-
menuItemDivided: {
|
|
1068
|
-
borderStartWidth: theme.borderWidth.base,
|
|
1069
|
-
borderStartColor: OS_MATERIAL.divider
|
|
1070
|
-
},
|
|
1071
|
-
menuLabel: {
|
|
1072
|
-
fontFamily: theme.font.sans,
|
|
1073
|
-
fontWeight: theme.fontWeight.semibold,
|
|
1074
|
-
fontSize: theme.type.footnote.fontSize,
|
|
1075
|
-
lineHeight: theme.type.footnote.lineHeight
|
|
1076
|
-
},
|
|
1077
|
-
menuLabelIOS: { color: theme.color.bg },
|
|
1078
|
-
menuLabelAndroid: { color: theme.color.text }
|
|
1079
|
-
}));
|
|
1080
|
-
|
|
1081
|
-
export { ANDROID_ICON_MASK_RATIO, APP_ICON_ASSET_PX, APP_ICON_PREVIEW_PX, AppIconPreview, DYNAMIC_ISLAND, DYNAMIC_ISLAND_FILL, ICON_MARK_RATIO, ICON_SAFE_MARGIN, IOS_EDIT_MENU_RADIUS, IOS_ICON_CORNER_RATIO, LAUNCH_MARK, LIVE_ACTIVITY_CARD, LIVE_ACTIVITY_MAX_H, LOCK_SCREEN_WALLPAPER, LaunchScreenPreview, LiveActivityPreview, LockScreenNotification, LockScreenPreview, NotificationBanner, OS_MATERIAL, OS_MATERIAL_INK_OPACITY, SHEET_GRABBER_W, ShareSheetPreview, TextSelectionMenu, WIDGET_CORNER, WIDGET_INNER_CORNER_ANDROID, WIDGET_SIZE, WidgetPreview };
|