@xaui/native 0.9.1-alpha.90 → 0.9.1-alpha.92
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-XZ42OWKC.js → chunk-2AFA5HA2.js} +78 -74
- package/dist/{chunk-A2JNZMDJ.cjs → chunk-2B6PUYTP.cjs} +2 -2
- package/dist/chunk-3A5RK2R7.js +40 -0
- package/dist/{chunk-HQLJZ6C2.js → chunk-52XUGOLD.js} +3 -3
- package/dist/{chunk-TCDWDTSW.cjs → chunk-5E6SHYEQ.cjs} +3 -3
- package/dist/{chunk-Y36UGSTS.cjs → chunk-62AYYMZP.cjs} +3 -3
- package/dist/{chunk-BLGAFZRI.cjs → chunk-6GQ7UTJ7.cjs} +2 -2
- package/dist/chunk-6JAGPPZU.cjs +788 -0
- package/dist/{chunk-CVPBNJRG.js → chunk-6RU6GUJP.js} +1 -1
- package/dist/{chunk-XUF7K4WP.js → chunk-7EVW6O2Q.js} +1 -1
- package/dist/chunk-7NQL5DXY.js +302 -0
- package/dist/{chunk-ACWFIZKC.cjs → chunk-AR7667VN.cjs} +6 -6
- package/dist/{chunk-DSCZZZIG.cjs → chunk-B33OU34Z.cjs} +12 -12
- package/dist/{chunk-WGXOYMZM.cjs → chunk-BI5ME4QP.cjs} +5 -5
- package/dist/{chunk-IEEUSJBJ.js → chunk-BJVO7DWJ.js} +1 -1
- package/dist/{chunk-5YEMZL4C.cjs → chunk-CBRW53GN.cjs} +7 -7
- package/dist/{chunk-34UJTR37.cjs → chunk-CBXILKQZ.cjs} +3 -3
- package/dist/{chunk-FB4JF34M.cjs → chunk-CEPX7CKM.cjs} +16 -16
- package/dist/{chunk-377XFATD.cjs → chunk-CYOUOQXT.cjs} +5 -5
- package/dist/{chunk-AUYFPVLA.cjs → chunk-DYQB54JA.cjs} +2 -2
- package/dist/{chunk-3OQPAZTF.js → chunk-EBCAPIBD.js} +44 -44
- package/dist/{chunk-M5LTEKGJ.cjs → chunk-EDNCHCIN.cjs} +2 -2
- package/dist/{chunk-34KILEQD.js → chunk-FOOXBVOQ.js} +15 -15
- package/dist/{chunk-24WXPNIT.js → chunk-FRLWG5LM.js} +24 -24
- package/dist/chunk-FTPPUTWL.cjs +40 -0
- package/dist/{chunk-AAQIBMJI.js → chunk-FVEMTBU4.js} +2 -2
- package/dist/{chunk-54DVPCYB.cjs → chunk-FXN32S75.cjs} +3 -3
- package/dist/chunk-GGP2ERSV.js +487 -0
- package/dist/{chunk-6BB6YWEN.js → chunk-GYEQEF5H.js} +1 -1
- package/dist/{chunk-MTGUUW7F.cjs → chunk-GZAGWNQM.cjs} +3 -3
- package/dist/{chunk-OF3E7WVQ.cjs → chunk-ILXKBDC6.cjs} +10 -10
- package/dist/{chunk-D2UYBAGB.cjs → chunk-IPD3IUE2.cjs} +4 -4
- package/dist/{chunk-XLPOJTA2.cjs → chunk-JBZ7SBRV.cjs} +3 -3
- package/dist/{chunk-UMTVYPYK.js → chunk-JC4YCKKL.js} +15 -15
- package/dist/{chunk-GL46PQPW.js → chunk-JJYHW4PV.js} +1 -1
- package/dist/{chunk-2CTIZGMC.js → chunk-JKDWYNSG.js} +99 -99
- package/dist/chunk-KPKEZWZM.js +517 -0
- package/dist/{chunk-KTI3GCFM.js → chunk-LECYGVIH.js} +43 -43
- package/dist/chunk-LKRQUQZQ.cjs +487 -0
- package/dist/{chunk-SYVFU6O5.cjs → chunk-LPJ3UBSO.cjs} +4 -4
- package/dist/{chunk-RS2UWFEG.js → chunk-MMFIMQMQ.js} +2 -2
- package/dist/chunk-MSORLKO7.cjs +422 -0
- package/dist/{chunk-PKVKFZW7.js → chunk-O6B72H4B.js} +5 -5
- package/dist/{chunk-7KQG4JQ2.js → chunk-OD6H7ANY.js} +1 -1
- package/dist/{chunk-UXPBSREP.js → chunk-ODQHAPQW.js} +17 -17
- package/dist/{chunk-TB7V2DO3.cjs → chunk-ORXVXYKC.cjs} +11 -11
- package/dist/{chunk-PIU3JONR.cjs → chunk-OW4N2C3M.cjs} +64 -60
- package/dist/{chunk-NPY7I7JJ.js → chunk-P2CJNTAP.js} +15 -15
- package/dist/{chunk-AOXNVM55.cjs → chunk-P2V6PIM7.cjs} +2 -2
- package/dist/{chunk-CKADVFCH.js → chunk-P5M5URAB.js} +30 -127
- package/dist/{chunk-BPQWLUQU.js → chunk-P7OHZCU3.js} +2 -2
- package/dist/{chunk-DPW25YCM.cjs → chunk-PAQD6UUF.cjs} +3 -3
- package/dist/{chunk-LDFBDFIW.js → chunk-PAQZOD2L.js} +1 -1
- package/dist/{chunk-4TG2OLEM.cjs → chunk-PDSR42YC.cjs} +3 -3
- package/dist/{chunk-AXSY2KPT.cjs → chunk-PROLOLZ5.cjs} +2 -2
- package/dist/{chunk-4SPCZVR6.cjs → chunk-PYQ2P3M5.cjs} +58 -58
- package/dist/{chunk-ZZTUJELK.cjs → chunk-Q2BWXT55.cjs} +9 -9
- package/dist/{chunk-RD3ZUUBC.cjs → chunk-QCH7X7O2.cjs} +14 -14
- package/dist/{chunk-ZYN7XKF5.cjs → chunk-QELEKXN3.cjs} +5 -5
- package/dist/{chunk-ZN5P3VTI.js → chunk-QHXTO525.js} +1 -1
- package/dist/{chunk-EVSQ4CEI.cjs → chunk-QN2D5ZCS.cjs} +3 -3
- package/dist/{chunk-4XZWVJZL.cjs → chunk-QUSQEYLP.cjs} +25 -25
- package/dist/chunk-RCSEVEIR.js +422 -0
- package/dist/{chunk-GOKUBJIK.js → chunk-RLC3EXMV.js} +2 -2
- package/dist/{chunk-BLYKQD47.cjs → chunk-RREJUSAS.cjs} +3 -3
- package/dist/{chunk-BLDMKFIG.js → chunk-RSIWSVXI.js} +1 -1
- package/dist/{chunk-5VYB7F3H.js → chunk-RXEUKYM5.js} +1 -1
- package/dist/{chunk-WRW4JBB4.js → chunk-SUJLTC2K.js} +4 -4
- package/dist/{chunk-KBQT6MZ4.js → chunk-TCWW7JI2.js} +58 -58
- package/dist/{chunk-B2KUGQS5.js → chunk-TPYOQSKT.js} +1 -1
- package/dist/{chunk-SEYZGC4E.js → chunk-TRWZEOCO.js} +2 -2
- package/dist/{chunk-SDLDRTT7.cjs → chunk-UEW3GAP5.cjs} +5 -5
- package/dist/{chunk-WQZJ26SX.cjs → chunk-UFKSUELU.cjs} +2 -2
- package/dist/chunk-UR37LVPU.cjs +382 -0
- package/dist/{chunk-4BAKKBHJ.js → chunk-USIWPESU.js} +1 -1
- package/dist/{chunk-HM6M6SIP.js → chunk-UYQLW7OD.js} +1 -1
- package/dist/{chunk-NIEIDK5Z.js → chunk-V2CEKPJ6.js} +4 -4
- package/dist/{chunk-GPSVJ75L.js → chunk-VMPCXS4S.js} +15 -15
- package/dist/{chunk-W6TFYAEF.js → chunk-VQGNLX5C.js} +1 -1
- package/dist/{chunk-YSZ4K6L6.cjs → chunk-WIX4SYZI.cjs} +2 -2
- package/dist/{chunk-T3WEEHSB.js → chunk-WRZV6ORJ.js} +1 -1
- package/dist/{chunk-UDVKP3V2.cjs → chunk-X4CZYJZ6.cjs} +12 -12
- package/dist/chunk-XWIPLZTD.cjs +302 -0
- package/dist/{chunk-67WT74DY.cjs → chunk-ZE4IHUUO.cjs} +2 -2
- package/dist/{chunk-4JB7XQCJ.js → chunk-ZKGVOXLQ.js} +1 -1
- package/dist/{chunk-U32IGHJ6.js → chunk-ZWS3FQ3J.js} +57 -57
- package/dist/components/accordion/index.cjs +3 -3
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/agenda-calendar/index.cjs +4 -4
- package/dist/components/agenda-calendar/index.js +3 -3
- package/dist/components/alert/index.cjs +4 -4
- package/dist/components/alert/index.js +3 -3
- package/dist/components/autocomplete/index.cjs +3 -3
- package/dist/components/autocomplete/index.js +2 -2
- package/dist/components/bottom-sheet/index.cjs +3 -3
- package/dist/components/bottom-sheet/index.js +2 -2
- package/dist/components/button/button.d.cts +1 -0
- package/dist/components/button/button.d.ts +1 -0
- package/dist/components/button/index.cjs +4 -4
- package/dist/components/button/index.d.cts +1 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +3 -3
- package/dist/components/calendar/index.cjs +3 -3
- package/dist/components/calendar/index.js +2 -2
- package/dist/components/card/card.d.cts +1 -0
- package/dist/components/card/card.d.ts +1 -0
- package/dist/components/card/index.cjs +3 -3
- package/dist/components/card/index.d.cts +1 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +2 -2
- package/dist/components/carousel/index.cjs +4 -3
- package/dist/components/carousel/index.js +3 -2
- package/dist/components/checkbox/checkbox.d.cts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/checkbox/index.cjs +3 -3
- package/dist/components/checkbox/index.d.cts +1 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/chip/chip.d.cts +1 -0
- package/dist/components/chip/chip.d.ts +1 -0
- package/dist/components/chip/index.cjs +4 -4
- package/dist/components/chip/index.d.cts +1 -0
- package/dist/components/chip/index.d.ts +1 -0
- package/dist/components/chip/index.js +3 -3
- package/dist/components/close-button/close-button.d.cts +1 -0
- package/dist/components/close-button/close-button.d.ts +1 -0
- package/dist/components/close-button/index.cjs +4 -4
- package/dist/components/close-button/index.js +3 -3
- package/dist/components/color-picker/color-picker.d.cts +1 -1
- package/dist/components/color-picker/color-picker.d.ts +1 -1
- package/dist/components/color-picker/index.cjs +6 -6
- package/dist/components/color-picker/index.d.cts +1 -1
- package/dist/components/color-picker/index.d.ts +1 -1
- package/dist/components/color-picker/index.js +5 -5
- package/dist/components/combobox/index.cjs +4 -4
- package/dist/components/combobox/index.js +3 -3
- package/dist/components/date-picker/index.cjs +4 -4
- package/dist/components/date-picker/index.js +3 -3
- package/dist/components/date-range-picker/index.cjs +6 -6
- package/dist/components/date-range-picker/index.js +5 -5
- package/dist/components/date-time-picker/index.cjs +7 -7
- package/dist/components/date-time-picker/index.js +6 -6
- package/dist/components/dialog/index.cjs +4 -4
- package/dist/components/dialog/index.js +3 -3
- package/dist/components/dummy-field/index.cjs +3 -3
- package/dist/components/dummy-field/index.js +2 -2
- package/dist/components/fab/index.cjs +4 -4
- package/dist/components/fab/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 +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/list-box/index.cjs +2 -2
- package/dist/components/list-box/index.js +1 -1
- package/dist/components/menu/index.cjs +3 -3
- package/dist/components/menu/index.js +2 -2
- package/dist/components/morph-button/index.cjs +39 -0
- package/dist/components/morph-button/index.d.cts +53 -0
- package/dist/components/morph-button/index.d.ts +53 -0
- package/dist/components/morph-button/index.js +39 -0
- package/dist/components/morph-button/morph-button-face.d.cts +9 -0
- package/dist/components/morph-button/morph-button-face.d.ts +9 -0
- package/dist/components/morph-button/morph-button-icon.d.cts +13 -0
- package/dist/components/morph-button/morph-button-icon.d.ts +13 -0
- package/dist/components/morph-button/morph-button-text.d.cts +16 -0
- package/dist/components/morph-button/morph-button-text.d.ts +16 -0
- package/dist/components/morph-button/morph-button.animation.d.cts +29 -0
- package/dist/components/morph-button/morph-button.animation.d.ts +29 -0
- package/dist/components/morph-button/morph-button.context.d.cts +7 -0
- package/dist/components/morph-button/morph-button.context.d.ts +7 -0
- package/dist/components/morph-button/morph-button.d.cts +61 -0
- package/dist/components/morph-button/morph-button.d.ts +61 -0
- package/dist/components/morph-button/morph-button.recipe.d.cts +11 -0
- package/dist/components/morph-button/morph-button.recipe.d.ts +11 -0
- package/dist/components/morph-button/morph-button.type.d.cts +99 -0
- package/dist/components/morph-button/morph-button.type.d.ts +99 -0
- package/dist/components/number-pad/index.cjs +40 -0
- package/dist/components/number-pad/index.d.cts +60 -0
- package/dist/components/number-pad/index.d.ts +60 -0
- package/dist/components/number-pad/index.js +40 -0
- package/dist/components/number-pad/number-pad-action.d.cts +24 -0
- package/dist/components/number-pad/number-pad-action.d.ts +24 -0
- package/dist/components/number-pad/number-pad-backspace.d.cts +18 -0
- package/dist/components/number-pad/number-pad-backspace.d.ts +18 -0
- package/dist/components/number-pad/number-pad-cell.d.cts +7 -0
- package/dist/components/number-pad/number-pad-cell.d.ts +7 -0
- package/dist/components/number-pad/number-pad-icon.d.cts +13 -0
- package/dist/components/number-pad/number-pad-icon.d.ts +13 -0
- package/dist/components/number-pad/number-pad-key.d.cts +24 -0
- package/dist/components/number-pad/number-pad-key.d.ts +24 -0
- package/dist/components/number-pad/number-pad-label.d.cts +14 -0
- package/dist/components/number-pad/number-pad-label.d.ts +14 -0
- package/dist/components/number-pad/number-pad.context.d.cts +18 -0
- package/dist/components/number-pad/number-pad.context.d.ts +18 -0
- package/dist/components/number-pad/number-pad.d.cts +57 -0
- package/dist/components/number-pad/number-pad.d.ts +57 -0
- package/dist/components/number-pad/number-pad.recipe.d.cts +11 -0
- package/dist/components/number-pad/number-pad.recipe.d.ts +11 -0
- package/dist/components/number-pad/number-pad.style.d.cts +13 -0
- package/dist/components/number-pad/number-pad.style.d.ts +13 -0
- package/dist/components/number-pad/number-pad.type.d.cts +135 -0
- package/dist/components/number-pad/number-pad.type.d.ts +135 -0
- package/dist/components/number-pad/number-pad.utils.d.cts +34 -0
- package/dist/components/number-pad/number-pad.utils.d.ts +34 -0
- package/dist/components/number-stepper/index.cjs +3 -3
- package/dist/components/number-stepper/index.js +2 -2
- package/dist/components/pager/index.cjs +31 -0
- package/dist/components/pager/index.d.cts +60 -0
- package/dist/components/pager/index.d.ts +60 -0
- package/dist/components/pager/index.js +31 -0
- package/dist/components/pager/pager-content.d.cts +24 -0
- package/dist/components/pager/pager-content.d.ts +24 -0
- package/dist/components/pager/pager-indicator.d.cts +47 -0
- package/dist/components/pager/pager-indicator.d.ts +47 -0
- package/dist/components/pager/pager-page.d.cts +16 -0
- package/dist/components/pager/pager-page.d.ts +16 -0
- package/dist/components/pager/pager.context.d.cts +7 -0
- package/dist/components/pager/pager.context.d.ts +7 -0
- package/dist/components/pager/pager.d.cts +71 -0
- package/dist/components/pager/pager.d.ts +71 -0
- package/dist/components/pager/pager.recipe.d.cts +15 -0
- package/dist/components/pager/pager.recipe.d.ts +15 -0
- package/dist/components/pager/pager.type.d.cts +108 -0
- package/dist/components/pager/pager.type.d.ts +108 -0
- package/dist/components/phone-number-field/index.cjs +15 -15
- package/dist/components/phone-number-field/index.js +4 -4
- package/dist/components/popover/index.cjs +3 -3
- package/dist/components/popover/index.js +2 -2
- package/dist/components/radio/index.cjs +3 -3
- package/dist/components/radio/index.d.cts +1 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/radio.d.cts +1 -0
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/range-calendar/index.cjs +4 -4
- package/dist/components/range-calendar/index.js +3 -3
- package/dist/components/rating/index.cjs +30 -0
- package/dist/components/rating/index.d.cts +41 -0
- package/dist/components/rating/index.d.ts +41 -0
- package/dist/components/rating/index.js +30 -0
- package/dist/components/rating/rating-icon.d.cts +16 -0
- package/dist/components/rating/rating-icon.d.ts +16 -0
- package/dist/components/rating/rating-item.d.cts +23 -0
- package/dist/components/rating/rating-item.d.ts +23 -0
- package/dist/components/rating/rating-star.d.cts +19 -0
- package/dist/components/rating/rating-star.d.ts +19 -0
- package/dist/components/rating/rating.context.d.cts +16 -0
- package/dist/components/rating/rating.context.d.ts +16 -0
- package/dist/components/rating/rating.d.cts +59 -0
- package/dist/components/rating/rating.d.ts +59 -0
- package/dist/components/rating/rating.recipe.d.cts +11 -0
- package/dist/components/rating/rating.recipe.d.ts +11 -0
- package/dist/components/rating/rating.style.d.cts +24 -0
- package/dist/components/rating/rating.style.d.ts +24 -0
- package/dist/components/rating/rating.type.d.cts +108 -0
- package/dist/components/rating/rating.type.d.ts +108 -0
- package/dist/components/rating/rating.utils.d.cts +28 -0
- package/dist/components/rating/rating.utils.d.ts +28 -0
- package/dist/components/search-field/index.cjs +4 -4
- package/dist/components/search-field/index.js +3 -3
- package/dist/components/segment/index.cjs +2 -2
- package/dist/components/segment/index.js +1 -1
- package/dist/components/select/index.cjs +3 -3
- package/dist/components/select/index.js +2 -2
- package/dist/components/snackbar/index.cjs +3 -3
- package/dist/components/snackbar/index.js +2 -2
- package/dist/components/switch/index.cjs +3 -3
- package/dist/components/switch/index.d.cts +1 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.d.cts +1 -0
- package/dist/components/switch/switch.d.ts +1 -0
- package/dist/components/table/index.cjs +4 -4
- package/dist/components/table/index.js +3 -3
- package/dist/components/tabs/index.cjs +3 -3
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tag-group/index.cjs +4 -4
- package/dist/components/tag-group/index.js +3 -3
- package/dist/components/time-picker/index.cjs +4 -4
- package/dist/components/time-picker/index.js +3 -3
- package/dist/components/toast/index.cjs +3 -3
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toggle-button/index.cjs +3 -3
- package/dist/components/toggle-button/index.d.cts +1 -0
- package/dist/components/toggle-button/index.d.ts +1 -0
- package/dist/components/toggle-button/index.js +2 -2
- package/dist/components/toggle-button/toggle-button.d.cts +1 -0
- package/dist/components/toggle-button/toggle-button.d.ts +1 -0
- package/dist/index.cjs +145 -60
- package/dist/index.js +243 -158
- package/dist/system/index.cjs +3 -3
- package/dist/system/index.js +2 -2
- package/dist/system/pressable-feedback/index.d.cts +1 -0
- package/dist/system/pressable-feedback/index.d.ts +1 -0
- package/dist/system/pressable-feedback/pressable-feedback.d.cts +1 -0
- package/dist/system/pressable-feedback/pressable-feedback.d.ts +1 -0
- package/dist/system/pressable-feedback/pressable-feedback.type.d.cts +13 -1
- package/dist/system/pressable-feedback/pressable-feedback.type.d.ts +13 -1
- package/package.json +41 -1
- package/dist/chunk-L5GB6G3L.cjs +0 -1007
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PressableStateCallbackType, StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
3
|
+
import type { IconContextValue, IconProps } from '../../system/icon';
|
|
4
|
+
import type { PressableFeedbackProps } from '../../system/pressable-feedback';
|
|
5
|
+
import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
|
|
6
|
+
import type { RadiusKey } from '../../theme/theme.type';
|
|
7
|
+
export type MorphButtonSlot = 'root' | 'collapsed' | 'expanded' | 'label' | 'title' | 'description' | 'icon';
|
|
8
|
+
/**
|
|
9
|
+
* The `Button`'s union, unchanged: a `MorphButton` is a button, and the emphasis ladder it
|
|
10
|
+
* sits on is the same one. `success` and `warning` are absent here for the reason they are
|
|
11
|
+
* absent there — neither is an action, and a button is something you press.
|
|
12
|
+
*/
|
|
13
|
+
export type MorphButtonVariant = 'primary' | 'secondary' | 'default' | 'tertiary' | 'ghost' | 'danger' | 'danger-soft';
|
|
14
|
+
/**
|
|
15
|
+
* Three steps, not four. `xs` is a 32-point control, and a card that opens out of one has
|
|
16
|
+
* less room for its own padding than the padding it would need — the shape it morphs into
|
|
17
|
+
* would be a pill with two lines crammed in it.
|
|
18
|
+
*/
|
|
19
|
+
export type MorphButtonSize = 'sm' | 'md' | 'lg';
|
|
20
|
+
/**
|
|
21
|
+
* How the box travels between the two shapes. Three knobs, because that is what a spring
|
|
22
|
+
* is; anything past them is a different animation and therefore a different component.
|
|
23
|
+
*/
|
|
24
|
+
export type MorphSpring = {
|
|
25
|
+
stiffness?: number;
|
|
26
|
+
damping?: number;
|
|
27
|
+
mass?: number;
|
|
28
|
+
};
|
|
29
|
+
type MorphButtonOwnProps = {
|
|
30
|
+
variant?: MorphButtonVariant;
|
|
31
|
+
/** The collapsed height, the paddings, the gaps, the corner and the type. Never width. */
|
|
32
|
+
size?: MorphButtonSize;
|
|
33
|
+
/**
|
|
34
|
+
* Overrides the corner both shapes share. Unset, it is half the collapsed height — which
|
|
35
|
+
* is what makes the collapsed shape a pill and the expanded one a card, from one value.
|
|
36
|
+
*/
|
|
37
|
+
radius?: RadiusKey;
|
|
38
|
+
/** A raw tint (R7), landing where the variant put its tokens. */
|
|
39
|
+
color?: string;
|
|
40
|
+
/** Which shape it is in. Present means controlled. */
|
|
41
|
+
isExpanded?: boolean;
|
|
42
|
+
/** Which shape it is in at first mount. @default false */
|
|
43
|
+
defaultExpanded?: boolean;
|
|
44
|
+
onExpandedChange?: (isExpanded: boolean) => void;
|
|
45
|
+
/**
|
|
46
|
+
* `false` puts it in the other shape with no travel at all — the box jumps and the faces
|
|
47
|
+
* swap without a fade.
|
|
48
|
+
*/
|
|
49
|
+
animation?: boolean | MorphSpring;
|
|
50
|
+
isDisabled?: boolean;
|
|
51
|
+
/** R12 — merge into the single child instead of rendering a pressable. */
|
|
52
|
+
asChild?: boolean;
|
|
53
|
+
/** R9 — `Pressable`'s function form as much as an object or an array. */
|
|
54
|
+
style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
/** R14 — it renders a `PressableFeedback`, so it carries that node's style keys through it. */
|
|
58
|
+
export type MorphButtonProps = MorphButtonOwnProps & Omit<PressableFeedbackProps, 'isPressed' | 'layout' | 'style' | 'children' | keyof MorphButtonOwnProps>;
|
|
59
|
+
/** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
|
|
60
|
+
export type MorphButtonFaceProps = ViewProps & Omit<ViewStyleProps, keyof ViewProps> & {
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
};
|
|
63
|
+
/** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
|
|
64
|
+
export type MorphButtonTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
};
|
|
67
|
+
export type MorphButtonIconProps = IconProps;
|
|
68
|
+
/**
|
|
69
|
+
* R5 — resolved styles, not props for a slot to resolve a second time. The two faces are
|
|
70
|
+
* in here for the same reason the label is: each one is a cached `StyleSheet` reference
|
|
71
|
+
* the root already computed, and a face merges its own `style` on top of it.
|
|
72
|
+
*/
|
|
73
|
+
export type MorphButtonContextValue = {
|
|
74
|
+
collapsedStyle: StyleProp<ViewStyle>;
|
|
75
|
+
expandedStyle: StyleProp<ViewStyle>;
|
|
76
|
+
labelStyle: StyleProp<TextStyle>;
|
|
77
|
+
titleStyle: StyleProp<TextStyle>;
|
|
78
|
+
descriptionStyle: StyleProp<TextStyle>;
|
|
79
|
+
/**
|
|
80
|
+
* Values, not a style: `Icon` hands `size` and `color` to a third-party component, so
|
|
81
|
+
* the root flattens its icon slot once here rather than in every icon it contains.
|
|
82
|
+
*/
|
|
83
|
+
icon: IconContextValue;
|
|
84
|
+
/** Which face is mounted — the faces read it rather than being told by a prop. */
|
|
85
|
+
isExpanded: boolean;
|
|
86
|
+
/** Morphs it. A control inside a face is written against this, and it costs no state. */
|
|
87
|
+
toggle: () => void;
|
|
88
|
+
isDisabled: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the faces fade as they swap. `animation={false}` has to reach them too, or the
|
|
91
|
+
* box would jump while the content still took a hundred and forty milliseconds to arrive.
|
|
92
|
+
*
|
|
93
|
+
* It is also `false` until the button has changed shape once, because Reanimated runs an
|
|
94
|
+
* `entering` animation on the first mount as well: without that, every button on a screen
|
|
95
|
+
* would fade its collapsed face in as the screen arrived.
|
|
96
|
+
*/
|
|
97
|
+
animation: boolean;
|
|
98
|
+
};
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkLKRQUQZQcjs = require('../../chunk-LKRQUQZQ.cjs');
|
|
15
|
+
require('../../chunk-7EIHHOHP.cjs');
|
|
16
|
+
require('../../chunk-OW4N2C3M.cjs');
|
|
17
|
+
require('../../chunk-7DPL3ZDS.cjs');
|
|
18
|
+
require('../../chunk-GSZDN6EZ.cjs');
|
|
19
|
+
require('../../chunk-FHNIGHN5.cjs');
|
|
20
|
+
require('../../chunk-SL3V7R2Y.cjs');
|
|
21
|
+
require('../../chunk-TVJXC4HY.cjs');
|
|
22
|
+
require('../../chunk-CDRGTUYF.cjs');
|
|
23
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
24
|
+
require('../../chunk-EJQCQPET.cjs');
|
|
25
|
+
require('../../chunk-IIAQISBG.cjs');
|
|
26
|
+
require('../../chunk-TK44VBIE.cjs');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.NUMBER_PAD_ROWS = _chunkLKRQUQZQcjs.NUMBER_PAD_ROWS; exports.NUMBER_PAD_ZERO = _chunkLKRQUQZQcjs.NUMBER_PAD_ZERO; exports.NumberPad = _chunkLKRQUQZQcjs.NumberPad; exports.NumberPadAction = _chunkLKRQUQZQcjs.NumberPadAction; exports.NumberPadBackspace = _chunkLKRQUQZQcjs.NumberPadBackspace; exports.NumberPadIcon = _chunkLKRQUQZQcjs.NumberPadIcon; exports.NumberPadKey = _chunkLKRQUQZQcjs.NumberPadKey; exports.NumberPadLabel = _chunkLKRQUQZQcjs.NumberPadLabel; exports.NumberPadRoot = _chunkLKRQUQZQcjs.NumberPadRoot; exports.numberPadRecipe = _chunkLKRQUQZQcjs.numberPadRecipe; exports.useNumberPad = _chunkLKRQUQZQcjs.useNumberPad; exports.useNumberPadCell = _chunkLKRQUQZQcjs.useNumberPadCell;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { NumberPadIcon } from './number-pad-icon';
|
|
2
|
+
export declare const NumberPad: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
variant?: import("./number-pad.type").NumberPadVariant;
|
|
4
|
+
size?: import("./number-pad.type").NumberPadSize;
|
|
5
|
+
radius?: import("../..").RadiusKey;
|
|
6
|
+
color?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onChangeText?: (value: string) => void;
|
|
10
|
+
onComplete?: (value: string) => void;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
15
|
+
} & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
|
|
16
|
+
variant?: import("./number-pad.type").NumberPadVariant;
|
|
17
|
+
size?: import("./number-pad.type").NumberPadSize;
|
|
18
|
+
radius?: import("../..").RadiusKey;
|
|
19
|
+
color?: string;
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onChangeText?: (value: string) => void;
|
|
23
|
+
onComplete?: (value: string) => void;
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
children?: import("react").ReactNode;
|
|
27
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
28
|
+
}> & import("react").RefAttributes<import("react-native").View>> & {
|
|
29
|
+
Key: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
32
|
+
children?: import("react").ReactNode;
|
|
33
|
+
} & {
|
|
34
|
+
value: string;
|
|
35
|
+
} & import("react").RefAttributes<import("react-native").View>>;
|
|
36
|
+
Backspace: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
39
|
+
children?: import("react").ReactNode;
|
|
40
|
+
} & import("react").RefAttributes<import("react-native").View>>;
|
|
41
|
+
Action: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
44
|
+
children?: import("react").ReactNode;
|
|
45
|
+
} & import("react").RefAttributes<import("react-native").View>>;
|
|
46
|
+
Label: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
|
|
47
|
+
children?: import("react").ReactNode;
|
|
48
|
+
} & import("react").RefAttributes<import("react-native").Text>>;
|
|
49
|
+
Icon: typeof NumberPadIcon;
|
|
50
|
+
};
|
|
51
|
+
export { NumberPadRoot } from './number-pad';
|
|
52
|
+
export { NumberPadAction } from './number-pad-action';
|
|
53
|
+
export { NumberPadBackspace } from './number-pad-backspace';
|
|
54
|
+
export { NumberPadIcon } from './number-pad-icon';
|
|
55
|
+
export { NumberPadKey } from './number-pad-key';
|
|
56
|
+
export { NumberPadLabel } from './number-pad-label';
|
|
57
|
+
export { useNumberPad, useNumberPadCell } from './number-pad.context';
|
|
58
|
+
export { numberPadRecipe } from './number-pad.recipe';
|
|
59
|
+
export { NUMBER_PAD_ROWS, NUMBER_PAD_ZERO } from './number-pad.utils';
|
|
60
|
+
export type { NumberPadActionProps, NumberPadBackspaceProps, NumberPadCellContextValue, NumberPadContextValue, NumberPadIconProps, NumberPadKeyProps, NumberPadLabelProps, NumberPadProps, NumberPadSize, NumberPadSlot, NumberPadVariant, } from './number-pad.type';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { NumberPadIcon } from './number-pad-icon';
|
|
2
|
+
export declare const NumberPad: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
variant?: import("./number-pad.type").NumberPadVariant;
|
|
4
|
+
size?: import("./number-pad.type").NumberPadSize;
|
|
5
|
+
radius?: import("../..").RadiusKey;
|
|
6
|
+
color?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onChangeText?: (value: string) => void;
|
|
10
|
+
onComplete?: (value: string) => void;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
15
|
+
} & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
|
|
16
|
+
variant?: import("./number-pad.type").NumberPadVariant;
|
|
17
|
+
size?: import("./number-pad.type").NumberPadSize;
|
|
18
|
+
radius?: import("../..").RadiusKey;
|
|
19
|
+
color?: string;
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onChangeText?: (value: string) => void;
|
|
23
|
+
onComplete?: (value: string) => void;
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
children?: import("react").ReactNode;
|
|
27
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
28
|
+
}> & import("react").RefAttributes<import("react-native").View>> & {
|
|
29
|
+
Key: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
32
|
+
children?: import("react").ReactNode;
|
|
33
|
+
} & {
|
|
34
|
+
value: string;
|
|
35
|
+
} & import("react").RefAttributes<import("react-native").View>>;
|
|
36
|
+
Backspace: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
39
|
+
children?: import("react").ReactNode;
|
|
40
|
+
} & import("react").RefAttributes<import("react-native").View>>;
|
|
41
|
+
Action: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
44
|
+
children?: import("react").ReactNode;
|
|
45
|
+
} & import("react").RefAttributes<import("react-native").View>>;
|
|
46
|
+
Label: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
|
|
47
|
+
children?: import("react").ReactNode;
|
|
48
|
+
} & import("react").RefAttributes<import("react-native").Text>>;
|
|
49
|
+
Icon: typeof NumberPadIcon;
|
|
50
|
+
};
|
|
51
|
+
export { NumberPadRoot } from './number-pad';
|
|
52
|
+
export { NumberPadAction } from './number-pad-action';
|
|
53
|
+
export { NumberPadBackspace } from './number-pad-backspace';
|
|
54
|
+
export { NumberPadIcon } from './number-pad-icon';
|
|
55
|
+
export { NumberPadKey } from './number-pad-key';
|
|
56
|
+
export { NumberPadLabel } from './number-pad-label';
|
|
57
|
+
export { useNumberPad, useNumberPadCell } from './number-pad.context';
|
|
58
|
+
export { numberPadRecipe } from './number-pad.recipe';
|
|
59
|
+
export { NUMBER_PAD_ROWS, NUMBER_PAD_ZERO } from './number-pad.utils';
|
|
60
|
+
export type { NumberPadActionProps, NumberPadBackspaceProps, NumberPadCellContextValue, NumberPadContextValue, NumberPadIconProps, NumberPadKeyProps, NumberPadLabelProps, NumberPadProps, NumberPadSize, NumberPadSlot, NumberPadVariant, } from './number-pad.type';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NUMBER_PAD_ROWS,
|
|
3
|
+
NUMBER_PAD_ZERO,
|
|
4
|
+
NumberPad,
|
|
5
|
+
NumberPadAction,
|
|
6
|
+
NumberPadBackspace,
|
|
7
|
+
NumberPadIcon,
|
|
8
|
+
NumberPadKey,
|
|
9
|
+
NumberPadLabel,
|
|
10
|
+
NumberPadRoot,
|
|
11
|
+
numberPadRecipe,
|
|
12
|
+
useNumberPad,
|
|
13
|
+
useNumberPadCell
|
|
14
|
+
} from "../../chunk-GGP2ERSV.js";
|
|
15
|
+
import "../../chunk-F6W3JQ7K.js";
|
|
16
|
+
import "../../chunk-2AFA5HA2.js";
|
|
17
|
+
import "../../chunk-423RQBOX.js";
|
|
18
|
+
import "../../chunk-JN6IRT2M.js";
|
|
19
|
+
import "../../chunk-WFZDAXDI.js";
|
|
20
|
+
import "../../chunk-DKVXTMIJ.js";
|
|
21
|
+
import "../../chunk-3Q42X6EQ.js";
|
|
22
|
+
import "../../chunk-TTZOIXKE.js";
|
|
23
|
+
import "../../chunk-36PRYGAM.js";
|
|
24
|
+
import "../../chunk-EGLLDKN6.js";
|
|
25
|
+
import "../../chunk-Z6JBWRPL.js";
|
|
26
|
+
import "../../chunk-M63GFNKV.js";
|
|
27
|
+
export {
|
|
28
|
+
NUMBER_PAD_ROWS,
|
|
29
|
+
NUMBER_PAD_ZERO,
|
|
30
|
+
NumberPad,
|
|
31
|
+
NumberPadAction,
|
|
32
|
+
NumberPadBackspace,
|
|
33
|
+
NumberPadIcon,
|
|
34
|
+
NumberPadKey,
|
|
35
|
+
NumberPadLabel,
|
|
36
|
+
NumberPadRoot,
|
|
37
|
+
numberPadRecipe,
|
|
38
|
+
useNumberPad,
|
|
39
|
+
useNumberPadCell
|
|
40
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The free corner of the bottom row, opposite the backspace.
|
|
4
|
+
*
|
|
5
|
+
* It does nothing on its own — the press is the caller's, because what belongs there is
|
|
6
|
+
* theirs: a fingerprint that unlocks, a `Clear`, the pad's own decimal separator. Bare like
|
|
7
|
+
* the backspace, so the two corners read as a pair around the `0`.
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <NumberPad>
|
|
11
|
+
* <NumberPad.Action onPress={unlock} accessibilityLabel="Unlock with Face ID">
|
|
12
|
+
* <NumberPad.Icon as={FaceIdIcon} color={theme.colors.accent} />
|
|
13
|
+
* </NumberPad.Action>
|
|
14
|
+
* </NumberPad>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* A key that inserts goes there as a `NumberPad.Key` instead; this one is for everything
|
|
18
|
+
* that is not a character.
|
|
19
|
+
*/
|
|
20
|
+
export declare const NumberPadAction: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
23
|
+
children?: import("react").ReactNode;
|
|
24
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The free corner of the bottom row, opposite the backspace.
|
|
4
|
+
*
|
|
5
|
+
* It does nothing on its own — the press is the caller's, because what belongs there is
|
|
6
|
+
* theirs: a fingerprint that unlocks, a `Clear`, the pad's own decimal separator. Bare like
|
|
7
|
+
* the backspace, so the two corners read as a pair around the `0`.
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <NumberPad>
|
|
11
|
+
* <NumberPad.Action onPress={unlock} accessibilityLabel="Unlock with Face ID">
|
|
12
|
+
* <NumberPad.Icon as={FaceIdIcon} color={theme.colors.accent} />
|
|
13
|
+
* </NumberPad.Action>
|
|
14
|
+
* </NumberPad>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* A key that inserts goes there as a `NumberPad.Key` instead; this one is for everything
|
|
18
|
+
* that is not a character.
|
|
19
|
+
*/
|
|
20
|
+
export declare const NumberPadAction: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
23
|
+
children?: import("react").ReactNode;
|
|
24
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The delete key, on the end of the bottom row. Bare rather than filled: it is not a digit,
|
|
4
|
+
* and eleven identical fills is a pad where the one key that removes looks like the ten that
|
|
5
|
+
* add.
|
|
6
|
+
*
|
|
7
|
+
* **A long press clears the whole value.** It is the gesture every platform's own keypad
|
|
8
|
+
* carries, and without it a mistyped sixteen-digit card is sixteen presses to undo.
|
|
9
|
+
*
|
|
10
|
+
* The arrow is a **character**, not an icon, so the pad needs no SVG peer for the one glyph
|
|
11
|
+
* it draws itself. It flips under RTL, because a backspace points at what it removes and
|
|
12
|
+
* that is the other way round in a right-to-left layout. `NumberPad.Icon` replaces it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NumberPadBackspace: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The delete key, on the end of the bottom row. Bare rather than filled: it is not a digit,
|
|
4
|
+
* and eleven identical fills is a pad where the one key that removes looks like the ten that
|
|
5
|
+
* add.
|
|
6
|
+
*
|
|
7
|
+
* **A long press clears the whole value.** It is the gesture every platform's own keypad
|
|
8
|
+
* carries, and without it a mistyped sixteen-digit card is sixteen presses to undo.
|
|
9
|
+
*
|
|
10
|
+
* The arrow is a **character**, not an icon, so the pad needs no SVG peer for the one glyph
|
|
11
|
+
* it draws itself. It flips under RTL, because a backspace points at what it removes and
|
|
12
|
+
* that is the other way round in a right-to-left layout. `NumberPad.Icon` replaces it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NumberPadBackspace: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
import type { NumberPadCellTone, NumberPadKeyProps } from './number-pad.type';
|
|
3
|
+
export declare const NumberPadCell: import("react").ForwardRefExoticComponent<Omit<NumberPadKeyProps, "value"> & {
|
|
4
|
+
tone: NumberPadCellTone;
|
|
5
|
+
/** What the press does to the value. Composed after the caller's own `onPress`. */
|
|
6
|
+
onActivate?: () => void;
|
|
7
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
import type { NumberPadCellTone, NumberPadKeyProps } from './number-pad.type';
|
|
3
|
+
export declare const NumberPadCell: import("react").ForwardRefExoticComponent<Omit<NumberPadKeyProps, "value"> & {
|
|
4
|
+
tone: NumberPadCellTone;
|
|
5
|
+
/** What the press does to the value. Composed after the caller's own `onPress`. */
|
|
6
|
+
onActivate?: () => void;
|
|
7
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NumberPadIconProps } from './number-pad.type';
|
|
2
|
+
/**
|
|
3
|
+
* A glyph on a cell, taking the pad's size and the cell's colour without being told either
|
|
4
|
+
* — the fingerprint in the free corner, or a drawn backspace in place of the character one.
|
|
5
|
+
*
|
|
6
|
+
* The colour follows the cell it is in for the reason the label's does: a filled key reads
|
|
7
|
+
* the variant's foreground and a bare corner the page's. An explicit `color` still wins,
|
|
8
|
+
* which is what makes the accent-coloured biometric key one prop.
|
|
9
|
+
*/
|
|
10
|
+
export declare function NumberPadIcon({ size, color, ...rest }: NumberPadIconProps): import("react").JSX.Element;
|
|
11
|
+
export declare namespace NumberPadIcon {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NumberPadIconProps } from './number-pad.type';
|
|
2
|
+
/**
|
|
3
|
+
* A glyph on a cell, taking the pad's size and the cell's colour without being told either
|
|
4
|
+
* — the fingerprint in the free corner, or a drawn backspace in place of the character one.
|
|
5
|
+
*
|
|
6
|
+
* The colour follows the cell it is in for the reason the label's does: a filled key reads
|
|
7
|
+
* the variant's foreground and a bare corner the page's. An explicit `color` still wins,
|
|
8
|
+
* which is what makes the accent-coloured biometric key one prop.
|
|
9
|
+
*/
|
|
10
|
+
export declare function NumberPadIcon({ size, color, ...rest }: NumberPadIconProps): import("react").JSX.Element;
|
|
11
|
+
export declare namespace NumberPadIcon {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* One filled key.
|
|
4
|
+
*
|
|
5
|
+
* The root renders ten of these and names none of them, because the digits are data. This
|
|
6
|
+
* is exported for the eleventh — a decimal separator or a `00` on a currency pad, dropped
|
|
7
|
+
* into the free cell:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <NumberPad>
|
|
11
|
+
* <NumberPad.Key value="," />
|
|
12
|
+
* </NumberPad>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* With nothing composed inside it, it shows what it inserts. R3 otherwise: a stringifiable
|
|
16
|
+
* tree becomes the label, anything else is the caller's own content.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NumberPadKey: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
|
+
} & {
|
|
23
|
+
value: string;
|
|
24
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* One filled key.
|
|
4
|
+
*
|
|
5
|
+
* The root renders ten of these and names none of them, because the digits are data. This
|
|
6
|
+
* is exported for the eleventh — a decimal separator or a `00` on a currency pad, dropped
|
|
7
|
+
* into the free cell:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <NumberPad>
|
|
11
|
+
* <NumberPad.Key value="," />
|
|
12
|
+
* </NumberPad>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* With nothing composed inside it, it shows what it inserts. R3 otherwise: a stringifiable
|
|
16
|
+
* tree becomes the label, anything else is the caller's own content.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NumberPadKey: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
|
+
} & {
|
|
23
|
+
value: string;
|
|
24
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Text } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The character on a cell — the digit on a key, the arrow on the backspace.
|
|
4
|
+
*
|
|
5
|
+
* Which foreground it takes is the **cell's** answer rather than a prop of its own: a
|
|
6
|
+
* filled key's is the variant's, a bare corner's is the page's. Three lines, because the
|
|
7
|
+
* root already resolved both (R5).
|
|
8
|
+
*
|
|
9
|
+
* Single-line by default. A key has a fixed height, so a label too long for it truncates
|
|
10
|
+
* rather than deforming the row it is in.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NumberPadLabel: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
} & import("react").RefAttributes<Text>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Text } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The character on a cell — the digit on a key, the arrow on the backspace.
|
|
4
|
+
*
|
|
5
|
+
* Which foreground it takes is the **cell's** answer rather than a prop of its own: a
|
|
6
|
+
* filled key's is the variant's, a bare corner's is the page's. Three lines, because the
|
|
7
|
+
* root already resolved both (R5).
|
|
8
|
+
*
|
|
9
|
+
* Single-line by default. A key has a fixed height, so a label too long for it truncates
|
|
10
|
+
* rather than deforming the row it is in.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NumberPadLabel: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
} & import("react").RefAttributes<Text>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NumberPadCellContextValue, NumberPadContextValue } from './number-pad.type';
|
|
2
|
+
/**
|
|
3
|
+
* R10 — `useNumberPad` is exported so a control beside the pad can read the value it is
|
|
4
|
+
* building, and so a caller can write their own cell (a `00` key on a currency pad)
|
|
5
|
+
* against the same `insert` the built-in ones call. Outside a `<NumberPad>` it throws by
|
|
6
|
+
* name.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NumberPadProvider: import("react").Provider<NumberPadContextValue | null>, useNumberPad: () => NumberPadContextValue;
|
|
9
|
+
/**
|
|
10
|
+
* Which cell a label or a glyph is inside.
|
|
11
|
+
*
|
|
12
|
+
* It exists so `NumberPad.Icon` needs no prop to know whether it sits on a filled key or in
|
|
13
|
+
* a bare corner — the cell it is in already knows, and the two want different foregrounds:
|
|
14
|
+
* a `primary` pad's digits are `accentForeground`, and a backspace with no ground of its own
|
|
15
|
+
* would take white on white. A `tone` prop would have made that the caller's problem, and
|
|
16
|
+
* the caller cannot see the variant from inside the cell.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NumberPadCellProvider: import("react").Provider<NumberPadCellContextValue | null>, useNumberPadCell: () => NumberPadCellContextValue;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NumberPadCellContextValue, NumberPadContextValue } from './number-pad.type';
|
|
2
|
+
/**
|
|
3
|
+
* R10 — `useNumberPad` is exported so a control beside the pad can read the value it is
|
|
4
|
+
* building, and so a caller can write their own cell (a `00` key on a currency pad)
|
|
5
|
+
* against the same `insert` the built-in ones call. Outside a `<NumberPad>` it throws by
|
|
6
|
+
* name.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NumberPadProvider: import("react").Provider<NumberPadContextValue | null>, useNumberPad: () => NumberPadContextValue;
|
|
9
|
+
/**
|
|
10
|
+
* Which cell a label or a glyph is inside.
|
|
11
|
+
*
|
|
12
|
+
* It exists so `NumberPad.Icon` needs no prop to know whether it sits on a filled key or in
|
|
13
|
+
* a bare corner — the cell it is in already knows, and the two want different foregrounds:
|
|
14
|
+
* a `primary` pad's digits are `accentForeground`, and a backspace with no ground of its own
|
|
15
|
+
* would take white on white. A `tone` prop would have made that the caller's problem, and
|
|
16
|
+
* the caller cannot see the variant from inside the cell.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NumberPadCellProvider: import("react").Provider<NumberPadCellContextValue | null>, useNumberPadCell: () => NumberPadCellContextValue;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* The keypad a PIN, a code and an amount are typed on.
|
|
4
|
+
*
|
|
5
|
+
* ```tsx
|
|
6
|
+
* <NumberPad maxLength={4} onComplete={unlock} />
|
|
7
|
+
*
|
|
8
|
+
* <NumberPad maxLength={4} value={pin} onChangeText={setPin}>
|
|
9
|
+
* <NumberPad.Action onPress={faceId} accessibilityLabel="Unlock with Face ID">
|
|
10
|
+
* <NumberPad.Icon as={FaceIdIcon} color={theme.colors.accent} />
|
|
11
|
+
* </NumberPad.Action>
|
|
12
|
+
* </NumberPad>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* **The grid is data, not markup.** `1` through `9`, the `0` and the backspace are not a
|
|
16
|
+
* decision a caller makes, so the root renders them — eleven hand-written cells is a layout
|
|
17
|
+
* that disagrees with itself the moment one of them is edited. What *is* composed is the one
|
|
18
|
+
* free corner of the bottom row, and that is what `children` is.
|
|
19
|
+
*
|
|
20
|
+
* **The pad owns the value as one string**, controlled or not, and clamps it to `maxLength`:
|
|
21
|
+
* a press past the limit changes nothing at all, so `onChangeText` does not fire and a full
|
|
22
|
+
* PIN cannot be completed twice by leaning on a key.
|
|
23
|
+
*
|
|
24
|
+
* **It draws no display.** What the value looks like is the screen's — an `InputOTP`'s boxes,
|
|
25
|
+
* a row of dots, an amount in a `Typography`. A pad that also rendered the value would be
|
|
26
|
+
* two components that have to agree on a string.
|
|
27
|
+
*
|
|
28
|
+
* `useNumberPad()` publishes `insert`, `backspace` and `clear`, so a control beside the pad
|
|
29
|
+
* drives it with no state of its own.
|
|
30
|
+
*/
|
|
31
|
+
export declare const NumberPadRoot: import("react").ForwardRefExoticComponent<{
|
|
32
|
+
variant?: import("./number-pad.type").NumberPadVariant;
|
|
33
|
+
size?: import("./number-pad.type").NumberPadSize;
|
|
34
|
+
radius?: import("../..").RadiusKey;
|
|
35
|
+
color?: string;
|
|
36
|
+
value?: string;
|
|
37
|
+
defaultValue?: string;
|
|
38
|
+
onChangeText?: (value: string) => void;
|
|
39
|
+
onComplete?: (value: string) => void;
|
|
40
|
+
maxLength?: number;
|
|
41
|
+
isDisabled?: boolean;
|
|
42
|
+
children?: import("react").ReactNode;
|
|
43
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
44
|
+
} & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
|
|
45
|
+
variant?: import("./number-pad.type").NumberPadVariant;
|
|
46
|
+
size?: import("./number-pad.type").NumberPadSize;
|
|
47
|
+
radius?: import("../..").RadiusKey;
|
|
48
|
+
color?: string;
|
|
49
|
+
value?: string;
|
|
50
|
+
defaultValue?: string;
|
|
51
|
+
onChangeText?: (value: string) => void;
|
|
52
|
+
onComplete?: (value: string) => void;
|
|
53
|
+
maxLength?: number;
|
|
54
|
+
isDisabled?: boolean;
|
|
55
|
+
children?: import("react").ReactNode;
|
|
56
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
57
|
+
}> & import("react").RefAttributes<View>>;
|