@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,17 +1,21 @@
|
|
|
1
1
|
import { storageKey, readStored, writeStored } from './chunk-NNCOFLNE.js';
|
|
2
|
-
import { MonthList } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Button } from './chunk-
|
|
2
|
+
import { MonthList } from './chunk-TZO6YDS7.js';
|
|
3
|
+
import { ListRow } from './chunk-JA6TK7H2.js';
|
|
4
|
+
import { getClipboard } from './chunk-TTQ24HQX.js';
|
|
5
|
+
import { Chip } from './chunk-7NGMUVNU.js';
|
|
6
|
+
import { Sheet } from './chunk-B7JZ3N5G.js';
|
|
7
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
8
|
+
import { Switch } from './chunk-VFDQAAIW.js';
|
|
9
|
+
import { SegmentedControl } from './chunk-NZG75DGA.js';
|
|
10
|
+
import { Input } from './chunk-KXLDK6HB.js';
|
|
11
|
+
import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
|
|
8
12
|
import { useLabels } from './chunk-APCWFOZW.js';
|
|
9
|
-
import { Icon } from './chunk-
|
|
13
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
10
14
|
import * as React from 'react';
|
|
11
|
-
import { View,
|
|
15
|
+
import { View, Text, ScrollView, Pressable, AppState, I18nManager } from 'react-native';
|
|
12
16
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
13
|
-
import { DEFAULT_DATE_LABELS, timeRangeValue, dateZone, timeRangeReachesNow, timeRangeLabel, zoomTimeRange,
|
|
14
|
-
import {
|
|
17
|
+
import { DEFAULT_DATE_LABELS, timeRangeValue, dateZone, timeRangeReachesNow, timeRangeLabel, zoomTimeRange, resolveDateValue, TIME_RANGE_OPTIONS, sameDateValue, timeRangeReceipt, valueLabel, timeRangeText, parseTimeRange, findTimeRangeOption, durationLabel, zoneLabel, DATE_ZONES, zoneName, shiftTimeRange, isDateMath, parseDateRange, DAY_MS, HOUR_MS, pad2, localeNames, quickRangeLabel, timeLabel, dayLabel, formatDateMathInstant } from '@btndprojects/loam-date';
|
|
18
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
19
|
|
|
16
20
|
var UNIT_ROW = {
|
|
17
21
|
second: "Seconds",
|
|
@@ -69,6 +73,15 @@ var DEFAULT_LABELS = {
|
|
|
69
73
|
from: "From",
|
|
70
74
|
to: "To",
|
|
71
75
|
applyRange: "Apply time range",
|
|
76
|
+
copyRange: "Copy the time range",
|
|
77
|
+
pasteRange: "Paste a time range",
|
|
78
|
+
copied: "Time range copied.",
|
|
79
|
+
clipboardUnavailable: "The clipboard is not available here.",
|
|
80
|
+
clipboardNoRange: "The clipboard does not hold a time range.",
|
|
81
|
+
pasted: (from, to) => `Pasted ${from} to ${to}.`,
|
|
82
|
+
reportIn: "Report in",
|
|
83
|
+
changeSettings: "Change time settings",
|
|
84
|
+
hideSettings: "Hide time settings",
|
|
72
85
|
recentlyUsed: "Recently used",
|
|
73
86
|
quickRangeList: "Quick ranges",
|
|
74
87
|
searchRanges: (list) => `Search ${list.toLowerCase()}`,
|
|
@@ -76,6 +89,7 @@ var DEFAULT_LABELS = {
|
|
|
76
89
|
refresh: "Refresh",
|
|
77
90
|
cancel: "Cancel",
|
|
78
91
|
cancelRefresh: "Cancel refresh",
|
|
92
|
+
customChip: "Custom",
|
|
79
93
|
autoRefresh: "Auto-refresh",
|
|
80
94
|
off: "Off"
|
|
81
95
|
};
|
|
@@ -95,7 +109,8 @@ var DEFAULT_PARTS = {
|
|
|
95
109
|
preview: true,
|
|
96
110
|
fields: true,
|
|
97
111
|
actions: true,
|
|
98
|
-
zone: true
|
|
112
|
+
zone: true,
|
|
113
|
+
clipboard: true
|
|
99
114
|
};
|
|
100
115
|
var TIME_RANGE_UNITS = [
|
|
101
116
|
{ unit: "minute", counts: [5, 15, 30] },
|
|
@@ -128,6 +143,45 @@ var UNIT_CODE = {
|
|
|
128
143
|
quarter: "Q",
|
|
129
144
|
year: "y"
|
|
130
145
|
};
|
|
146
|
+
function TimeRangeOptionRow({
|
|
147
|
+
title,
|
|
148
|
+
selected,
|
|
149
|
+
pressed = false,
|
|
150
|
+
onPress
|
|
151
|
+
}) {
|
|
152
|
+
const { styles } = useStyles(sheet);
|
|
153
|
+
return /* @__PURE__ */ jsxs(
|
|
154
|
+
Pressable,
|
|
155
|
+
{
|
|
156
|
+
accessibilityRole: "radio",
|
|
157
|
+
accessibilityState: { checked: selected, disabled: !onPress },
|
|
158
|
+
"aria-checked": selected,
|
|
159
|
+
disabled: !onPress,
|
|
160
|
+
onPress,
|
|
161
|
+
style: ({ pressed: down }) => [
|
|
162
|
+
styles.optionRow,
|
|
163
|
+
selected ? styles.optionRowOn : null,
|
|
164
|
+
pressed || down ? styles.optionRowPressed : null
|
|
165
|
+
],
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ jsx(View, { style: [styles.radio, selected && styles.optionRadioOn], children: selected ? /* @__PURE__ */ jsx(View, { style: styles.radioDot }) : null }),
|
|
168
|
+
/* @__PURE__ */ jsx(Text, { style: styles.rowText, children: title })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
function readRangeText(text) {
|
|
174
|
+
const trimmed = text.trim();
|
|
175
|
+
try {
|
|
176
|
+
const json = JSON.parse(trimmed);
|
|
177
|
+
if (json && typeof json.from === "string" && typeof json.to === "string") {
|
|
178
|
+
return { from: json.from, to: json.to };
|
|
179
|
+
}
|
|
180
|
+
} catch {
|
|
181
|
+
}
|
|
182
|
+
const m = /^(.+?)\s+(?:to|→)\s+(.+)$/i.exec(trimmed);
|
|
183
|
+
return m ? { from: m[1], to: m[2] } : null;
|
|
184
|
+
}
|
|
131
185
|
function readCommand(text, ctx) {
|
|
132
186
|
const q = text.trim();
|
|
133
187
|
if (!q) return null;
|
|
@@ -173,6 +227,10 @@ function TimeRangeSheetBody({
|
|
|
173
227
|
labels,
|
|
174
228
|
dateLabels,
|
|
175
229
|
children,
|
|
230
|
+
timezone,
|
|
231
|
+
onTimezoneChange,
|
|
232
|
+
timezones = DATE_ZONES,
|
|
233
|
+
onNotify,
|
|
176
234
|
parts: partsProp,
|
|
177
235
|
units = TIME_RANGE_UNITS,
|
|
178
236
|
periods = TIME_RANGE_PERIODS,
|
|
@@ -181,10 +239,14 @@ function TimeRangeSheetBody({
|
|
|
181
239
|
defaultSoFar = true,
|
|
182
240
|
applyMode = "instant",
|
|
183
241
|
allowFuture = false,
|
|
184
|
-
ampm = false
|
|
242
|
+
ampm = false,
|
|
243
|
+
platform,
|
|
244
|
+
optionStyle = "list",
|
|
245
|
+
surface
|
|
185
246
|
}) {
|
|
186
247
|
const theme = useLoamTheme();
|
|
187
248
|
const { styles } = useStyles(sheet);
|
|
249
|
+
const android = isAndroidIdiom(theme, platform);
|
|
188
250
|
const Z = ctx.Z;
|
|
189
251
|
const now = ctx.now ?? Date.now();
|
|
190
252
|
const part = { ...DEFAULT_PARTS, ...partsProp };
|
|
@@ -258,16 +320,31 @@ function TimeRangeSheetBody({
|
|
|
258
320
|
setAnchor(null);
|
|
259
321
|
fill(next, keep);
|
|
260
322
|
};
|
|
261
|
-
const chip = (key, on, text, onPress, a11y
|
|
262
|
-
|
|
323
|
+
const chip = (key, on, text, onPress, a11y) => (
|
|
324
|
+
// Chip sm with the state-selected fill: the label keeps its weight, so it
|
|
325
|
+
// never changes width on tap (F49).
|
|
326
|
+
/* @__PURE__ */ jsx(
|
|
327
|
+
Chip,
|
|
328
|
+
{
|
|
329
|
+
variant: "filter",
|
|
330
|
+
size: "sm",
|
|
331
|
+
selected: on,
|
|
332
|
+
onSelectedChange: () => onPress(),
|
|
333
|
+
accessibilityLabel: a11y,
|
|
334
|
+
children: text
|
|
335
|
+
},
|
|
336
|
+
key
|
|
337
|
+
)
|
|
338
|
+
);
|
|
339
|
+
const sheetRow = (key, on, title, onPress, leading) => optionStyle === "radio" && on != null && !leading ? /* @__PURE__ */ jsx(TimeRangeOptionRow, { title, selected: on, onPress }, key) : /* @__PURE__ */ jsx(
|
|
340
|
+
ListRow,
|
|
263
341
|
{
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
...{ "aria-pressed": on },
|
|
342
|
+
platform: android ? "android" : "ios",
|
|
343
|
+
title,
|
|
344
|
+
selected: on ?? void 0,
|
|
268
345
|
onPress,
|
|
269
|
-
|
|
270
|
-
|
|
346
|
+
leading: leading ?? (android && on != null ? /* @__PURE__ */ jsx(View, { style: [styles.radio, on && styles.radioOn], children: on ? /* @__PURE__ */ jsx(View, { style: styles.radioDot }) : null }) : void 0),
|
|
347
|
+
trailing: !android && on ? /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.sm, color: theme.color.accentStrong }) : void 0
|
|
271
348
|
},
|
|
272
349
|
key
|
|
273
350
|
);
|
|
@@ -278,6 +355,7 @@ function TimeRangeSheetBody({
|
|
|
278
355
|
Input,
|
|
279
356
|
{
|
|
280
357
|
size: "sm",
|
|
358
|
+
surface,
|
|
281
359
|
leadingIcon: "search",
|
|
282
360
|
autoCapitalize: "none",
|
|
283
361
|
autoCorrect: false,
|
|
@@ -317,8 +395,7 @@ function TimeRangeSheetBody({
|
|
|
317
395
|
from === ends.from && to === ends.to,
|
|
318
396
|
n.toLocaleString(ctx.locale),
|
|
319
397
|
() => pick(ends),
|
|
320
|
-
dateLabels.lastN(n, row.unit)
|
|
321
|
-
true
|
|
398
|
+
dateLabels.lastN(n, row.unit)
|
|
322
399
|
) }, n);
|
|
323
400
|
}) })
|
|
324
401
|
] }, row.unit);
|
|
@@ -333,21 +410,7 @@ function TimeRangeSheetBody({
|
|
|
333
410
|
periods.map((p) => {
|
|
334
411
|
const ends = periodEnds(p, soFar);
|
|
335
412
|
const on = from === ends.from && to === ends.to;
|
|
336
|
-
return
|
|
337
|
-
Pressable,
|
|
338
|
-
{
|
|
339
|
-
accessibilityRole: "button",
|
|
340
|
-
accessibilityState: { selected: on },
|
|
341
|
-
...{ "aria-pressed": on },
|
|
342
|
-
onPress: () => pick(ends),
|
|
343
|
-
style: ({ pressed }) => [styles.row, pressed && styles.pressed],
|
|
344
|
-
children: [
|
|
345
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.rowText, on && styles.rowTextOn], children: labels.periodNames[p.id] ?? p.label ?? p.id }),
|
|
346
|
-
on ? /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.xs, color: theme.color.accent }) : null
|
|
347
|
-
]
|
|
348
|
-
},
|
|
349
|
-
p.id
|
|
350
|
-
);
|
|
413
|
+
return sheetRow(p.id, on, labels.periodNames[p.id] ?? p.label ?? p.id, () => pick(ends));
|
|
351
414
|
}),
|
|
352
415
|
hasSoFar ? /* @__PURE__ */ jsxs(View, { style: styles.soFar, children: [
|
|
353
416
|
/* @__PURE__ */ jsx(Text, { style: styles.rowText, children: labels.soFar }),
|
|
@@ -367,19 +430,15 @@ function TimeRangeSheetBody({
|
|
|
367
430
|
] });
|
|
368
431
|
const recentList = /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
369
432
|
/* @__PURE__ */ jsx(Text, { role: "heading", style: styles.partLabel, children: labels.recentlyUsed }),
|
|
370
|
-
/* @__PURE__ */ jsx(View, { accessibilityRole: "list", children: recentShown.map(
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
]
|
|
380
|
-
},
|
|
381
|
-
i
|
|
382
|
-
)) })
|
|
433
|
+
/* @__PURE__ */ jsx(View, { accessibilityRole: "list", children: recentShown.map(
|
|
434
|
+
(r, i) => sheetRow(
|
|
435
|
+
i,
|
|
436
|
+
null,
|
|
437
|
+
timeRangeLabel(r, ctx),
|
|
438
|
+
() => pick(timeRangeText(r, ctx)),
|
|
439
|
+
/* @__PURE__ */ jsx(Icon, { name: "clock", size: theme.icon.sm, color: theme.color.text3 })
|
|
440
|
+
)
|
|
441
|
+
) })
|
|
383
442
|
] });
|
|
384
443
|
const selected = value?.kind === "expression" ? findTimeRangeOption(value, options) : null;
|
|
385
444
|
const quickList = () => {
|
|
@@ -397,6 +456,7 @@ function TimeRangeSheetBody({
|
|
|
397
456
|
Input,
|
|
398
457
|
{
|
|
399
458
|
size: "sm",
|
|
459
|
+
surface,
|
|
400
460
|
leadingIcon: "search",
|
|
401
461
|
autoCapitalize: "none",
|
|
402
462
|
autoCorrect: false,
|
|
@@ -408,24 +468,11 @@ function TimeRangeSheetBody({
|
|
|
408
468
|
),
|
|
409
469
|
/* @__PURE__ */ jsx(View, { accessibilityRole: "list", children: rows.length === 0 ? /* @__PURE__ */ jsx(Text, { style: styles.empty, children: labels.noRangeMatches(query.trim()) }) : rows.map((row) => {
|
|
410
470
|
const on = selected?.label === row.name;
|
|
411
|
-
return
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
onPress: () => {
|
|
417
|
-
const v = timeRangeValue(row.option);
|
|
418
|
-
if (applyMode === "instant") onApply(v);
|
|
419
|
-
else pick(timeRangeText(v, ctx));
|
|
420
|
-
},
|
|
421
|
-
style: ({ pressed }) => [styles.row, pressed && styles.pressed],
|
|
422
|
-
children: [
|
|
423
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.rowText, on && styles.rowTextOn], children: row.label }),
|
|
424
|
-
on ? /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.xs, color: theme.color.accent }) : null
|
|
425
|
-
]
|
|
426
|
-
},
|
|
427
|
-
row.key
|
|
428
|
-
);
|
|
471
|
+
return sheetRow(row.key, on, row.label, () => {
|
|
472
|
+
const v = timeRangeValue(row.option);
|
|
473
|
+
if (applyMode === "instant") onApply(v);
|
|
474
|
+
else pick(timeRangeText(v, ctx));
|
|
475
|
+
});
|
|
429
476
|
}) })
|
|
430
477
|
] });
|
|
431
478
|
};
|
|
@@ -511,6 +558,9 @@ function TimeRangeSheetBody({
|
|
|
511
558
|
accessibilityRole: "adjustable",
|
|
512
559
|
accessibilityLabel: `${labels.preview}: ${which === "from" ? labels.from : labels.to}`,
|
|
513
560
|
accessibilityValue: { text: which === "to" && live ? labels.now : end2(t) },
|
|
561
|
+
"aria-valuemin": 0,
|
|
562
|
+
"aria-valuemax": 100,
|
|
563
|
+
"aria-valuenow": Math.round(pct(t)),
|
|
514
564
|
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
515
565
|
onAccessibilityAction: nudge(which),
|
|
516
566
|
focusable: true,
|
|
@@ -714,6 +764,7 @@ function TimeRangeSheetBody({
|
|
|
714
764
|
Input,
|
|
715
765
|
{
|
|
716
766
|
size: "sm",
|
|
767
|
+
surface,
|
|
717
768
|
autoCapitalize: "none",
|
|
718
769
|
autoCorrect: false,
|
|
719
770
|
accessibilityLabel: side === "from" ? labels.from : labels.to,
|
|
@@ -737,27 +788,27 @@ function TimeRangeSheetBody({
|
|
|
737
788
|
part.command ? commandBox : null,
|
|
738
789
|
steps.length > 0 ? /* @__PURE__ */ jsx(View, { children: steps.map((s) => {
|
|
739
790
|
const on = holder === s;
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
|
|
791
|
+
return /* @__PURE__ */ jsx(
|
|
792
|
+
ListRow,
|
|
742
793
|
{
|
|
743
|
-
|
|
794
|
+
platform: android ? "android" : "ios",
|
|
744
795
|
onPress: () => setStep(s),
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
/* @__PURE__ */ jsx(
|
|
760
|
-
|
|
796
|
+
chevron: true,
|
|
797
|
+
accessibilityLabel: labels.stepNames[s],
|
|
798
|
+
leading: /* @__PURE__ */ jsx(View, { style: [styles.stepIcon, on && styles.stepIconOn], children: /* @__PURE__ */ jsx(
|
|
799
|
+
Icon,
|
|
800
|
+
{
|
|
801
|
+
name: STEP_ICON[s],
|
|
802
|
+
size: theme.icon.sm,
|
|
803
|
+
color: on ? theme.color.accentStrong : theme.color.text2
|
|
804
|
+
}
|
|
805
|
+
) }),
|
|
806
|
+
title: labels.stepNames[s],
|
|
807
|
+
subtitle: (
|
|
808
|
+
// A plain string takes ListRow's own themed ink; a bare `Text` here
|
|
809
|
+
// would fall back to the platform's black.
|
|
810
|
+
on && draft ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.stepHintOn, children: timeRangeLabel(draft, ctx) }) : labels.stepHints[s]
|
|
811
|
+
)
|
|
761
812
|
},
|
|
762
813
|
s
|
|
763
814
|
);
|
|
@@ -765,7 +816,51 @@ function TimeRangeSheetBody({
|
|
|
765
816
|
recentShown.length > 0 ? recentList : null,
|
|
766
817
|
children
|
|
767
818
|
] });
|
|
768
|
-
const
|
|
819
|
+
const [zoneOpen, setZoneOpen] = React.useState(false);
|
|
820
|
+
const [announced, setAnnounced] = React.useState("");
|
|
821
|
+
const copy = async () => {
|
|
822
|
+
try {
|
|
823
|
+
const board = getClipboard();
|
|
824
|
+
if (!board) throw new Error("no clipboard");
|
|
825
|
+
await board.writeText(JSON.stringify({ from, to }));
|
|
826
|
+
onNotify?.({ text: labels.copied, tone: "good" });
|
|
827
|
+
} catch {
|
|
828
|
+
onNotify?.({ text: labels.clipboardUnavailable, tone: "danger" });
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
const paste = async () => {
|
|
832
|
+
let text;
|
|
833
|
+
try {
|
|
834
|
+
const board = getClipboard();
|
|
835
|
+
if (!board) throw new Error("no clipboard");
|
|
836
|
+
text = await board.readText();
|
|
837
|
+
} catch {
|
|
838
|
+
onNotify?.({ text: labels.clipboardUnavailable, tone: "danger" });
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
const range = readRangeText(text);
|
|
842
|
+
if (!range) {
|
|
843
|
+
onNotify?.({ text: labels.clipboardNoRange, tone: "danger" });
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
fill(range);
|
|
847
|
+
setAnnounced(labels.pasted(range.from, range.to));
|
|
848
|
+
};
|
|
849
|
+
const clipboard = part.clipboard ? /* @__PURE__ */ jsx(View, { style: styles.clipboard, children: [
|
|
850
|
+
["copy", labels.copyRange, copy],
|
|
851
|
+
["clipboard", labels.pasteRange, paste]
|
|
852
|
+
].map(([icon, name, run]) => /* @__PURE__ */ jsx(
|
|
853
|
+
Pressable,
|
|
854
|
+
{
|
|
855
|
+
accessibilityRole: "button",
|
|
856
|
+
accessibilityLabel: name,
|
|
857
|
+
onPress: () => void run(),
|
|
858
|
+
style: ({ pressed }) => [styles.nav, pressed && styles.pressed],
|
|
859
|
+
children: /* @__PURE__ */ jsx(Icon, { name: icon, size: theme.icon.sm, color: theme.color.text })
|
|
860
|
+
},
|
|
861
|
+
icon
|
|
862
|
+
)) }) : null;
|
|
863
|
+
const header = (title, trailing) => /* @__PURE__ */ jsxs(View, { style: styles.stepHeader, children: [
|
|
769
864
|
single ? null : /* @__PURE__ */ jsx(
|
|
770
865
|
Pressable,
|
|
771
866
|
{
|
|
@@ -776,10 +871,12 @@ function TimeRangeSheetBody({
|
|
|
776
871
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: theme.icon.sm, color: theme.color.text })
|
|
777
872
|
}
|
|
778
873
|
),
|
|
779
|
-
/* @__PURE__ */ jsx(Text, { role: "heading", numberOfLines: 1, style: styles.stepTitle, children: title })
|
|
874
|
+
/* @__PURE__ */ jsx(Text, { role: "heading", numberOfLines: 1, style: styles.stepTitle, children: title }),
|
|
875
|
+
trailing
|
|
780
876
|
] });
|
|
781
877
|
const custom = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
782
|
-
header(labels.stepNames.custom),
|
|
878
|
+
header(labels.stepNames.custom, clipboard),
|
|
879
|
+
announced ? /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: styles.srOnly, children: announced }) : null,
|
|
783
880
|
part.preview ? preview : null,
|
|
784
881
|
part.fields ? /* @__PURE__ */ jsxs(View, { style: styles.fields, children: [
|
|
785
882
|
field("from"),
|
|
@@ -787,7 +884,32 @@ function TimeRangeSheetBody({
|
|
|
787
884
|
] }) : null,
|
|
788
885
|
part.zone ? /* @__PURE__ */ jsxs(View, { style: styles.zone, children: [
|
|
789
886
|
/* @__PURE__ */ jsx(Icon, { name: "globe", size: theme.icon.xs, color: theme.color.text3 }),
|
|
790
|
-
/* @__PURE__ */ jsx(Text, { style: styles.zoneText, children: zoneLabel(Z, now) })
|
|
887
|
+
/* @__PURE__ */ jsx(Text, { style: styles.zoneText, children: zoneLabel(Z, now) }),
|
|
888
|
+
onTimezoneChange ? /* @__PURE__ */ jsx(
|
|
889
|
+
Pressable,
|
|
890
|
+
{
|
|
891
|
+
accessibilityRole: "button",
|
|
892
|
+
accessibilityLabel: zoneOpen ? labels.hideSettings : labels.changeSettings,
|
|
893
|
+
accessibilityState: { expanded: zoneOpen },
|
|
894
|
+
onPress: () => setZoneOpen((o) => !o),
|
|
895
|
+
style: ({ pressed }) => [styles.nav, pressed && styles.pressed],
|
|
896
|
+
children: /* @__PURE__ */ jsx(
|
|
897
|
+
Icon,
|
|
898
|
+
{
|
|
899
|
+
name: zoneOpen ? "chevron-up" : "chevron-down",
|
|
900
|
+
size: theme.icon.sm,
|
|
901
|
+
color: theme.color.text2
|
|
902
|
+
}
|
|
903
|
+
)
|
|
904
|
+
}
|
|
905
|
+
) : null
|
|
906
|
+
] }) : null,
|
|
907
|
+
part.zone && onTimezoneChange && zoneOpen ? /* @__PURE__ */ jsxs(View, { style: styles.zoneRow, children: [
|
|
908
|
+
/* @__PURE__ */ jsx(Text, { style: styles.partLabel, children: labels.reportIn }),
|
|
909
|
+
/* @__PURE__ */ jsx(View, { role: "group", "aria-label": labels.reportIn, style: styles.zoneChips, children: timezones.map((z) => {
|
|
910
|
+
const on = z.id === timezone;
|
|
911
|
+
return chip(z.id, on, zoneName(z, dateLabels), () => onTimezoneChange(z.id));
|
|
912
|
+
}) })
|
|
791
913
|
] }) : null
|
|
792
914
|
] });
|
|
793
915
|
const showActions = part.actions && (step === "custom" || dirty || error != null);
|
|
@@ -827,32 +949,26 @@ var sheet = createStyleSheet((theme) => {
|
|
|
827
949
|
};
|
|
828
950
|
return {
|
|
829
951
|
panel: { gap: theme.space.s5 },
|
|
830
|
-
stepRow: {
|
|
831
|
-
flexDirection: "row",
|
|
832
|
-
alignItems: "center",
|
|
833
|
-
gap: theme.space.s3,
|
|
834
|
-
minHeight: theme.tapMin + theme.space.s3
|
|
835
|
-
},
|
|
836
952
|
stepIcon: {
|
|
837
953
|
width: theme.tapMin - theme.space.s2,
|
|
838
954
|
height: theme.tapMin - theme.space.s2,
|
|
839
955
|
alignItems: "center",
|
|
840
956
|
justifyContent: "center",
|
|
841
957
|
borderRadius: theme.radius.md,
|
|
958
|
+
borderWidth: theme.borderWidth.base,
|
|
959
|
+
borderColor: "transparent",
|
|
842
960
|
backgroundColor: theme.color.surface2
|
|
843
961
|
},
|
|
844
|
-
stepIconOn: { backgroundColor: theme.color.accentSoft },
|
|
845
|
-
stepText: { flex: 1, minWidth: 0 },
|
|
962
|
+
stepIconOn: { backgroundColor: theme.color.accentSoft, borderColor: theme.edge.accent },
|
|
846
963
|
stepTitle: {
|
|
847
964
|
flexShrink: 1,
|
|
848
965
|
fontFamily: theme.font.sans,
|
|
849
966
|
fontSize: theme.type.body.fontSize,
|
|
850
967
|
lineHeight: theme.type.body.lineHeight,
|
|
851
|
-
fontWeight: theme.fontWeight.
|
|
968
|
+
fontWeight: theme.fontWeight.semibold,
|
|
852
969
|
color: theme.color.text
|
|
853
970
|
},
|
|
854
|
-
|
|
855
|
-
stepHintOn: { color: theme.color.accent },
|
|
971
|
+
stepHintOn: { color: theme.color.accentOnSoft },
|
|
856
972
|
stepHeader: {
|
|
857
973
|
flexDirection: "row",
|
|
858
974
|
alignItems: "center",
|
|
@@ -881,21 +997,6 @@ var sheet = createStyleSheet((theme) => {
|
|
|
881
997
|
chips: { flex: 1, flexDirection: "row", gap: theme.space.s1 },
|
|
882
998
|
cell: { flex: 1, minWidth: 0 },
|
|
883
999
|
wrap: { flexDirection: "row", flexWrap: "wrap", gap: theme.space.s1 },
|
|
884
|
-
chip: {
|
|
885
|
-
minWidth: theme.tapMin,
|
|
886
|
-
minHeight: theme.tapMin,
|
|
887
|
-
alignItems: "center",
|
|
888
|
-
justifyContent: "center",
|
|
889
|
-
paddingHorizontal: theme.space.s3,
|
|
890
|
-
borderRadius: theme.radius.md,
|
|
891
|
-
borderWidth: theme.borderWidth.base,
|
|
892
|
-
borderColor: theme.color.border,
|
|
893
|
-
backgroundColor: theme.color.surface
|
|
894
|
-
},
|
|
895
|
-
chipOn: { borderColor: theme.edge.accent, backgroundColor: theme.color.accent },
|
|
896
|
-
chipText: { ...small, color: theme.color.text },
|
|
897
|
-
chipTextOn: { color: theme.color.accentInk, fontWeight: theme.fontWeight.bold },
|
|
898
|
-
mono: { fontFamily: theme.font.mono, fontVariant: ["tabular-nums"] },
|
|
899
1000
|
soFar: {
|
|
900
1001
|
flexDirection: "row",
|
|
901
1002
|
alignItems: "center",
|
|
@@ -908,13 +1009,35 @@ var sheet = createStyleSheet((theme) => {
|
|
|
908
1009
|
},
|
|
909
1010
|
soFarText: { ...small, color: theme.color.text3 },
|
|
910
1011
|
empty: { ...small, color: theme.color.text3 },
|
|
911
|
-
|
|
1012
|
+
// Android's leading radio: 20 ring, 9 dot, text-3 edge, accent when chosen.
|
|
1013
|
+
radio: {
|
|
1014
|
+
width: theme.space[20],
|
|
1015
|
+
height: theme.space[20],
|
|
1016
|
+
alignItems: "center",
|
|
1017
|
+
justifyContent: "center",
|
|
1018
|
+
borderRadius: theme.radius.full,
|
|
1019
|
+
borderWidth: theme.borderWidth.heavy,
|
|
1020
|
+
borderColor: theme.color.text3
|
|
1021
|
+
},
|
|
1022
|
+
radioOn: { borderColor: theme.focus.ringColor },
|
|
1023
|
+
radioDot: {
|
|
1024
|
+
width: theme.space[9],
|
|
1025
|
+
height: theme.space[9],
|
|
1026
|
+
borderRadius: theme.radius.full,
|
|
1027
|
+
backgroundColor: theme.color.accent
|
|
1028
|
+
},
|
|
1029
|
+
optionRow: {
|
|
912
1030
|
flexDirection: "row",
|
|
913
1031
|
alignItems: "center",
|
|
914
|
-
gap: theme.space.
|
|
1032
|
+
gap: theme.space.s3,
|
|
915
1033
|
minHeight: theme.tapMin,
|
|
916
|
-
paddingHorizontal: theme.space.
|
|
1034
|
+
paddingHorizontal: theme.space.s3,
|
|
1035
|
+
borderRadius: theme.radius.md,
|
|
1036
|
+
backgroundColor: theme.color.surface
|
|
917
1037
|
},
|
|
1038
|
+
optionRowOn: { backgroundColor: theme.state.selected },
|
|
1039
|
+
optionRowPressed: { backgroundColor: theme.state.pressed },
|
|
1040
|
+
optionRadioOn: { borderColor: theme.focus.ringColor },
|
|
918
1041
|
rowText: {
|
|
919
1042
|
flex: 1,
|
|
920
1043
|
fontFamily: theme.font.sans,
|
|
@@ -922,7 +1045,6 @@ var sheet = createStyleSheet((theme) => {
|
|
|
922
1045
|
lineHeight: theme.type.body.lineHeight,
|
|
923
1046
|
color: theme.color.text
|
|
924
1047
|
},
|
|
925
|
-
rowTextOn: { fontWeight: theme.fontWeight.bold },
|
|
926
1048
|
duration: { ...tiny, marginStart: "auto" },
|
|
927
1049
|
bigTimeDays: { fontSize: theme.type.title3.fontSize, lineHeight: theme.type.title3.lineHeight },
|
|
928
1050
|
bigTime: {
|
|
@@ -980,8 +1102,17 @@ var sheet = createStyleSheet((theme) => {
|
|
|
980
1102
|
borderRadius: theme.radius.full,
|
|
981
1103
|
backgroundColor: theme.color.accent
|
|
982
1104
|
},
|
|
983
|
-
tickLabels: { height: theme.type.
|
|
984
|
-
tickText: {
|
|
1105
|
+
tickLabels: { height: theme.type.caption1.lineHeight, marginTop: theme.space.s1 },
|
|
1106
|
+
tickText: {
|
|
1107
|
+
...tiny,
|
|
1108
|
+
fontSize: theme.fontSize[12],
|
|
1109
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
1110
|
+
fontWeight: theme.fontWeight.medium,
|
|
1111
|
+
fontVariant: ["tabular-nums"],
|
|
1112
|
+
color: theme.color.text2,
|
|
1113
|
+
position: "absolute",
|
|
1114
|
+
transform: [{ translateX: -theme.space.s2 }]
|
|
1115
|
+
},
|
|
985
1116
|
navRow: { flexDirection: "row", justifyContent: "space-between" },
|
|
986
1117
|
nav: {
|
|
987
1118
|
minWidth: theme.tapMin,
|
|
@@ -999,7 +1130,7 @@ var sheet = createStyleSheet((theme) => {
|
|
|
999
1130
|
monthName: {
|
|
1000
1131
|
...small,
|
|
1001
1132
|
textAlign: "center",
|
|
1002
|
-
fontWeight: theme.fontWeight.
|
|
1133
|
+
fontWeight: theme.fontWeight.semibold,
|
|
1003
1134
|
color: theme.color.text2
|
|
1004
1135
|
},
|
|
1005
1136
|
monthBar: {
|
|
@@ -1018,6 +1149,10 @@ var sheet = createStyleSheet((theme) => {
|
|
|
1018
1149
|
off: { opacity: theme.state.disabledOpacity },
|
|
1019
1150
|
pressed: { opacity: theme.state.pressedOpacity },
|
|
1020
1151
|
zone: { flexDirection: "row", alignItems: "center", gap: theme.space.s1 },
|
|
1152
|
+
zoneRow: { gap: theme.space.s1 },
|
|
1153
|
+
zoneChips: { flexDirection: "row", flexWrap: "wrap", gap: theme.space.s1 },
|
|
1154
|
+
srOnly: { position: "absolute", width: theme.space[1], height: theme.space[1], opacity: 0 },
|
|
1155
|
+
clipboard: { marginStart: "auto", flexDirection: "row" },
|
|
1021
1156
|
zoneText: {
|
|
1022
1157
|
fontFamily: theme.font.sans,
|
|
1023
1158
|
fontSize: theme.type.caption2.fontSize,
|
|
@@ -1060,7 +1195,10 @@ function TimeRangeControl({
|
|
|
1060
1195
|
open: openProp,
|
|
1061
1196
|
defaultOpen = false,
|
|
1062
1197
|
onOpenChange,
|
|
1063
|
-
|
|
1198
|
+
timezone: timezoneProp,
|
|
1199
|
+
defaultTimezone = "default",
|
|
1200
|
+
onTimezoneChange,
|
|
1201
|
+
timezones,
|
|
1064
1202
|
options = TIME_RANGE_OPTIONS,
|
|
1065
1203
|
weekStartsOn = 1,
|
|
1066
1204
|
locale,
|
|
@@ -1080,9 +1218,21 @@ function TimeRangeControl({
|
|
|
1080
1218
|
onRefreshIntervalChange,
|
|
1081
1219
|
refreshIntervals = REFRESH_INTERVALS,
|
|
1082
1220
|
minRefreshInterval,
|
|
1221
|
+
onNotify,
|
|
1222
|
+
asSheet = true,
|
|
1083
1223
|
label: labelProp,
|
|
1224
|
+
size = "sm",
|
|
1084
1225
|
disabled = false,
|
|
1226
|
+
density = "comfortable",
|
|
1227
|
+
orientation = "horizontal",
|
|
1228
|
+
variant = "outline",
|
|
1229
|
+
placeholder,
|
|
1230
|
+
error,
|
|
1085
1231
|
style,
|
|
1232
|
+
quickRanges,
|
|
1233
|
+
quickRangesCustom = false,
|
|
1234
|
+
stepStyle = "double",
|
|
1235
|
+
ruler = false,
|
|
1086
1236
|
labels: labelsProp,
|
|
1087
1237
|
...panelOptions
|
|
1088
1238
|
}) {
|
|
@@ -1112,7 +1262,14 @@ function TimeRangeControl({
|
|
|
1112
1262
|
loading || disabled,
|
|
1113
1263
|
() => onRefresh?.()
|
|
1114
1264
|
);
|
|
1115
|
-
const
|
|
1265
|
+
const [internalZone, setInternalZone] = React.useState(defaultTimezone);
|
|
1266
|
+
const timezone = timezoneProp ?? internalZone;
|
|
1267
|
+
const changeZone = (zone) => {
|
|
1268
|
+
if (timezoneProp === void 0) setInternalZone(zone);
|
|
1269
|
+
onTimezoneChange?.(zone);
|
|
1270
|
+
};
|
|
1271
|
+
const zoneEditable = timezoneProp === void 0 || onTimezoneChange != null;
|
|
1272
|
+
const Z = React.useMemo(() => dateZone(timezone), [timezone]);
|
|
1116
1273
|
const readCtx = () => ({
|
|
1117
1274
|
Z,
|
|
1118
1275
|
now: now?.() ?? Date.now(),
|
|
@@ -1165,120 +1322,221 @@ function TimeRangeControl({
|
|
|
1165
1322
|
if (next) commit(next, "zoom");
|
|
1166
1323
|
};
|
|
1167
1324
|
const atNow = value ? timeRangeReachesNow(value, ctx) : true;
|
|
1168
|
-
const text = value ? timeRangeLabel(value, ctx) : labels.anyTime;
|
|
1325
|
+
const text = value ? timeRangeLabel(value, ctx) : placeholder ?? labels.anyTime;
|
|
1326
|
+
const compact = density === "compact";
|
|
1327
|
+
const vertical = orientation === "vertical";
|
|
1328
|
+
const invalid = error != null && error !== false;
|
|
1169
1329
|
const canZoom = value != null && zoomTimeRange(value, 2, ctx) != null;
|
|
1170
1330
|
const cancelling = loading && onCancelRefresh != null;
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1331
|
+
const drawn = theme.ctl[size];
|
|
1332
|
+
const slopY = Math.max(0, (theme.hit[size] - drawn) / 2);
|
|
1333
|
+
const hitSlop = { top: slopY, bottom: slopY };
|
|
1334
|
+
const single = stepStyle === "single";
|
|
1335
|
+
const rulerTicks = React.useMemo(() => {
|
|
1336
|
+
if (!ruler || !value) return [];
|
|
1337
|
+
const r = resolveDateValue(value, ctx);
|
|
1338
|
+
if (r.from == null || r.to == null) return [];
|
|
1339
|
+
const span = r.to - r.from;
|
|
1340
|
+
const hours = span <= 2 * 864e5;
|
|
1341
|
+
return [0, 1, 2].map((i) => {
|
|
1342
|
+
const w = Z.wall(r.from + span * i / 2);
|
|
1343
|
+
const two = (n) => String(n).padStart(2, "0");
|
|
1344
|
+
return hours ? `${two(w.h)}:${two(w.mi)}` : `${two(w.d)}/${two(w.mo + 1)}`;
|
|
1345
|
+
});
|
|
1346
|
+
}, [ruler, value, Z, ctx.now]);
|
|
1347
|
+
const iconButton = (name, a11y, off, onPress) => (
|
|
1348
|
+
// Step and zoom join the trigger's tier as outline icon buttons (F48).
|
|
1349
|
+
/* @__PURE__ */ jsx(
|
|
1350
|
+
Button,
|
|
1351
|
+
{
|
|
1352
|
+
variant,
|
|
1353
|
+
size,
|
|
1354
|
+
leadingIcon: name,
|
|
1355
|
+
accessibilityLabel: a11y,
|
|
1356
|
+
disabled: off,
|
|
1357
|
+
onPress
|
|
1358
|
+
}
|
|
1359
|
+
)
|
|
1360
|
+
);
|
|
1361
|
+
const body = /* @__PURE__ */ jsx(
|
|
1362
|
+
TimeRangeSheetBody,
|
|
1173
1363
|
{
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1364
|
+
...panelOptions,
|
|
1365
|
+
ctx,
|
|
1366
|
+
value,
|
|
1367
|
+
options,
|
|
1368
|
+
recent,
|
|
1369
|
+
labels,
|
|
1370
|
+
dateLabels,
|
|
1371
|
+
timezone,
|
|
1372
|
+
onTimezoneChange: zoneEditable ? changeZone : void 0,
|
|
1373
|
+
timezones,
|
|
1374
|
+
onNotify,
|
|
1375
|
+
onApply: commitFromSheet,
|
|
1376
|
+
onCancel: () => setOpen(false),
|
|
1377
|
+
children: onRefresh ? /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
1378
|
+
/* @__PURE__ */ jsx(Text, { style: styles.partLabel, children: labels.autoRefresh }),
|
|
1379
|
+
/* @__PURE__ */ jsx(
|
|
1380
|
+
ScrollView,
|
|
1381
|
+
{
|
|
1382
|
+
horizontal: true,
|
|
1383
|
+
showsHorizontalScrollIndicator: false,
|
|
1384
|
+
contentContainerStyle: styles.chips,
|
|
1385
|
+
children: ["off", ...offered].map((i) => {
|
|
1386
|
+
const on = (refreshIntervalMs(interval) == null ? "off" : interval) === i;
|
|
1387
|
+
return /* @__PURE__ */ jsx(
|
|
1388
|
+
Chip,
|
|
1389
|
+
{
|
|
1390
|
+
variant: "filter",
|
|
1391
|
+
size: "sm",
|
|
1392
|
+
selected: on,
|
|
1393
|
+
onSelectedChange: () => pickInterval(i),
|
|
1394
|
+
accessibilityLabel: i === "off" ? labels.off : i,
|
|
1395
|
+
children: i === "off" ? labels.off : i
|
|
1396
|
+
},
|
|
1397
|
+
i
|
|
1398
|
+
);
|
|
1399
|
+
})
|
|
1400
|
+
}
|
|
1401
|
+
)
|
|
1402
|
+
] }) : null
|
|
1403
|
+
},
|
|
1404
|
+
session
|
|
1182
1405
|
);
|
|
1183
|
-
return /* @__PURE__ */ jsxs(View, {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
Pressable,
|
|
1406
|
+
return /* @__PURE__ */ jsxs(View, { children: [
|
|
1407
|
+
quickRanges && (quickRanges.length > 0 || quickRangesCustom) ? /* @__PURE__ */ jsxs(
|
|
1408
|
+
ScrollView,
|
|
1187
1409
|
{
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
disabled,
|
|
1193
|
-
onPress: () => setOpen(true),
|
|
1194
|
-
style: ({ pressed }) => [styles.trigger, disabled && styles.off, pressed && styles.pressed],
|
|
1410
|
+
horizontal: true,
|
|
1411
|
+
showsHorizontalScrollIndicator: false,
|
|
1412
|
+
contentContainerStyle: styles.chips,
|
|
1413
|
+
style: styles.quick,
|
|
1195
1414
|
children: [
|
|
1196
|
-
/* @__PURE__ */ jsx(
|
|
1197
|
-
|
|
1198
|
-
|
|
1415
|
+
quickRanges.map((q) => /* @__PURE__ */ jsx(
|
|
1416
|
+
Chip,
|
|
1417
|
+
{
|
|
1418
|
+
variant: "filter",
|
|
1419
|
+
size: "sm",
|
|
1420
|
+
disabled,
|
|
1421
|
+
selected: value != null && sameDateValue(value, q.value),
|
|
1422
|
+
onSelectedChange: () => commit(q.value, "panel"),
|
|
1423
|
+
children: q.label
|
|
1424
|
+
},
|
|
1425
|
+
q.label
|
|
1426
|
+
)),
|
|
1427
|
+
quickRangesCustom ? /* @__PURE__ */ jsx(
|
|
1428
|
+
Chip,
|
|
1429
|
+
{
|
|
1430
|
+
variant: "filter",
|
|
1431
|
+
size: "sm",
|
|
1432
|
+
leadingIcon: "calendar",
|
|
1433
|
+
disabled,
|
|
1434
|
+
selected: false,
|
|
1435
|
+
onSelectedChange: () => setOpen(true),
|
|
1436
|
+
children: labels.customChip
|
|
1437
|
+
}
|
|
1438
|
+
) : null
|
|
1199
1439
|
]
|
|
1200
1440
|
}
|
|
1201
|
-
),
|
|
1202
|
-
shift ? iconButton("chevrons-right", labels.moveForward, disabled || atNow, () => step(1)) : null,
|
|
1203
|
-
zoom ? iconButton("zoom-out", labels.zoomOut, disabled || !canZoom, zoomOut) : null,
|
|
1204
|
-
onRefresh ? /* @__PURE__ */ jsx(
|
|
1205
|
-
Button,
|
|
1206
|
-
{
|
|
1207
|
-
variant: "outline",
|
|
1208
|
-
size: "sm",
|
|
1209
|
-
disabled,
|
|
1210
|
-
loading: loading && !cancelling,
|
|
1211
|
-
leadingIcon: cancelling ? "x" : "refresh",
|
|
1212
|
-
accessibilityLabel: cancelling ? labels.cancelRefresh : labels.refresh,
|
|
1213
|
-
onPress: () => cancelling ? onCancelRefresh() : onRefresh(),
|
|
1214
|
-
children: cancelling ? labels.cancel : refreshIntervalMs(interval) ? interval : labels.refresh
|
|
1215
|
-
}
|
|
1216
1441
|
) : null,
|
|
1217
|
-
/* @__PURE__ */
|
|
1218
|
-
|
|
1442
|
+
/* @__PURE__ */ jsxs(
|
|
1443
|
+
View,
|
|
1219
1444
|
{
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1445
|
+
style: [
|
|
1446
|
+
styles.root,
|
|
1447
|
+
compact ? styles.rootCompact : null,
|
|
1448
|
+
vertical ? styles.rootVertical : null,
|
|
1449
|
+
style
|
|
1450
|
+
],
|
|
1451
|
+
children: [
|
|
1452
|
+
shift ? iconButton(
|
|
1453
|
+
single ? "chevron-left" : "chevrons-left",
|
|
1454
|
+
labels.moveBack,
|
|
1455
|
+
disabled || !value,
|
|
1456
|
+
() => step(-1)
|
|
1457
|
+
) : null,
|
|
1458
|
+
/* @__PURE__ */ jsxs(
|
|
1459
|
+
Pressable,
|
|
1233
1460
|
{
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
)
|
|
1255
|
-
|
|
1461
|
+
accessibilityRole: "button",
|
|
1462
|
+
accessibilityLabel: labels.triggerLabel(label, text),
|
|
1463
|
+
accessibilityHint: value ? timeRangeReceipt(value, ctx) : void 0,
|
|
1464
|
+
accessibilityState: { disabled, expanded: open },
|
|
1465
|
+
"aria-invalid": invalid || void 0,
|
|
1466
|
+
disabled,
|
|
1467
|
+
onPress: () => setOpen(!open),
|
|
1468
|
+
hitSlop,
|
|
1469
|
+
style: ({ pressed }) => [
|
|
1470
|
+
styles.trigger,
|
|
1471
|
+
compact ? styles.triggerCompact : null,
|
|
1472
|
+
variant === "ghost" ? styles.triggerGhost : null,
|
|
1473
|
+
invalid ? { borderColor: theme.color.danger } : null,
|
|
1474
|
+
{ height: drawn },
|
|
1475
|
+
disabled && styles.off,
|
|
1476
|
+
pressed && styles.pressed
|
|
1477
|
+
],
|
|
1478
|
+
children: [
|
|
1479
|
+
/* @__PURE__ */ jsx(Icon, { name: "clock", size: theme.icon.sm, color: theme.color.text2 }),
|
|
1480
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [theme.ctl.label[size], styles.triggerText], children: text }),
|
|
1481
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: theme.icon.sm, color: theme.color.text2 })
|
|
1482
|
+
]
|
|
1256
1483
|
}
|
|
1257
|
-
)
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1484
|
+
),
|
|
1485
|
+
shift ? iconButton(
|
|
1486
|
+
single ? "chevron-right" : "chevrons-right",
|
|
1487
|
+
labels.moveForward,
|
|
1488
|
+
disabled || atNow,
|
|
1489
|
+
() => step(1)
|
|
1490
|
+
) : null,
|
|
1491
|
+
zoom ? iconButton("zoom-out", labels.zoomOut, disabled || !canZoom, zoomOut) : null,
|
|
1492
|
+
onRefresh ? /* @__PURE__ */ jsx(
|
|
1493
|
+
Button,
|
|
1494
|
+
{
|
|
1495
|
+
variant,
|
|
1496
|
+
size,
|
|
1497
|
+
disabled,
|
|
1498
|
+
loading: loading && !cancelling,
|
|
1499
|
+
leadingIcon: cancelling ? "x" : "refresh",
|
|
1500
|
+
accessibilityLabel: cancelling ? labels.cancelRefresh : labels.refresh,
|
|
1501
|
+
onPress: () => cancelling ? onCancelRefresh() : onRefresh(),
|
|
1502
|
+
children: cancelling ? labels.cancel : refreshIntervalMs(interval) ? interval : labels.refresh
|
|
1503
|
+
}
|
|
1504
|
+
) : null,
|
|
1505
|
+
asSheet ? /* @__PURE__ */ jsx(
|
|
1506
|
+
Sheet,
|
|
1507
|
+
{
|
|
1508
|
+
open,
|
|
1509
|
+
onClose: () => setOpen(false),
|
|
1510
|
+
title: label,
|
|
1511
|
+
detents: ["half", "full"],
|
|
1512
|
+
children: body
|
|
1513
|
+
}
|
|
1514
|
+
) : null
|
|
1515
|
+
]
|
|
1516
|
+
}
|
|
1517
|
+
),
|
|
1518
|
+
typeof error === "string" && error ? /* @__PURE__ */ jsx(Text, { style: styles.errorText, role: "alert", children: error }) : null,
|
|
1519
|
+
rulerTicks.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles.ruler, accessibilityElementsHidden: true, importantForAccessibility: "no", children: rulerTicks.map((t, i) => /* @__PURE__ */ jsx(Text, { style: styles.rulerTick, children: t }, i)) }) : null,
|
|
1520
|
+
!asSheet && open ? /* @__PURE__ */ jsx(View, { style: styles.card, children: body }) : null
|
|
1262
1521
|
] });
|
|
1263
1522
|
}
|
|
1264
1523
|
var sheet2 = createStyleSheet((theme) => ({
|
|
1265
1524
|
root: { flexDirection: "row", alignItems: "center", gap: theme.space.s1 },
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1525
|
+
rootCompact: { gap: theme.space[2] },
|
|
1526
|
+
rootVertical: { flexDirection: "column", alignItems: "stretch" },
|
|
1527
|
+
triggerCompact: { paddingHorizontal: theme.space.s2, gap: theme.space.s1 },
|
|
1528
|
+
triggerGhost: { borderColor: "transparent", backgroundColor: "transparent" },
|
|
1529
|
+
errorText: {
|
|
1530
|
+
marginTop: theme.space.s1,
|
|
1531
|
+
fontFamily: theme.font.sans,
|
|
1532
|
+
fontSize: theme.type.footnote.fontSize,
|
|
1533
|
+
color: theme.color.danger
|
|
1275
1534
|
},
|
|
1276
1535
|
trigger: {
|
|
1277
1536
|
flexShrink: 1,
|
|
1278
1537
|
flexDirection: "row",
|
|
1279
1538
|
alignItems: "center",
|
|
1280
1539
|
gap: theme.space.s2,
|
|
1281
|
-
minHeight: theme.tapMin,
|
|
1282
1540
|
paddingHorizontal: theme.space.s3,
|
|
1283
1541
|
borderRadius: theme.radius.md,
|
|
1284
1542
|
borderWidth: theme.borderWidth.base,
|
|
@@ -1288,10 +1546,18 @@ var sheet2 = createStyleSheet((theme) => ({
|
|
|
1288
1546
|
triggerText: {
|
|
1289
1547
|
flexShrink: 1,
|
|
1290
1548
|
fontFamily: theme.font.sans,
|
|
1291
|
-
|
|
1292
|
-
|
|
1549
|
+
// The value reads at the tier's label size (R12) but stays regular weight.
|
|
1550
|
+
fontWeight: theme.fontWeight.regular,
|
|
1293
1551
|
color: theme.color.text
|
|
1294
1552
|
},
|
|
1553
|
+
card: {
|
|
1554
|
+
marginTop: theme.space.s2,
|
|
1555
|
+
padding: theme.space.s3,
|
|
1556
|
+
borderRadius: theme.radius.md,
|
|
1557
|
+
borderWidth: theme.borderWidth.base,
|
|
1558
|
+
borderColor: theme.color.border,
|
|
1559
|
+
backgroundColor: theme.color.surface
|
|
1560
|
+
},
|
|
1295
1561
|
off: { opacity: theme.state.disabledOpacity },
|
|
1296
1562
|
pressed: { opacity: theme.state.pressedOpacity },
|
|
1297
1563
|
group: { gap: theme.space.s1 },
|
|
@@ -1303,23 +1569,19 @@ var sheet2 = createStyleSheet((theme) => ({
|
|
|
1303
1569
|
color: theme.color.text2
|
|
1304
1570
|
},
|
|
1305
1571
|
chips: { flexDirection: "row", gap: theme.space.s1 },
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
justifyContent: "
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
borderWidth: theme.borderWidth.base,
|
|
1312
|
-
borderColor: theme.color.border,
|
|
1313
|
-
backgroundColor: theme.color.surface
|
|
1572
|
+
ruler: {
|
|
1573
|
+
flexDirection: "row",
|
|
1574
|
+
justifyContent: "space-between",
|
|
1575
|
+
marginTop: theme.space.s2,
|
|
1576
|
+
paddingHorizontal: theme.space.s1
|
|
1314
1577
|
},
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
color: theme.color.text
|
|
1578
|
+
rulerTick: {
|
|
1579
|
+
fontFamily: theme.font.mono,
|
|
1580
|
+
fontSize: theme.type.caption2.fontSize,
|
|
1581
|
+
lineHeight: theme.type.caption2.lineHeight,
|
|
1582
|
+
color: theme.color.text3
|
|
1321
1583
|
},
|
|
1322
|
-
|
|
1584
|
+
quick: { marginBottom: theme.space.s2 }
|
|
1323
1585
|
}));
|
|
1324
1586
|
|
|
1325
1587
|
export { REFRESH_INTERVALS, TIME_RANGE_PERIODS, TIME_RANGE_UNITS, TIME_RANGE_VIEWS, TimeRangeControl, refreshIntervalMs };
|