@xaui/native 0.9.1-alpha.93 → 0.9.1-beta.100
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/{chunk-AXKDHX5V.cjs → chunk-2IOL3VDP.cjs} +3 -3
- package/dist/{chunk-PAQZOD2L.js → chunk-2JFMCW5E.js} +1 -1
- package/dist/{chunk-TPYOQSKT.js → chunk-2UNLQRXY.js} +1 -1
- package/dist/{chunk-GYEQEF5H.js → chunk-356DND54.js} +1 -1
- package/dist/{chunk-OD6H7ANY.js → chunk-3BRVAMXQ.js} +2 -2
- package/dist/{chunk-QCH7X7O2.cjs → chunk-3DQCHPB6.cjs} +14 -14
- package/dist/{chunk-B33OU34Z.cjs → chunk-3MMOZP4Y.cjs} +20 -20
- package/dist/chunk-3TBT6ORW.cjs +662 -0
- package/dist/{chunk-DN3X5WIB.js → chunk-3VMKOQXH.js} +1 -1
- package/dist/{chunk-CBXILKQZ.cjs → chunk-435MOVG2.cjs} +3 -3
- package/dist/{chunk-2B6PUYTP.cjs → chunk-55KGHYYU.cjs} +4 -4
- package/dist/{chunk-V4IFH65I.cjs → chunk-5CXOSDFI.cjs} +2 -2
- package/dist/{chunk-FVEMTBU4.js → chunk-5G36GMFS.js} +3 -3
- package/dist/{chunk-BI5ME4QP.cjs → chunk-5UT5I53X.cjs} +8 -8
- package/dist/{chunk-V2CEKPJ6.js → chunk-6MVKLRLZ.js} +1 -1
- package/dist/{chunk-RSIWSVXI.js → chunk-6NAZ2IHL.js} +1 -1
- package/dist/{chunk-LPJ3UBSO.cjs → chunk-6NRWZR7T.cjs} +2 -2
- package/dist/{chunk-7NQL5DXY.js → chunk-6XY3XAEQ.js} +1 -1
- package/dist/{chunk-UEW3GAP5.cjs → chunk-6ZWQDTGQ.cjs} +5 -5
- package/dist/{chunk-ODQHAPQW.js → chunk-73EVNWZI.js} +25 -23
- package/dist/{chunk-VMPCXS4S.js → chunk-7EPH24S2.js} +23 -21
- package/dist/{chunk-G2YHGLN3.cjs → chunk-7JWOAGB3.cjs} +9 -9
- package/dist/{chunk-FXN32S75.cjs → chunk-ADGHFLBJ.cjs} +4 -4
- package/dist/{chunk-OPLPLFGK.cjs → chunk-AHKKEM3K.cjs} +66 -23
- package/dist/{chunk-WRZV6ORJ.js → chunk-AYOJXFHR.js} +1 -1
- package/dist/{chunk-MMFIMQMQ.js → chunk-BBQQIO6L.js} +6 -6
- package/dist/{chunk-PROLOLZ5.cjs → chunk-BGBJTBFC.cjs} +3 -3
- package/dist/{chunk-RXEUKYM5.js → chunk-BH4IN6H6.js} +2 -2
- package/dist/{chunk-WLWZG2PA.cjs → chunk-BKY5YQ7W.cjs} +1 -1
- package/dist/{chunk-CYOUOQXT.cjs → chunk-C2S6J27O.cjs} +6 -6
- package/dist/chunk-C6JO2RTV.cjs +752 -0
- package/dist/{chunk-NVODH2PR.js → chunk-CCTAJXZ3.js} +63 -61
- package/dist/{chunk-ORXVXYKC.cjs → chunk-CHGBWFDI.cjs} +63 -26
- package/dist/chunk-CS6CYB4I.cjs +260 -0
- package/dist/{chunk-WLJPO3AS.cjs → chunk-CZ2NUGUI.cjs} +357 -201
- package/dist/{chunk-PYQ2P3M5.cjs → chunk-CZEWWCWG.cjs} +58 -58
- package/dist/{chunk-PDSR42YC.cjs → chunk-D22K3NZU.cjs} +3 -3
- package/dist/{chunk-WYRM77XM.cjs → chunk-ENZBKNFJ.cjs} +15 -15
- package/dist/chunk-ETY5PM3E.cjs +797 -0
- package/dist/{chunk-62AYYMZP.cjs → chunk-FDYPWVNP.cjs} +3 -3
- package/dist/{chunk-PAQD6UUF.cjs → chunk-FLKTJ46K.cjs} +17 -17
- package/dist/{chunk-EBCAPIBD.js → chunk-FSVZXWLZ.js} +71 -51
- package/dist/{chunk-FOOXBVOQ.js → chunk-GVZJNIHN.js} +184 -68
- package/dist/chunk-GWTURY4S.cjs +999 -0
- package/dist/{chunk-OW4N2C3M.cjs → chunk-HBYT7B47.cjs} +88 -61
- package/dist/{chunk-7EVW6O2Q.js → chunk-HDERVGWZ.js} +2 -2
- package/dist/{chunk-XWIPLZTD.cjs → chunk-HOV25N3M.cjs} +2 -2
- package/dist/{chunk-5MMBEDZG.cjs → chunk-I3XIZWCV.cjs} +29 -29
- package/dist/{chunk-EDNCHCIN.cjs → chunk-IAJG7GYE.cjs} +2 -2
- package/dist/{chunk-P7OHZCU3.js → chunk-IAWLQN2W.js} +2 -2
- package/dist/{chunk-RCSEVEIR.js → chunk-ICVIWXK4.js} +1 -1
- package/dist/chunk-IHRPAKCZ.cjs +540 -0
- package/dist/{chunk-ZWS3FQ3J.js → chunk-IUDQG3JI.js} +57 -57
- package/dist/{chunk-JKDWYNSG.js → chunk-IVELCJEN.js} +110 -108
- package/dist/{chunk-5YZUYSV7.js → chunk-JYV53WUN.js} +1 -1
- package/dist/{chunk-QN2D5ZCS.cjs → chunk-KAYZH7ZN.cjs} +4 -4
- package/dist/{chunk-RREJUSAS.cjs → chunk-KIXHSX3L.cjs} +4 -4
- package/dist/{chunk-2AFA5HA2.js → chunk-KQW25RCC.js} +77 -75
- package/dist/{chunk-7M6YKCHX.js → chunk-KZZWNDDO.js} +2 -2
- package/dist/{chunk-J5COSALO.cjs → chunk-L4B6Z45Q.cjs} +5 -5
- package/dist/{chunk-X4CZYJZ6.cjs → chunk-LCGJA37L.cjs} +12 -12
- package/dist/{chunk-P2CJNTAP.js → chunk-LMMHAGOM.js} +33 -22
- package/dist/{chunk-SUJLTC2K.js → chunk-LPGY2IDX.js} +1 -1
- package/dist/{chunk-P5M5URAB.js → chunk-LSZW4G7B.js} +31 -31
- package/dist/{chunk-LECYGVIH.js → chunk-LYWXGEED.js} +51 -49
- package/dist/{chunk-VQGNLX5C.js → chunk-M352N6PQ.js} +6 -6
- package/dist/{chunk-AIND5F7P.js → chunk-MTQGFUW5.js} +29 -29
- package/dist/{chunk-ZKGVOXLQ.js → chunk-MXSIY6QQ.js} +4 -4
- package/dist/{chunk-3CPLJJWX.js → chunk-MZUYTCCB.js} +1 -1
- package/dist/{chunk-DYQB54JA.cjs → chunk-NPAGA6SH.cjs} +2 -2
- package/dist/{chunk-O6B72H4B.js → chunk-NQDTGYHC.js} +7 -9
- package/dist/{chunk-NADCILBL.cjs → chunk-NRU5APUE.cjs} +4 -4
- package/dist/{chunk-43S673KF.js → chunk-NTVPLDJC.js} +1 -1
- package/dist/{chunk-7AVZ2FST.cjs → chunk-NXVSNESK.cjs} +12 -12
- package/dist/{chunk-QELEKXN3.cjs → chunk-OMI2FRCU.cjs} +5 -5
- package/dist/{chunk-E4FWGZH2.js → chunk-OUNTRW6E.js} +5 -5
- package/dist/{chunk-JBZ7SBRV.cjs → chunk-Q3ZKZ2Y6.cjs} +3 -3
- package/dist/chunk-QRH45OO3.cjs +903 -0
- package/dist/{chunk-6RU6GUJP.js → chunk-QZF7RSVV.js} +1 -1
- package/dist/{chunk-UYQLW7OD.js → chunk-RAYO2TJL.js} +2 -2
- package/dist/{chunk-FRLWG5LM.js → chunk-RFT5MGJC.js} +25 -25
- package/dist/{chunk-USIWPESU.js → chunk-SIX5AVXG.js} +1 -1
- package/dist/chunk-SVS726BW.js +822 -0
- package/dist/{chunk-GGP2ERSV.js → chunk-T5ES7FOL.js} +1 -1
- package/dist/{chunk-JJYHW4PV.js → chunk-TNFLBURM.js} +2 -2
- package/dist/{chunk-YCQEX25B.cjs → chunk-U6YD3UBO.cjs} +7 -7
- package/dist/chunk-USQK6SFZ.cjs +627 -0
- package/dist/{chunk-MSORLKO7.cjs → chunk-V3C3ATRO.cjs} +2 -2
- package/dist/{chunk-TCWW7JI2.js → chunk-V5FYHQKQ.js} +111 -94
- package/dist/{chunk-CBRW53GN.cjs → chunk-V5V2QYFH.cjs} +43 -27
- package/dist/{chunk-YGETADPV.js → chunk-V7YT4SDX.js} +2 -2
- package/dist/{chunk-TRWZEOCO.js → chunk-VL2ZT4BB.js} +5 -5
- package/dist/{chunk-2SHWOFQV.js → chunk-VQ4OTVET.js} +29 -29
- package/dist/{chunk-Q6OVVUAT.js → chunk-VTGWFZCA.js} +2 -2
- package/dist/{chunk-6GQ7UTJ7.cjs → chunk-VXAIFOXL.cjs} +2 -2
- package/dist/{chunk-BJVO7DWJ.js → chunk-W4F4NQXM.js} +1 -1
- package/dist/{chunk-JC4YCKKL.js → chunk-WIGDDZHO.js} +198 -82
- package/dist/{chunk-ZE4IHUUO.cjs → chunk-WNEDQTH6.cjs} +2 -2
- package/dist/chunk-WSDDUVF6.cjs +395 -0
- package/dist/{chunk-QHXTO525.js → chunk-WYJHDTU7.js} +1 -1
- package/dist/{chunk-RLC3EXMV.js → chunk-XM4IN4Q6.js} +2 -2
- package/dist/chunk-XXXR2AD3.cjs +94 -0
- package/dist/{chunk-AR7667VN.cjs → chunk-YJA7OQQZ.cjs} +4 -4
- package/dist/{chunk-LKRQUQZQ.cjs → chunk-YRANVNJG.cjs} +2 -2
- package/dist/{chunk-WIX4SYZI.cjs → chunk-YUCK5VJO.cjs} +10 -10
- package/dist/chunk-ZBFBF7S4.cjs +1054 -0
- package/dist/{chunk-52XUGOLD.js → chunk-ZBY7Q7WJ.js} +3 -3
- package/dist/chunk-ZDJQ643D.js +62 -0
- package/dist/{chunk-QUSQEYLP.cjs → chunk-ZNKHL5O6.cjs} +30 -32
- package/dist/{chunk-U5CUBDJA.js → chunk-ZR5YOCOQ.js} +15 -15
- package/dist/components/accordion/accordion.animation.d.cts +1 -1
- package/dist/components/accordion/accordion.animation.d.ts +1 -1
- package/dist/components/accordion/accordion.type.d.cts +1 -1
- package/dist/components/accordion/accordion.type.d.ts +1 -1
- package/dist/components/accordion/index.cjs +3 -3
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/agenda-calendar/agenda-calendar-today-button.d.cts +4 -0
- package/dist/components/agenda-calendar/agenda-calendar-today-button.d.ts +4 -0
- package/dist/components/agenda-calendar/agenda-calendar.recipe.d.cts +1 -1
- package/dist/components/agenda-calendar/agenda-calendar.recipe.d.ts +1 -1
- package/dist/components/agenda-calendar/agenda-calendar.type.d.cts +4 -1
- package/dist/components/agenda-calendar/agenda-calendar.type.d.ts +4 -1
- package/dist/components/agenda-calendar/index.cjs +4 -4
- package/dist/components/agenda-calendar/index.js +3 -3
- package/dist/components/alert/alert-icon.d.cts +2 -2
- package/dist/components/alert/alert-icon.d.ts +2 -2
- package/dist/components/alert/alert.type.d.cts +1 -1
- package/dist/components/alert/alert.type.d.ts +1 -1
- package/dist/components/alert/index.cjs +4 -4
- package/dist/components/alert/index.js +3 -3
- package/dist/components/autocomplete/autocomplete-description.d.cts +14 -0
- package/dist/components/autocomplete/autocomplete-description.d.ts +14 -0
- package/dist/components/autocomplete/autocomplete-error.d.cts +12 -0
- package/dist/components/autocomplete/autocomplete-error.d.ts +12 -0
- package/dist/components/autocomplete/autocomplete-label.d.cts +15 -0
- package/dist/components/autocomplete/autocomplete-label.d.ts +15 -0
- package/dist/components/autocomplete/autocomplete.d.cts +50 -7
- package/dist/components/autocomplete/autocomplete.d.ts +50 -7
- package/dist/components/autocomplete/autocomplete.type.d.cts +21 -4
- package/dist/components/autocomplete/autocomplete.type.d.ts +21 -4
- package/dist/components/autocomplete/index.cjs +11 -4
- package/dist/components/autocomplete/index.d.cts +50 -3
- package/dist/components/autocomplete/index.d.ts +50 -3
- package/dist/components/autocomplete/index.js +10 -3
- package/dist/components/avatar/avatar-fallback.d.cts +1 -1
- package/dist/components/avatar/avatar-fallback.d.ts +1 -1
- package/dist/components/avatar/avatar.d.cts +1 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.type.d.cts +1 -1
- package/dist/components/avatar/avatar.type.d.ts +1 -1
- package/dist/components/avatar/index.cjs +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.d.cts +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +1 -1
- package/dist/components/bottom-sheet/index.cjs +3 -3
- package/dist/components/bottom-sheet/index.js +2 -2
- package/dist/components/button/index.cjs +3 -3
- package/dist/components/button/index.js +2 -2
- package/dist/components/calendar/index.cjs +3 -3
- package/dist/components/calendar/index.js +2 -2
- package/dist/components/card/card-background.d.cts +1 -1
- package/dist/components/card/card-background.d.ts +1 -1
- package/dist/components/card/card.utils.d.cts +1 -1
- package/dist/components/card/card.utils.d.ts +1 -1
- package/dist/components/card/index.cjs +3 -3
- package/dist/components/card/index.js +2 -2
- package/dist/components/carousel/index.cjs +3 -3
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/checkbox/checkbox.recipe.d.cts +1 -1
- package/dist/components/checkbox/checkbox.recipe.d.ts +1 -1
- package/dist/components/checkbox/checkbox.type.d.cts +1 -1
- package/dist/components/checkbox/checkbox.type.d.ts +1 -1
- package/dist/components/checkbox/index.cjs +3 -3
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/chip/chip.type.d.cts +1 -1
- package/dist/components/chip/chip.type.d.ts +1 -1
- package/dist/components/chip/index.cjs +4 -4
- package/dist/components/chip/index.js +3 -3
- package/dist/components/close-button/index.cjs +4 -4
- package/dist/components/close-button/index.js +3 -3
- package/dist/components/color-picker/index.cjs +9 -9
- package/dist/components/color-picker/index.js +8 -8
- package/dist/components/combobox/combobox.type.d.cts +5 -1
- package/dist/components/combobox/combobox.type.d.ts +5 -1
- package/dist/components/combobox/index.cjs +6 -5
- package/dist/components/combobox/index.d.cts +15 -1
- package/dist/components/combobox/index.d.ts +15 -1
- package/dist/components/combobox/index.js +5 -4
- package/dist/components/date-picker/index.cjs +6 -6
- package/dist/components/date-picker/index.js +5 -5
- package/dist/components/date-range-picker/index.cjs +7 -7
- package/dist/components/date-range-picker/index.js +6 -6
- package/dist/components/date-time-picker/date-time-picker-indicator.d.cts +2 -2
- package/dist/components/date-time-picker/date-time-picker-indicator.d.ts +2 -2
- package/dist/components/date-time-picker/date-time-picker.type.d.cts +3 -2
- package/dist/components/date-time-picker/date-time-picker.type.d.ts +3 -2
- package/dist/components/date-time-picker/index.cjs +9 -10
- package/dist/components/date-time-picker/index.d.cts +1 -1
- package/dist/components/date-time-picker/index.d.ts +1 -1
- package/dist/components/date-time-picker/index.js +8 -9
- package/dist/components/dialog/index.cjs +4 -4
- package/dist/components/dialog/index.js +3 -3
- package/dist/components/dummy-field/index.cjs +6 -6
- package/dist/components/dummy-field/index.js +5 -5
- package/dist/components/fab/index.cjs +3 -3
- package/dist/components/fab/index.js +2 -2
- package/dist/components/field-group/field-group-icon.d.cts +1 -1
- package/dist/components/field-group/field-group-icon.d.ts +1 -1
- package/dist/components/field-group/index.cjs +4 -4
- package/dist/components/field-group/index.js +3 -3
- package/dist/components/flip-card/index.cjs +3 -3
- package/dist/components/flip-card/index.js +2 -2
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/input-otp/input-otp.type.d.cts +1 -1
- package/dist/components/input-otp/input-otp.type.d.ts +1 -1
- package/dist/components/list-box/index.cjs +2 -2
- package/dist/components/list-box/index.js +1 -1
- package/dist/components/list-box/list-box-item-suffix.d.cts +1 -1
- package/dist/components/list-box/list-box-item-suffix.d.ts +1 -1
- package/dist/components/mask-field/index.cjs +5 -5
- package/dist/components/mask-field/index.js +4 -4
- package/dist/components/menu/index.cjs +3 -3
- package/dist/components/menu/index.js +2 -2
- package/dist/components/morph-button/index.cjs +3 -3
- package/dist/components/morph-button/index.js +2 -2
- package/dist/components/number-field/index.cjs +5 -5
- package/dist/components/number-field/index.js +4 -4
- package/dist/components/number-field/number-field-increment.d.cts +2 -2
- package/dist/components/number-field/number-field-increment.d.ts +2 -2
- package/dist/components/number-pad/index.cjs +3 -3
- package/dist/components/number-pad/index.js +2 -2
- package/dist/components/number-stepper/index.cjs +3 -3
- package/dist/components/number-stepper/index.js +2 -2
- package/dist/components/pager/index.cjs +2 -2
- package/dist/components/pager/index.js +1 -1
- package/dist/components/phone-number-field/index.cjs +43 -36
- package/dist/components/phone-number-field/index.js +15 -8
- package/dist/components/popover/index.cjs +3 -3
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.recipe.d.cts +1 -1
- package/dist/components/popover/popover.recipe.d.ts +1 -1
- package/dist/components/radio/index.cjs +3 -3
- package/dist/components/radio/index.js +2 -2
- package/dist/components/range-calendar/index.cjs +4 -4
- package/dist/components/range-calendar/index.js +3 -3
- package/dist/components/rating/index.cjs +3 -3
- package/dist/components/rating/index.js +2 -2
- package/dist/components/search-field/index.cjs +7 -7
- package/dist/components/search-field/index.js +6 -6
- package/dist/components/segment/index.cjs +4 -4
- package/dist/components/segment/index.js +2 -2
- package/dist/components/select/index.cjs +11 -4
- package/dist/components/select/index.d.cts +45 -4
- package/dist/components/select/index.d.ts +45 -4
- package/dist/components/select/index.js +10 -3
- package/dist/components/select/select-description.d.cts +14 -0
- package/dist/components/select/select-description.d.ts +14 -0
- package/dist/components/select/select-error.d.cts +13 -0
- package/dist/components/select/select-error.d.ts +13 -0
- package/dist/components/select/select-group-label.d.cts +11 -0
- package/dist/components/select/select-group-label.d.ts +11 -0
- package/dist/components/select/select-indicator.d.cts +1 -1
- package/dist/components/select/select-indicator.d.ts +1 -1
- package/dist/components/select/select-label.d.cts +11 -2
- package/dist/components/select/select-label.d.ts +11 -2
- package/dist/components/select/select.d.cts +49 -9
- package/dist/components/select/select.d.ts +49 -9
- package/dist/components/select/select.recipe.d.cts +1 -1
- package/dist/components/select/select.recipe.d.ts +1 -1
- package/dist/components/select/select.type.d.cts +33 -9
- package/dist/components/select/select.type.d.ts +33 -9
- package/dist/components/skeleton/skeleton.type.d.cts +1 -1
- package/dist/components/skeleton/skeleton.type.d.ts +1 -1
- package/dist/components/slide-button/index.cjs +30 -0
- package/dist/components/slide-button/index.d.cts +44 -0
- package/dist/components/slide-button/index.d.ts +44 -0
- package/dist/components/slide-button/index.js +30 -0
- package/dist/components/slide-button/slide-button-fill.d.cts +29 -0
- package/dist/components/slide-button/slide-button-fill.d.ts +29 -0
- package/dist/components/slide-button/slide-button-icon.d.cts +10 -0
- package/dist/components/slide-button/slide-button-icon.d.ts +10 -0
- package/dist/components/slide-button/slide-button-label.d.cts +20 -0
- package/dist/components/slide-button/slide-button-label.d.ts +20 -0
- package/dist/components/slide-button/slide-button-thumb.d.cts +20 -0
- package/dist/components/slide-button/slide-button-thumb.d.ts +20 -0
- package/dist/components/slide-button/slide-button.animation.d.cts +33 -0
- package/dist/components/slide-button/slide-button.animation.d.ts +33 -0
- package/dist/components/slide-button/slide-button.context.d.cts +7 -0
- package/dist/components/slide-button/slide-button.context.d.ts +7 -0
- package/dist/components/slide-button/slide-button.d.cts +56 -0
- package/dist/components/slide-button/slide-button.d.ts +56 -0
- package/dist/components/slide-button/slide-button.recipe.d.cts +31 -0
- package/dist/components/slide-button/slide-button.recipe.d.ts +31 -0
- package/dist/components/slide-button/slide-button.type.d.cts +79 -0
- package/dist/components/slide-button/slide-button.type.d.ts +79 -0
- package/dist/components/slider/index.cjs +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/slider-thumb.d.cts +1 -1
- package/dist/components/slider/slider-thumb.d.ts +1 -1
- package/dist/components/slider/slider.recipe.d.cts +1 -1
- package/dist/components/slider/slider.recipe.d.ts +1 -1
- package/dist/components/snackbar/index.cjs +3 -3
- package/dist/components/snackbar/index.js +2 -2
- package/dist/components/spinner/spinner.d.cts +1 -1
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/switch/index.cjs +3 -3
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.style.d.cts +1 -1
- package/dist/components/switch/switch.style.d.ts +1 -1
- package/dist/components/table/index.cjs +4 -4
- package/dist/components/table/index.js +3 -3
- package/dist/components/tabs/index.cjs +4 -4
- package/dist/components/tabs/index.js +3 -3
- package/dist/components/tag-group/index.cjs +4 -4
- package/dist/components/tag-group/index.js +3 -3
- package/dist/components/text-area/index.cjs +4 -4
- package/dist/components/text-area/index.js +3 -3
- package/dist/components/text-area/text-area.d.cts +1 -1
- package/dist/components/text-area/text-area.d.ts +1 -1
- package/dist/components/text-field/index.cjs +3 -3
- package/dist/components/text-field/index.js +2 -2
- package/dist/components/text-field/text-field.type.d.cts +4 -4
- package/dist/components/text-field/text-field.type.d.ts +4 -4
- package/dist/components/time-picker/index.cjs +5 -6
- package/dist/components/time-picker/index.d.cts +1 -1
- package/dist/components/time-picker/index.d.ts +1 -1
- package/dist/components/time-picker/index.js +4 -5
- package/dist/components/time-picker/time-picker-display.d.cts +3 -3
- package/dist/components/time-picker/time-picker-display.d.ts +3 -3
- package/dist/components/time-picker/time-picker-indicator.d.cts +2 -2
- package/dist/components/time-picker/time-picker-indicator.d.ts +2 -2
- package/dist/components/time-picker/time-picker.d.cts +1 -1
- package/dist/components/time-picker/time-picker.d.ts +1 -1
- package/dist/components/time-picker/time-picker.type.d.cts +11 -1
- package/dist/components/time-picker/time-picker.type.d.ts +11 -1
- package/dist/components/toast/index.cjs +3 -3
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast.animation.d.cts +2 -2
- package/dist/components/toast/toast.animation.d.ts +2 -2
- package/dist/components/toast/toast.utils.d.cts +1 -1
- package/dist/components/toast/toast.utils.d.ts +1 -1
- package/dist/components/toggle-button/index.cjs +3 -3
- package/dist/components/toggle-button/index.js +2 -2
- package/dist/components/typography/typography.type.d.cts +1 -1
- package/dist/components/typography/typography.type.d.ts +1 -1
- package/dist/components/wheel-picker/index.cjs +2 -2
- package/dist/components/wheel-picker/index.js +1 -1
- package/dist/hooks/use-rotation.d.cts +1 -1
- package/dist/hooks/use-rotation.d.ts +1 -1
- package/dist/index.cjs +74 -63
- package/dist/index.js +92 -81
- package/dist/system/anchored/indicator-spring.d.cts +2 -2
- package/dist/system/anchored/indicator-spring.d.ts +2 -2
- package/dist/system/index.cjs +3 -3
- package/dist/system/index.js +2 -2
- package/dist/theme/derive-colors.d.cts +1 -1
- package/dist/theme/derive-colors.d.ts +1 -1
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.js +1 -1
- package/dist/utils/time.d.cts +29 -0
- package/dist/utils/time.d.ts +29 -0
- package/package.json +11 -11
- package/dist/chunk-3MRCSXGT.js +0 -73
- package/dist/chunk-5E6SHYEQ.cjs +0 -631
- package/dist/chunk-6JAGPPZU.cjs +0 -788
- package/dist/chunk-CEPX7CKM.cjs +0 -365
- package/dist/chunk-CHFPFYNV.js +0 -60
- package/dist/chunk-ECR6GPJ6.js +0 -198
- package/dist/chunk-GBTNFQXN.cjs +0 -33
- package/dist/chunk-GZAGWNQM.cjs +0 -719
- package/dist/chunk-ILXKBDC6.cjs +0 -209
- package/dist/chunk-IPD3IUE2.cjs +0 -640
- package/dist/chunk-P2V6PIM7.cjs +0 -478
- package/dist/chunk-Q2BWXT55.cjs +0 -1011
- package/dist/chunk-UFKSUELU.cjs +0 -453
- package/dist/chunk-W4IPOWLY.cjs +0 -198
- package/dist/chunk-YSTLHVQV.cjs +0 -73
- package/dist/components/time-field/index.cjs +0 -27
- package/dist/components/time-field/index.d.cts +0 -52
- package/dist/components/time-field/index.d.ts +0 -52
- package/dist/components/time-field/index.js +0 -27
- package/dist/components/time-field/time-field-field.d.cts +0 -11
- package/dist/components/time-field/time-field-field.d.ts +0 -11
- package/dist/components/time-field/time-field-period.d.cts +0 -34
- package/dist/components/time-field/time-field-period.d.ts +0 -34
- package/dist/components/time-field/time-field.context.d.cts +0 -9
- package/dist/components/time-field/time-field.context.d.ts +0 -9
- package/dist/components/time-field/time-field.d.cts +0 -56
- package/dist/components/time-field/time-field.d.ts +0 -56
- package/dist/components/time-field/time-field.type.d.cts +0 -72
- package/dist/components/time-field/time-field.type.d.ts +0 -72
- package/dist/utils/time-mask.d.cts +0 -68
- package/dist/utils/time-mask.d.ts +0 -68
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SlideButton,
|
|
3
|
+
SlideButtonFill,
|
|
4
|
+
SlideButtonIcon,
|
|
5
|
+
SlideButtonLabel,
|
|
6
|
+
SlideButtonRoot,
|
|
7
|
+
SlideButtonThumb,
|
|
8
|
+
slideButtonRecipe,
|
|
9
|
+
useSlideButton
|
|
10
|
+
} from "../../chunk-SVS726BW.js";
|
|
11
|
+
import "../../chunk-F6W3JQ7K.js";
|
|
12
|
+
import "../../chunk-JN6IRT2M.js";
|
|
13
|
+
import "../../chunk-WFZDAXDI.js";
|
|
14
|
+
import "../../chunk-DKVXTMIJ.js";
|
|
15
|
+
import "../../chunk-3Q42X6EQ.js";
|
|
16
|
+
import "../../chunk-TTZOIXKE.js";
|
|
17
|
+
import "../../chunk-36PRYGAM.js";
|
|
18
|
+
import "../../chunk-EGLLDKN6.js";
|
|
19
|
+
import "../../chunk-Z6JBWRPL.js";
|
|
20
|
+
import "../../chunk-M63GFNKV.js";
|
|
21
|
+
export {
|
|
22
|
+
SlideButton,
|
|
23
|
+
SlideButtonFill,
|
|
24
|
+
SlideButtonIcon,
|
|
25
|
+
SlideButtonLabel,
|
|
26
|
+
SlideButtonRoot,
|
|
27
|
+
SlideButtonThumb,
|
|
28
|
+
slideButtonRecipe,
|
|
29
|
+
useSlideButton
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The trail behind the handle — how far the slide has come, not a state.
|
|
4
|
+
*
|
|
5
|
+
* Optional: compose it for the affordance, leave it out for a bare pill.
|
|
6
|
+
*
|
|
7
|
+
* **Its width is the fraction of the travel the handle has covered, laid over the whole
|
|
8
|
+
* pill — not the handle's raw offset.** The two agree at rest, where both are nothing.
|
|
9
|
+
* They part at the end, and that is the point: the handle comes to rest a handle's width
|
|
10
|
+
* short of the trailing cap, because that is where the handle physically *is*, and a trail
|
|
11
|
+
* that stopped with it left a confirmed slide showing sixty-odd points of unswept pill —
|
|
12
|
+
* reading as almost done at the moment it is done. Spread over the pill, the trail lands
|
|
13
|
+
* full.
|
|
14
|
+
*
|
|
15
|
+
* In between, the trail's leading edge sits under the handle for all but the first and last
|
|
16
|
+
* few points of the drag, so there is no seam to see while the finger is down.
|
|
17
|
+
*
|
|
18
|
+
* It is drawn inside a window cut to the pill's shape, because its own corner cannot be:
|
|
19
|
+
* `radius.full` is clamped to half the shorter side, so while the trail is narrower than
|
|
20
|
+
* the pill is tall it draws a squarer corner than the pill's and shows outside it. The
|
|
21
|
+
* window is here rather than on the root so that the cut lands on the trail alone and not
|
|
22
|
+
* on the handle's shadow.
|
|
23
|
+
*
|
|
24
|
+
* Driven on the UI thread; a spring here would let the trail and the handle come apart
|
|
25
|
+
* under the finger.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SlideButtonFill: import("react").ForwardRefExoticComponent<{
|
|
28
|
+
children?: never;
|
|
29
|
+
} & Omit<import("react-native").ViewProps, "children"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The trail behind the handle — how far the slide has come, not a state.
|
|
4
|
+
*
|
|
5
|
+
* Optional: compose it for the affordance, leave it out for a bare pill.
|
|
6
|
+
*
|
|
7
|
+
* **Its width is the fraction of the travel the handle has covered, laid over the whole
|
|
8
|
+
* pill — not the handle's raw offset.** The two agree at rest, where both are nothing.
|
|
9
|
+
* They part at the end, and that is the point: the handle comes to rest a handle's width
|
|
10
|
+
* short of the trailing cap, because that is where the handle physically *is*, and a trail
|
|
11
|
+
* that stopped with it left a confirmed slide showing sixty-odd points of unswept pill —
|
|
12
|
+
* reading as almost done at the moment it is done. Spread over the pill, the trail lands
|
|
13
|
+
* full.
|
|
14
|
+
*
|
|
15
|
+
* In between, the trail's leading edge sits under the handle for all but the first and last
|
|
16
|
+
* few points of the drag, so there is no seam to see while the finger is down.
|
|
17
|
+
*
|
|
18
|
+
* It is drawn inside a window cut to the pill's shape, because its own corner cannot be:
|
|
19
|
+
* `radius.full` is clamped to half the shorter side, so while the trail is narrower than
|
|
20
|
+
* the pill is tall it draws a squarer corner than the pill's and shows outside it. The
|
|
21
|
+
* window is here rather than on the root so that the cut lands on the trail alone and not
|
|
22
|
+
* on the handle's shadow.
|
|
23
|
+
*
|
|
24
|
+
* Driven on the UI thread; a spring here would let the trail and the handle come apart
|
|
25
|
+
* under the finger.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SlideButtonFill: import("react").ForwardRefExoticComponent<{
|
|
28
|
+
children?: never;
|
|
29
|
+
} & Omit<import("react-native").ViewProps, "children"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SlideButtonIconProps } from './slide-button.type';
|
|
2
|
+
/**
|
|
3
|
+
* The mark in the thumb. Written inside `SlideButton.Thumb`, it inherits the handle's glyph
|
|
4
|
+
* size and — because the handle is the surface colour whatever the pill does — the theme's
|
|
5
|
+
* foreground. `size` and `color` override both.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SlideButtonIcon({ size, color, ...rest }: SlideButtonIconProps): import("react").JSX.Element;
|
|
8
|
+
export declare namespace SlideButtonIcon {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SlideButtonIconProps } from './slide-button.type';
|
|
2
|
+
/**
|
|
3
|
+
* The mark in the thumb. Written inside `SlideButton.Thumb`, it inherits the handle's glyph
|
|
4
|
+
* size and — because the handle is the surface colour whatever the pill does — the theme's
|
|
5
|
+
* foreground. `size` and `color` override both.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SlideButtonIcon({ size, color, ...rest }: SlideButtonIconProps): import("react").JSX.Element;
|
|
8
|
+
export declare namespace SlideButtonIcon {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Text } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The instruction, centred across the whole pill. The thumb slides over it rather than
|
|
4
|
+
* beside it — there is no gap to keep, because they are not laid out together.
|
|
5
|
+
*
|
|
6
|
+
* **It is drawn twice.** On the four intent variants the pill sweeps from its soft slice
|
|
7
|
+
* to the vivid one, and no single text colour survives that: painted for the soft pill a
|
|
8
|
+
* label reads about 1.3:1 against the vivid trail, painted for the trail it is invisible
|
|
9
|
+
* at rest. So the second copy is painted for the swept ground and clipped to exactly the
|
|
10
|
+
* trail's width — a word the trail is halfway through is dark on the half that is still
|
|
11
|
+
* soft and light on the half that is not. Where a variant names no `fgSelected` both
|
|
12
|
+
* copies resolve to the same colour and the second one costs a `Text` that changes
|
|
13
|
+
* nothing.
|
|
14
|
+
*
|
|
15
|
+
* The clip's width is driven on the UI thread off the same shared offset the trail reads,
|
|
16
|
+
* so the two edges are the same edge and never separate under the finger.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SlideButtonLabel: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
} & import("react").RefAttributes<Text>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Text } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The instruction, centred across the whole pill. The thumb slides over it rather than
|
|
4
|
+
* beside it — there is no gap to keep, because they are not laid out together.
|
|
5
|
+
*
|
|
6
|
+
* **It is drawn twice.** On the four intent variants the pill sweeps from its soft slice
|
|
7
|
+
* to the vivid one, and no single text colour survives that: painted for the soft pill a
|
|
8
|
+
* label reads about 1.3:1 against the vivid trail, painted for the trail it is invisible
|
|
9
|
+
* at rest. So the second copy is painted for the swept ground and clipped to exactly the
|
|
10
|
+
* trail's width — a word the trail is halfway through is dark on the half that is still
|
|
11
|
+
* soft and light on the half that is not. Where a variant names no `fgSelected` both
|
|
12
|
+
* copies resolve to the same colour and the second one costs a `Text` that changes
|
|
13
|
+
* nothing.
|
|
14
|
+
*
|
|
15
|
+
* The clip's width is driven on the UI thread off the same shared offset the trail reads,
|
|
16
|
+
* so the two edges are the same edge and never separate under the finger.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SlideButtonLabel: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
} & import("react").RefAttributes<Text>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SlideButtonThumbProps } from './slide-button.type';
|
|
2
|
+
/**
|
|
3
|
+
* The handle the finger drags.
|
|
4
|
+
*
|
|
5
|
+
* The pan runs on `react-native-gesture-handler`, the same **optional** peer the `Slider`
|
|
6
|
+
* reaches for and imported here and nowhere else — an app that never touches
|
|
7
|
+
* `@xaui/native/slide-button` does not pay for it.
|
|
8
|
+
*
|
|
9
|
+
* Everything the finger does stays on the UI thread: the offset is a shared value the pan
|
|
10
|
+
* writes and the fill and the handle both read. The one hop to JS is `runOnJS` on release,
|
|
11
|
+
* once, when the slide has reached the threshold — the confirm is React state and a
|
|
12
|
+
* callback, and neither belongs on the worklet.
|
|
13
|
+
*
|
|
14
|
+
* With no children it draws the built-in chevron, mirrored under RTL so it always points
|
|
15
|
+
* the way the handle travels. Pass an `Icon` — or anything — to replace it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SlideButtonThumb({ children, style, ...props }: SlideButtonThumbProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace SlideButtonThumb {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SlideButtonThumbProps } from './slide-button.type';
|
|
2
|
+
/**
|
|
3
|
+
* The handle the finger drags.
|
|
4
|
+
*
|
|
5
|
+
* The pan runs on `react-native-gesture-handler`, the same **optional** peer the `Slider`
|
|
6
|
+
* reaches for and imported here and nowhere else — an app that never touches
|
|
7
|
+
* `@xaui/native/slide-button` does not pay for it.
|
|
8
|
+
*
|
|
9
|
+
* Everything the finger does stays on the UI thread: the offset is a shared value the pan
|
|
10
|
+
* writes and the fill and the handle both read. The one hop to JS is `runOnJS` on release,
|
|
11
|
+
* once, when the slide has reached the threshold — the confirm is React state and a
|
|
12
|
+
* callback, and neither belongs on the worklet.
|
|
13
|
+
*
|
|
14
|
+
* With no children it draws the built-in chevron, mirrored under RTL so it always points
|
|
15
|
+
* the way the handle travels. Pass an `Icon` — or anything — to replace it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SlideButtonThumb({ children, style, ...props }: SlideButtonThumbProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace SlideButtonThumb {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thumb's motion.
|
|
3
|
+
*
|
|
4
|
+
* It grows a little under the finger, the only confirmation the control can give that the
|
|
5
|
+
* drag has taken — the finger is already over the handle, so the scale is what shows in the
|
|
6
|
+
* ring of pill around it. The `Slider`'s knob does the same.
|
|
7
|
+
*/
|
|
8
|
+
export declare const THUMB_PRESSED_SCALE = 1.06;
|
|
9
|
+
/**
|
|
10
|
+
* How the thumb settles when the finger lifts — springing home if the slide fell short,
|
|
11
|
+
* or on to the end if it did not. Stiff and well damped: a confirmation arrives, it does
|
|
12
|
+
* not wobble.
|
|
13
|
+
*/
|
|
14
|
+
export declare const THUMB_SPRING: {
|
|
15
|
+
readonly damping: 20;
|
|
16
|
+
readonly stiffness: 260;
|
|
17
|
+
readonly mass: 0.7;
|
|
18
|
+
};
|
|
19
|
+
/** How far along the track the thumb must reach for the slide to count, from 0 to 1. */
|
|
20
|
+
export declare const DEFAULT_THRESHOLD = 0.9;
|
|
21
|
+
/**
|
|
22
|
+
* How much of the pill the slide has swept, in points — the trail's width, and the width
|
|
23
|
+
* of the clip the swept label is read through.
|
|
24
|
+
*
|
|
25
|
+
* It is the fraction of the travel laid over the **whole** pill rather than the handle's
|
|
26
|
+
* raw offset, because the handle stops a handle's width short of the trailing cap and a
|
|
27
|
+
* trail that stopped with it would leave a confirmed slide showing unswept pill.
|
|
28
|
+
*
|
|
29
|
+
* The two callers have to agree to the point: the trail paints the swept ground and the
|
|
30
|
+
* clip decides which half of a straddling word is painted for it. Two expressions of the
|
|
31
|
+
* same edge would eventually drift, so there is one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sweptWidth(offset: number, travel: number, trackLength: number): number;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thumb's motion.
|
|
3
|
+
*
|
|
4
|
+
* It grows a little under the finger, the only confirmation the control can give that the
|
|
5
|
+
* drag has taken — the finger is already over the handle, so the scale is what shows in the
|
|
6
|
+
* ring of pill around it. The `Slider`'s knob does the same.
|
|
7
|
+
*/
|
|
8
|
+
export declare const THUMB_PRESSED_SCALE = 1.06;
|
|
9
|
+
/**
|
|
10
|
+
* How the thumb settles when the finger lifts — springing home if the slide fell short,
|
|
11
|
+
* or on to the end if it did not. Stiff and well damped: a confirmation arrives, it does
|
|
12
|
+
* not wobble.
|
|
13
|
+
*/
|
|
14
|
+
export declare const THUMB_SPRING: {
|
|
15
|
+
readonly damping: 20;
|
|
16
|
+
readonly stiffness: 260;
|
|
17
|
+
readonly mass: 0.7;
|
|
18
|
+
};
|
|
19
|
+
/** How far along the track the thumb must reach for the slide to count, from 0 to 1. */
|
|
20
|
+
export declare const DEFAULT_THRESHOLD = 0.9;
|
|
21
|
+
/**
|
|
22
|
+
* How much of the pill the slide has swept, in points — the trail's width, and the width
|
|
23
|
+
* of the clip the swept label is read through.
|
|
24
|
+
*
|
|
25
|
+
* It is the fraction of the travel laid over the **whole** pill rather than the handle's
|
|
26
|
+
* raw offset, because the handle stops a handle's width short of the trailing cap and a
|
|
27
|
+
* trail that stopped with it would leave a confirmed slide showing unswept pill.
|
|
28
|
+
*
|
|
29
|
+
* The two callers have to agree to the point: the trail paints the swept ground and the
|
|
30
|
+
* clip decides which half of a straddling word is painted for it. Two expressions of the
|
|
31
|
+
* same edge would eventually drift, so there is one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sweptWidth(offset: number, travel: number, trackLength: number): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SlideButtonContextValue } from './slide-button.type';
|
|
2
|
+
/**
|
|
3
|
+
* R10 — `useSlideButton` is exported so a third party can write its own slot (a second
|
|
4
|
+
* mark, a progress readout) against the same resolved styles and the same shared offset
|
|
5
|
+
* the built-in ones read. Outside a `<SlideButton>` it throws by name.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SlideButtonProvider: import("react").Provider<SlideButtonContextValue | null>, useSlideButton: () => SlideButtonContextValue;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SlideButtonContextValue } from './slide-button.type';
|
|
2
|
+
/**
|
|
3
|
+
* R10 — `useSlideButton` is exported so a third party can write its own slot (a second
|
|
4
|
+
* mark, a progress readout) against the same resolved styles and the same shared offset
|
|
5
|
+
* the built-in ones read. Outside a `<SlideButton>` it throws by name.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SlideButtonProvider: import("react").Provider<SlideButtonContextValue | null>, useSlideButton: () => SlideButtonContextValue;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A button you drag rather than tap, for the action that should not happen by accident:
|
|
5
|
+
* slide the thumb to the far end and it fires once. Below the threshold it springs home.
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <SlideButton onConfirm={unlock}>Slide to confirm</SlideButton>
|
|
9
|
+
*
|
|
10
|
+
* <SlideButton variant="danger" onConfirm={wipe}>
|
|
11
|
+
* <SlideButton.Fill />
|
|
12
|
+
* <SlideButton.Label>Slide to delete</SlideButton.Label>
|
|
13
|
+
* <SlideButton.Thumb>
|
|
14
|
+
* <SlideButton.Icon as={TrashIcon} />
|
|
15
|
+
* </SlideButton.Thumb>
|
|
16
|
+
* </SlideButton>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* **It is the `Slider`'s gesture without the value.** The thumb runs the same pan on the
|
|
20
|
+
* same optional `react-native-gesture-handler` peer, the track measures its own length
|
|
21
|
+
* the same way, and the travel is inset by the thumb at each end for the same reason —
|
|
22
|
+
* but there is no `min`, `max` or `step`, because the only positions that mean anything
|
|
23
|
+
* are "not yet" and "done".
|
|
24
|
+
*
|
|
25
|
+
* **Once confirmed it stays confirmed.** Uncontrolled, a slide is a one-shot. Pass
|
|
26
|
+
* `isConfirmed` to drive it — set it back to `false` and the thumb springs home, re-armed.
|
|
27
|
+
*
|
|
28
|
+
* **A bare string is the whole component.** `<SlideButton>Slide</SlideButton>` composes
|
|
29
|
+
* the fill, the label and the thumb for you; write the slots out to put a mark in the
|
|
30
|
+
* thumb or leave the fill off.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SlideButtonRoot: import("react").ForwardRefExoticComponent<{
|
|
33
|
+
children?: import("react").ReactNode;
|
|
34
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
35
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
36
|
+
radius?: import("../..").RadiusKey;
|
|
37
|
+
color?: string;
|
|
38
|
+
threshold?: number;
|
|
39
|
+
isConfirmed?: boolean;
|
|
40
|
+
defaultConfirmed?: boolean;
|
|
41
|
+
onConfirm?: () => void;
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
44
|
+
} & Omit<import("react-native").ViewProps, keyof {
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
47
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
48
|
+
radius?: import("../..").RadiusKey;
|
|
49
|
+
color?: string;
|
|
50
|
+
threshold?: number;
|
|
51
|
+
isConfirmed?: boolean;
|
|
52
|
+
defaultConfirmed?: boolean;
|
|
53
|
+
onConfirm?: () => void;
|
|
54
|
+
isDisabled?: boolean;
|
|
55
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
56
|
+
}> & Omit<import("../..").ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "threshold" | "isConfirmed" | "defaultConfirmed" | "onConfirm"> & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A button you drag rather than tap, for the action that should not happen by accident:
|
|
5
|
+
* slide the thumb to the far end and it fires once. Below the threshold it springs home.
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <SlideButton onConfirm={unlock}>Slide to confirm</SlideButton>
|
|
9
|
+
*
|
|
10
|
+
* <SlideButton variant="danger" onConfirm={wipe}>
|
|
11
|
+
* <SlideButton.Fill />
|
|
12
|
+
* <SlideButton.Label>Slide to delete</SlideButton.Label>
|
|
13
|
+
* <SlideButton.Thumb>
|
|
14
|
+
* <SlideButton.Icon as={TrashIcon} />
|
|
15
|
+
* </SlideButton.Thumb>
|
|
16
|
+
* </SlideButton>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* **It is the `Slider`'s gesture without the value.** The thumb runs the same pan on the
|
|
20
|
+
* same optional `react-native-gesture-handler` peer, the track measures its own length
|
|
21
|
+
* the same way, and the travel is inset by the thumb at each end for the same reason —
|
|
22
|
+
* but there is no `min`, `max` or `step`, because the only positions that mean anything
|
|
23
|
+
* are "not yet" and "done".
|
|
24
|
+
*
|
|
25
|
+
* **Once confirmed it stays confirmed.** Uncontrolled, a slide is a one-shot. Pass
|
|
26
|
+
* `isConfirmed` to drive it — set it back to `false` and the thumb springs home, re-armed.
|
|
27
|
+
*
|
|
28
|
+
* **A bare string is the whole component.** `<SlideButton>Slide</SlideButton>` composes
|
|
29
|
+
* the fill, the label and the thumb for you; write the slots out to put a mark in the
|
|
30
|
+
* thumb or leave the fill off.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SlideButtonRoot: import("react").ForwardRefExoticComponent<{
|
|
33
|
+
children?: import("react").ReactNode;
|
|
34
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
35
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
36
|
+
radius?: import("../..").RadiusKey;
|
|
37
|
+
color?: string;
|
|
38
|
+
threshold?: number;
|
|
39
|
+
isConfirmed?: boolean;
|
|
40
|
+
defaultConfirmed?: boolean;
|
|
41
|
+
onConfirm?: () => void;
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
44
|
+
} & Omit<import("react-native").ViewProps, keyof {
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
47
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
48
|
+
radius?: import("../..").RadiusKey;
|
|
49
|
+
color?: string;
|
|
50
|
+
threshold?: number;
|
|
51
|
+
isConfirmed?: boolean;
|
|
52
|
+
defaultConfirmed?: boolean;
|
|
53
|
+
onConfirm?: () => void;
|
|
54
|
+
isDisabled?: boolean;
|
|
55
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
56
|
+
}> & Omit<import("../..").ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "threshold" | "isConfirmed" | "defaultConfirmed" | "onConfirm"> & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SlotStyles } from '../../system/recipe';
|
|
2
|
+
import type { XAUITheme } from '../../theme/theme.type';
|
|
3
|
+
import type { SlideButtonSize, SlideButtonSlot, SlideButtonVariant } from './slide-button.type';
|
|
4
|
+
type SizeStep = {
|
|
5
|
+
/** The control-height key. The handle's height is that less twice the inset. */
|
|
6
|
+
height: SlideButtonSize;
|
|
7
|
+
/** How far the handle sits in from the pill's edge, in points. The air around it. */
|
|
8
|
+
inset: number;
|
|
9
|
+
/**
|
|
10
|
+
* The mark's box, in points — the side of the built-in chevron, and the size an `Icon`
|
|
11
|
+
* in the handle inherits. Off the spacing grid: it is a drawn mark, not a gap.
|
|
12
|
+
*/
|
|
13
|
+
glyph: number;
|
|
14
|
+
/** The label's type key. */
|
|
15
|
+
label: SlideButtonSize;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The three sizes, measured rather than scaled off one number: a slide button is a target
|
|
19
|
+
* before it is type, so the height leads and the rest follows it.
|
|
20
|
+
*/
|
|
21
|
+
declare const SIZES: Record<SlideButtonSize, SizeStep>;
|
|
22
|
+
export declare const slideButtonRecipe: import("../..").Recipe<"label" | "fill" | "root" | "glyph" | "thumb" | "fillClip" | "labelSwept", SlideButtonVariant, {
|
|
23
|
+
readonly size: {
|
|
24
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
25
|
+
readonly md: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
26
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
27
|
+
};
|
|
28
|
+
/** After `size`, so a caller's `radius` wins over the pill's `full`. */
|
|
29
|
+
readonly radius: Record<import("../..").RadiusKey, import("../..").StyleFn<"fill" | "root" | "fillClip">>;
|
|
30
|
+
}>;
|
|
31
|
+
export { SIZES as slideButtonSizes };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SlotStyles } from '../../system/recipe';
|
|
2
|
+
import type { XAUITheme } from '../../theme/theme.type';
|
|
3
|
+
import type { SlideButtonSize, SlideButtonSlot, SlideButtonVariant } from './slide-button.type';
|
|
4
|
+
type SizeStep = {
|
|
5
|
+
/** The control-height key. The handle's height is that less twice the inset. */
|
|
6
|
+
height: SlideButtonSize;
|
|
7
|
+
/** How far the handle sits in from the pill's edge, in points. The air around it. */
|
|
8
|
+
inset: number;
|
|
9
|
+
/**
|
|
10
|
+
* The mark's box, in points — the side of the built-in chevron, and the size an `Icon`
|
|
11
|
+
* in the handle inherits. Off the spacing grid: it is a drawn mark, not a gap.
|
|
12
|
+
*/
|
|
13
|
+
glyph: number;
|
|
14
|
+
/** The label's type key. */
|
|
15
|
+
label: SlideButtonSize;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The three sizes, measured rather than scaled off one number: a slide button is a target
|
|
19
|
+
* before it is type, so the height leads and the rest follows it.
|
|
20
|
+
*/
|
|
21
|
+
declare const SIZES: Record<SlideButtonSize, SizeStep>;
|
|
22
|
+
export declare const slideButtonRecipe: import("../..").Recipe<"label" | "fill" | "root" | "glyph" | "thumb" | "fillClip" | "labelSwept", SlideButtonVariant, {
|
|
23
|
+
readonly size: {
|
|
24
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
25
|
+
readonly md: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
26
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
27
|
+
};
|
|
28
|
+
/** After `size`, so a caller's `radius` wins over the pill's `full`. */
|
|
29
|
+
readonly radius: Record<import("../..").RadiusKey, import("../..").StyleFn<"fill" | "root" | "fillClip">>;
|
|
30
|
+
}>;
|
|
31
|
+
export { SIZES as slideButtonSizes };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { IconContextValue, IconProps } from '../../system/icon';
|
|
5
|
+
import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
|
|
6
|
+
import type { RadiusKey } from '../../theme/theme.type';
|
|
7
|
+
export type SlideButtonSlot = 'root' | 'fillClip' | 'fill' | 'label' | 'labelSwept' | 'thumb' | 'glyph';
|
|
8
|
+
/**
|
|
9
|
+
* The flat variant union, the same ten values every control in the library takes. A
|
|
10
|
+
* slide-to-confirm is still a button — a slide-to-delete is a real `danger` use — so the
|
|
11
|
+
* intents stay.
|
|
12
|
+
*/
|
|
13
|
+
export type SlideButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
|
|
14
|
+
export type SlideButtonSize = 'sm' | 'md' | 'lg';
|
|
15
|
+
type SlideButtonOwnProps = {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
variant?: SlideButtonVariant;
|
|
18
|
+
/** Height, horizontal padding and the label's type. Never a width. */
|
|
19
|
+
size?: SlideButtonSize;
|
|
20
|
+
/** Overrides the pill's corner. `full` unless you say otherwise. */
|
|
21
|
+
radius?: RadiusKey;
|
|
22
|
+
/** A raw tint (R7). Lands on the pill, or on the label for `ghost` — never on the thumb. */
|
|
23
|
+
color?: string;
|
|
24
|
+
/**
|
|
25
|
+
* How far along the track the thumb has to reach for the slide to count, from 0 to 1.
|
|
26
|
+
* Below it the thumb springs home on release.
|
|
27
|
+
* @default 0.9
|
|
28
|
+
*/
|
|
29
|
+
threshold?: number;
|
|
30
|
+
/** Controlled: `true` pins the thumb at the end, `false` springs it home. */
|
|
31
|
+
isConfirmed?: boolean;
|
|
32
|
+
/** The starting state when uncontrolled. Once confirmed it stays confirmed. @default false */
|
|
33
|
+
defaultConfirmed?: boolean;
|
|
34
|
+
/** Fires once, when the thumb reaches `threshold` — the action the slide guards. */
|
|
35
|
+
onConfirm?: () => void;
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
};
|
|
39
|
+
export type SlideButtonProps = SlideButtonOwnProps & Omit<ViewProps, keyof SlideButtonOwnProps> & Omit<ViewStyleProps, keyof SlideButtonOwnProps | keyof ViewProps>;
|
|
40
|
+
type SlideButtonFillOwnProps = {
|
|
41
|
+
children?: never;
|
|
42
|
+
};
|
|
43
|
+
export type SlideButtonFillProps = SlideButtonFillOwnProps & Omit<ViewProps, 'children'> & Omit<ViewStyleProps, keyof ViewProps>;
|
|
44
|
+
export type SlideButtonLabelProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
type SlideButtonThumbOwnProps = {
|
|
48
|
+
/** Replaces the built-in chevron — an `Icon`, or anything else. */
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
};
|
|
51
|
+
export type SlideButtonThumbProps = SlideButtonThumbOwnProps & Omit<ViewProps, keyof SlideButtonThumbOwnProps> & Omit<ViewStyleProps, keyof SlideButtonThumbOwnProps | keyof ViewProps>;
|
|
52
|
+
export type SlideButtonIconProps = IconProps;
|
|
53
|
+
/** R5 — resolved style ids and the shared progress the animated slots read. */
|
|
54
|
+
export type SlideButtonContextValue = {
|
|
55
|
+
/** The window the trail is cut to — the pill's shape, so the cut stays off the handle. */
|
|
56
|
+
fillClipStyle: StyleProp<ViewStyle>;
|
|
57
|
+
fillStyle: StyleProp<ViewStyle>;
|
|
58
|
+
labelStyle: StyleProp<TextStyle>;
|
|
59
|
+
/** The label's swept copy, already carrying the width the clip must not re-centre it in. */
|
|
60
|
+
labelSweptStyle: StyleProp<TextStyle>;
|
|
61
|
+
thumbStyle: StyleProp<ViewStyle>;
|
|
62
|
+
glyphStyle: StyleProp<ViewStyle>;
|
|
63
|
+
icon: IconContextValue;
|
|
64
|
+
/** The handle's offset from the leading edge, in points, driven on the UI thread. */
|
|
65
|
+
offset: SharedValue<number>;
|
|
66
|
+
/** How far the handle can travel — the track's length less the handle and its insets. */
|
|
67
|
+
travel: number;
|
|
68
|
+
/** The handle's width, the amount the travel is shortened by. */
|
|
69
|
+
thumbSize: number;
|
|
70
|
+
/** The fraction of `travel` the thumb must reach for the slide to count, from 0 to 1. */
|
|
71
|
+
threshold: number;
|
|
72
|
+
isDisabled: boolean;
|
|
73
|
+
isConfirmed: boolean;
|
|
74
|
+
/** Called from the pan on release once the thumb has reached `threshold`. */
|
|
75
|
+
confirm: () => void;
|
|
76
|
+
/** The pill's measured width. Zero until it has been laid out. */
|
|
77
|
+
trackLength: number;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { IconContextValue, IconProps } from '../../system/icon';
|
|
5
|
+
import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
|
|
6
|
+
import type { RadiusKey } from '../../theme/theme.type';
|
|
7
|
+
export type SlideButtonSlot = 'root' | 'fillClip' | 'fill' | 'label' | 'labelSwept' | 'thumb' | 'glyph';
|
|
8
|
+
/**
|
|
9
|
+
* The flat variant union, the same ten values every control in the library takes. A
|
|
10
|
+
* slide-to-confirm is still a button — a slide-to-delete is a real `danger` use — so the
|
|
11
|
+
* intents stay.
|
|
12
|
+
*/
|
|
13
|
+
export type SlideButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
|
|
14
|
+
export type SlideButtonSize = 'sm' | 'md' | 'lg';
|
|
15
|
+
type SlideButtonOwnProps = {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
variant?: SlideButtonVariant;
|
|
18
|
+
/** Height, horizontal padding and the label's type. Never a width. */
|
|
19
|
+
size?: SlideButtonSize;
|
|
20
|
+
/** Overrides the pill's corner. `full` unless you say otherwise. */
|
|
21
|
+
radius?: RadiusKey;
|
|
22
|
+
/** A raw tint (R7). Lands on the pill, or on the label for `ghost` — never on the thumb. */
|
|
23
|
+
color?: string;
|
|
24
|
+
/**
|
|
25
|
+
* How far along the track the thumb has to reach for the slide to count, from 0 to 1.
|
|
26
|
+
* Below it the thumb springs home on release.
|
|
27
|
+
* @default 0.9
|
|
28
|
+
*/
|
|
29
|
+
threshold?: number;
|
|
30
|
+
/** Controlled: `true` pins the thumb at the end, `false` springs it home. */
|
|
31
|
+
isConfirmed?: boolean;
|
|
32
|
+
/** The starting state when uncontrolled. Once confirmed it stays confirmed. @default false */
|
|
33
|
+
defaultConfirmed?: boolean;
|
|
34
|
+
/** Fires once, when the thumb reaches `threshold` — the action the slide guards. */
|
|
35
|
+
onConfirm?: () => void;
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
};
|
|
39
|
+
export type SlideButtonProps = SlideButtonOwnProps & Omit<ViewProps, keyof SlideButtonOwnProps> & Omit<ViewStyleProps, keyof SlideButtonOwnProps | keyof ViewProps>;
|
|
40
|
+
type SlideButtonFillOwnProps = {
|
|
41
|
+
children?: never;
|
|
42
|
+
};
|
|
43
|
+
export type SlideButtonFillProps = SlideButtonFillOwnProps & Omit<ViewProps, 'children'> & Omit<ViewStyleProps, keyof ViewProps>;
|
|
44
|
+
export type SlideButtonLabelProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
type SlideButtonThumbOwnProps = {
|
|
48
|
+
/** Replaces the built-in chevron — an `Icon`, or anything else. */
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
};
|
|
51
|
+
export type SlideButtonThumbProps = SlideButtonThumbOwnProps & Omit<ViewProps, keyof SlideButtonThumbOwnProps> & Omit<ViewStyleProps, keyof SlideButtonThumbOwnProps | keyof ViewProps>;
|
|
52
|
+
export type SlideButtonIconProps = IconProps;
|
|
53
|
+
/** R5 — resolved style ids and the shared progress the animated slots read. */
|
|
54
|
+
export type SlideButtonContextValue = {
|
|
55
|
+
/** The window the trail is cut to — the pill's shape, so the cut stays off the handle. */
|
|
56
|
+
fillClipStyle: StyleProp<ViewStyle>;
|
|
57
|
+
fillStyle: StyleProp<ViewStyle>;
|
|
58
|
+
labelStyle: StyleProp<TextStyle>;
|
|
59
|
+
/** The label's swept copy, already carrying the width the clip must not re-centre it in. */
|
|
60
|
+
labelSweptStyle: StyleProp<TextStyle>;
|
|
61
|
+
thumbStyle: StyleProp<ViewStyle>;
|
|
62
|
+
glyphStyle: StyleProp<ViewStyle>;
|
|
63
|
+
icon: IconContextValue;
|
|
64
|
+
/** The handle's offset from the leading edge, in points, driven on the UI thread. */
|
|
65
|
+
offset: SharedValue<number>;
|
|
66
|
+
/** How far the handle can travel — the track's length less the handle and its insets. */
|
|
67
|
+
travel: number;
|
|
68
|
+
/** The handle's width, the amount the travel is shortened by. */
|
|
69
|
+
thumbSize: number;
|
|
70
|
+
/** The fraction of `travel` the thumb must reach for the slide to count, from 0 to 1. */
|
|
71
|
+
threshold: number;
|
|
72
|
+
isDisabled: boolean;
|
|
73
|
+
isConfirmed: boolean;
|
|
74
|
+
/** Called from the pan on release once the thumb has reached `threshold`. */
|
|
75
|
+
confirm: () => void;
|
|
76
|
+
/** The pill's measured width. Zero until it has been laid out. */
|
|
77
|
+
trackLength: number;
|
|
78
|
+
};
|
|
79
|
+
export {};
|