@xaui/native 0.9.1-alpha.4 → 0.9.1-alpha.40

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.
Files changed (203) hide show
  1. package/dist/chunk-2EGR4LWD.js +145 -0
  2. package/dist/chunk-2NRZKJG7.js +531 -0
  3. package/dist/chunk-2PMXMKS5.js +67 -0
  4. package/dist/chunk-2XPG2243.js +586 -0
  5. package/dist/chunk-36PRYGAM.js +13 -0
  6. package/dist/chunk-3E7CDKFO.cjs +696 -0
  7. package/dist/chunk-3GFRSZYR.js +54 -0
  8. package/dist/chunk-423RQBOX.js +21 -0
  9. package/dist/chunk-4CUZZWFW.js +92 -0
  10. package/dist/chunk-4GTAZM2C.js +174 -0
  11. package/dist/chunk-4KFKWBN5.cjs +89 -0
  12. package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
  13. package/dist/chunk-5R26NM4M.cjs +402 -0
  14. package/dist/chunk-5VKYNBNA.js +607 -0
  15. package/dist/chunk-64MXEVT3.js +66 -0
  16. package/dist/chunk-6DOLGZVV.cjs +147 -0
  17. package/dist/chunk-6L2TS2R3.cjs +92 -0
  18. package/dist/chunk-6UEZJRVI.js +669 -0
  19. package/dist/chunk-734MFAX4.js +27 -0
  20. package/dist/chunk-73RKQC5X.js +104 -0
  21. package/dist/chunk-7DPL3ZDS.cjs +21 -0
  22. package/dist/chunk-7EIHHOHP.cjs +42 -0
  23. package/dist/chunk-7GHM4GKL.cjs +119 -0
  24. package/dist/chunk-7YF5NAHQ.cjs +74 -0
  25. package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
  26. package/dist/chunk-ABAGZTXZ.cjs +736 -0
  27. package/dist/{chunk-AW63PTQ4.cjs → chunk-ACAPTWE3.cjs} +85 -81
  28. package/dist/chunk-AMCSSOJT.cjs +104 -0
  29. package/dist/chunk-BA2DBSAN.js +102 -0
  30. package/dist/chunk-BRRXFOBY.js +431 -0
  31. package/dist/chunk-C5YLPCFC.cjs +293 -0
  32. package/dist/chunk-DA3OKXHV.cjs +700 -0
  33. package/dist/chunk-DD4276RF.js +366 -0
  34. package/dist/chunk-DG2I4PJG.js +701 -0
  35. package/dist/chunk-DHGLGSH6.js +661 -0
  36. package/dist/chunk-DIBUQ46Y.js +346 -0
  37. package/dist/chunk-EGLLDKN6.js +9 -0
  38. package/dist/chunk-EJQCQPET.cjs +9 -0
  39. package/dist/chunk-EKS3W46M.cjs +66 -0
  40. package/dist/chunk-EZEYMLO3.js +402 -0
  41. package/dist/chunk-F6CQ6CBI.cjs +112 -0
  42. package/dist/chunk-F6W3JQ7K.js +42 -0
  43. package/dist/chunk-FHUYHV6J.js +89 -0
  44. package/dist/chunk-FNEUOBCV.cjs +174 -0
  45. package/dist/chunk-G7P3ERYF.cjs +478 -0
  46. package/dist/chunk-GA6PBWNT.js +147 -0
  47. package/dist/chunk-GFUZ3MUT.cjs +455 -0
  48. package/dist/chunk-GGW43Q37.cjs +1 -0
  49. package/dist/chunk-GTR5X65M.cjs +27 -0
  50. package/dist/chunk-H4E4HDEP.cjs +13 -0
  51. package/dist/chunk-H7DS4IO7.js +198 -0
  52. package/dist/chunk-HDVVZG4S.cjs +198 -0
  53. package/dist/chunk-IKJVLJKT.js +151 -0
  54. package/dist/chunk-J3MB4PI5.cjs +531 -0
  55. package/dist/chunk-K72UDPVN.js +119 -0
  56. package/dist/chunk-KCMYU7WF.js +86 -0
  57. package/dist/chunk-LRN3RNDO.js +940 -0
  58. package/dist/chunk-LTX6TB5I.js +124 -0
  59. package/dist/chunk-LUPCPLND.cjs +145 -0
  60. package/dist/chunk-M63GFNKV.js +194 -0
  61. package/dist/chunk-N3KTZMPG.js +293 -0
  62. package/dist/chunk-NCTOTTVW.js +13 -0
  63. package/dist/chunk-NWGLP6JX.cjs +410 -0
  64. package/dist/chunk-R73XQK7X.cjs +314 -0
  65. package/dist/chunk-RU7JCMWC.cjs +881 -0
  66. package/dist/chunk-SNIHUKDA.cjs +184 -0
  67. package/dist/chunk-T5FV5F7A.cjs +607 -0
  68. package/dist/chunk-TDTUAIFF.cjs +153 -0
  69. package/dist/chunk-TJ74XVZN.cjs +431 -0
  70. package/dist/chunk-TK44VBIE.cjs +194 -0
  71. package/dist/chunk-UAWBAD4E.cjs +346 -0
  72. package/dist/chunk-UFTCTTKK.js +381 -0
  73. package/dist/chunk-WDDXU3OH.cjs +67 -0
  74. package/dist/chunk-WFEMJCXO.cjs +13 -0
  75. package/dist/chunk-WHJTBTYM.js +0 -0
  76. package/dist/{chunk-2KXQATVL.js → chunk-WKCQ6VGW.js} +59 -55
  77. package/dist/chunk-XFPQFCEK.js +455 -0
  78. package/dist/chunk-XSQPVDFH.cjs +60 -0
  79. package/dist/chunk-XTC2SLFT.js +153 -0
  80. package/dist/chunk-XV735BSA.cjs +366 -0
  81. package/dist/chunk-XWNG2U4K.cjs +124 -0
  82. package/dist/chunk-YGYYJ3LQ.js +314 -0
  83. package/dist/chunk-YVHT2UVW.js +74 -0
  84. package/dist/chunk-ZFOOJK37.cjs +86 -0
  85. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  86. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  87. package/dist/components/accordion/index.cjs +35 -0
  88. package/dist/components/accordion/index.d.cts +299 -0
  89. package/dist/components/accordion/index.d.ts +299 -0
  90. package/dist/components/accordion/index.js +35 -0
  91. package/dist/components/alert/index.cjs +20 -0
  92. package/dist/components/alert/index.d.cts +169 -0
  93. package/dist/components/alert/index.d.ts +169 -0
  94. package/dist/components/alert/index.js +20 -0
  95. package/dist/components/avatar/index.cjs +16 -0
  96. package/dist/components/avatar/index.d.cts +131 -0
  97. package/dist/components/avatar/index.d.ts +131 -0
  98. package/dist/components/avatar/index.js +16 -0
  99. package/dist/components/badge/index.cjs +15 -0
  100. package/dist/components/badge/index.d.cts +157 -0
  101. package/dist/components/badge/index.d.ts +157 -0
  102. package/dist/components/badge/index.js +15 -0
  103. package/dist/components/button/index.cjs +22 -0
  104. package/dist/components/button/index.d.cts +613 -0
  105. package/dist/components/button/index.d.ts +613 -0
  106. package/dist/components/button/index.js +22 -0
  107. package/dist/components/card/index.cjs +22 -0
  108. package/dist/components/card/index.d.cts +620 -0
  109. package/dist/components/card/index.d.ts +620 -0
  110. package/dist/components/card/index.js +22 -0
  111. package/dist/components/checkbox/index.cjs +26 -0
  112. package/dist/components/checkbox/index.d.cts +1136 -0
  113. package/dist/components/checkbox/index.d.ts +1136 -0
  114. package/dist/components/checkbox/index.js +26 -0
  115. package/dist/components/chip/index.cjs +20 -0
  116. package/dist/components/chip/index.d.cts +608 -0
  117. package/dist/components/chip/index.d.ts +608 -0
  118. package/dist/components/chip/index.js +20 -0
  119. package/dist/components/divider/index.cjs +13 -0
  120. package/dist/components/divider/index.d.cts +117 -0
  121. package/dist/components/divider/index.d.ts +117 -0
  122. package/dist/components/divider/index.js +13 -0
  123. package/dist/components/field-group/index.cjs +27 -0
  124. package/dist/components/field-group/index.d.cts +270 -0
  125. package/dist/components/field-group/index.d.ts +270 -0
  126. package/dist/components/field-group/index.js +27 -0
  127. package/dist/components/input-otp/index.cjs +29 -0
  128. package/dist/components/input-otp/index.d.cts +325 -0
  129. package/dist/components/input-otp/index.d.ts +325 -0
  130. package/dist/components/input-otp/index.js +29 -0
  131. package/dist/components/menu/index.cjs +49 -0
  132. package/dist/components/menu/index.d.cts +351 -0
  133. package/dist/components/menu/index.d.ts +351 -0
  134. package/dist/components/menu/index.js +49 -0
  135. package/dist/components/popover/index.cjs +38 -0
  136. package/dist/components/popover/index.d.cts +254 -0
  137. package/dist/components/popover/index.d.ts +254 -0
  138. package/dist/components/popover/index.js +38 -0
  139. package/dist/components/radio/index.cjs +26 -0
  140. package/dist/components/radio/index.d.cts +1102 -0
  141. package/dist/components/radio/index.d.ts +1102 -0
  142. package/dist/components/radio/index.js +26 -0
  143. package/dist/components/select/index.cjs +50 -0
  144. package/dist/components/select/index.d.cts +498 -0
  145. package/dist/components/select/index.d.ts +498 -0
  146. package/dist/components/select/index.js +50 -0
  147. package/dist/components/skeleton/index.cjs +11 -0
  148. package/dist/components/skeleton/index.d.cts +111 -0
  149. package/dist/components/skeleton/index.d.ts +111 -0
  150. package/dist/components/skeleton/index.js +11 -0
  151. package/dist/components/spinner/index.cjs +17 -0
  152. package/dist/components/spinner/index.d.cts +104 -0
  153. package/dist/components/spinner/index.d.ts +104 -0
  154. package/dist/components/spinner/index.js +17 -0
  155. package/dist/components/switch/index.cjs +27 -0
  156. package/dist/components/switch/index.d.cts +1154 -0
  157. package/dist/components/switch/index.d.ts +1154 -0
  158. package/dist/components/switch/index.js +27 -0
  159. package/dist/components/text-area/index.cjs +14 -0
  160. package/dist/components/text-area/index.d.cts +73 -0
  161. package/dist/components/text-area/index.d.ts +73 -0
  162. package/dist/components/text-area/index.js +14 -0
  163. package/dist/components/text-field/index.cjs +25 -0
  164. package/dist/components/text-field/index.d.cts +205 -0
  165. package/dist/components/text-field/index.d.ts +205 -0
  166. package/dist/components/text-field/index.js +25 -0
  167. package/dist/components/typography/index.cjs +15 -0
  168. package/dist/components/typography/index.d.cts +116 -0
  169. package/dist/components/typography/index.d.ts +116 -0
  170. package/dist/components/typography/index.js +15 -0
  171. package/dist/components/view/index.cjs +17 -0
  172. package/dist/components/view/index.d.cts +152 -0
  173. package/dist/components/view/index.d.ts +152 -0
  174. package/dist/components/view/index.js +17 -0
  175. package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
  176. package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
  177. package/dist/icon.type-Kml72iSz.d.ts +73 -0
  178. package/dist/icon.type-d_i9ma-i.d.cts +73 -0
  179. package/dist/index.cjs +400 -4
  180. package/dist/index.d.cts +118 -4
  181. package/dist/index.d.ts +118 -4
  182. package/dist/index.js +423 -27
  183. package/dist/placement-DHa0Rrh1.d.cts +38 -0
  184. package/dist/placement-DHa0Rrh1.d.ts +38 -0
  185. package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
  186. package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
  187. package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
  188. package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
  189. package/dist/system/index.cjs +73 -4
  190. package/dist/system/index.d.cts +379 -193
  191. package/dist/system/index.d.ts +379 -193
  192. package/dist/system/index.js +87 -18
  193. package/dist/text-field.type-0l73acce.d.ts +167 -0
  194. package/dist/text-field.type-DBh06DU5.d.cts +167 -0
  195. package/dist/theme/index.cjs +5 -3
  196. package/dist/theme/index.d.cts +55 -24
  197. package/dist/theme/index.d.ts +55 -24
  198. package/dist/theme/index.js +4 -2
  199. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  200. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  201. package/package.json +254 -18
  202. package/dist/chunk-ECDWSSHJ.js +0 -688
  203. package/dist/chunk-IYFGO523.cjs +0 -688
@@ -0,0 +1,325 @@
1
+ import * as react from 'react';
2
+ import { RefObject, ReactNode } from 'react';
3
+ import * as react_native from 'react-native';
4
+ import { StyleProp, ViewStyle, TextStyle, TextInput, ViewProps, TextProps, TextInputProps } from 'react-native';
5
+ import { V as ViewStyleProps, T as TextStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
6
+ import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
7
+ import { R as Recipe, S as SlotStyles, a as StyleFn } from '../../create-recipe-dC7wMfnj.cjs';
8
+
9
+ /**
10
+ * The two decisions this component makes that are worth pinning down: which box shows
11
+ * what, and what survives a paste. Both are pure string work, so they live here and are
12
+ * tested — the component around them is verified by its demo screen like every other.
13
+ */
14
+ /** What one box knows about itself. The slots read it; nothing else does. */
15
+ type OTPSlotState = {
16
+ index: number;
17
+ /** The character typed here, or `null` while the box is empty. */
18
+ char: string | null;
19
+ /** The placeholder for this box, or `null` when a char or the caret takes the room. */
20
+ placeholderChar: string | null;
21
+ /** The box the next character will land in. Only ever one, and only while focused. */
22
+ isActive: boolean;
23
+ /** Active **and** empty: a caret over a character would sit on top of it. */
24
+ isCaretVisible: boolean;
25
+ };
26
+ type BuildSlotsArgs = {
27
+ value: string;
28
+ maxLength: number;
29
+ isFocused: boolean;
30
+ /** One character per box, or a single character repeated across all of them. */
31
+ placeholder?: string;
32
+ };
33
+ /**
34
+ * The boxes, from the value. One pass, no state: what a box shows is a function of the
35
+ * value's length and where the caret is, and deriving it is what keeps a paste, a
36
+ * backspace and a keystroke from each needing their own update path.
37
+ *
38
+ * The active box is the one **after** the last character — `value.length` — which is
39
+ * also why a full value has no active box: there is nowhere left to type.
40
+ */
41
+ declare function buildSlots({ value, maxLength, isFocused, placeholder, }: BuildSlotsArgs): OTPSlotState[];
42
+ /**
43
+ * The code inside whatever the platform handed us on paste.
44
+ *
45
+ * A one-time code arrives surrounded by prose far more often than alone — "Your code is
46
+ * 482913, it expires in 10 minutes" — and the naïve `slice(0, maxLength)` takes "Your c".
47
+ * This looks for a run of exactly `maxLength` digits with no digit on either side, which
48
+ * is what rules out the "10" in that sentence and the year in a date.
49
+ *
50
+ * Returns `''` when nothing matches, so a paste of unrelated text clears nothing and
51
+ * fills nothing.
52
+ */
53
+ declare function extractPastedCode(pasted: string, maxLength: number): string;
54
+ /** The three patterns a one-time code is normally restricted to. */
55
+ declare const OTP_DIGITS = "^\\d+$";
56
+ declare const OTP_LETTERS = "^[a-zA-Z]+$";
57
+ declare const OTP_ALPHANUMERIC = "^[a-zA-Z0-9]+$";
58
+
59
+ type InputOTPSlot = 'root' | 'group' | 'box' | 'value' | 'placeholder' | 'caret' | 'separator';
60
+ /**
61
+ * Three of the `Input`'s four levels — a one-time code is a field, and a box of it is a
62
+ * field one character wide. `primary` is the `fieldBackground` fill plus the theme's
63
+ * `field` shadow, `secondary` the neutral fill and the default here, `tertiary` the border
64
+ * alone.
65
+ *
66
+ * **No `ghost`**, where the `Input` has one, and it is the shape of the component that
67
+ * removes it: an input is one wide field whose position the caret and the label already
68
+ * give away, so it survives having neither fill nor edge. A code is *six* boxes, and their
69
+ * only job before anything is typed is to say **how many characters are expected and where
70
+ * they go**. With no fill and no border there is nothing to count. It is the reason the
71
+ * `Checkbox` has no `ghost` either — a box that is not a box is not a box.
72
+ *
73
+ * HeroUI splits their OTP slot the same two ways their input is split, and they reach for
74
+ * the `field` shadow on `primary` here explicitly — which is the same reading our `Input`
75
+ * takes.
76
+ */
77
+ type InputOTPVariant = 'primary' | 'secondary' | 'tertiary';
78
+ /**
79
+ * Three of the four, and `xs` is the one missing. The box's width is the control height
80
+ * less one spacing step, so `xs` is 28 by 32 — a box that small has to carry an 18pt
81
+ * character to stay legible, and 18 in 28 leaves no room for the two-point active ring
82
+ * without the digit touching it. A code is also the one field a user reads back to
83
+ * themselves character by character, which is the worst place to save eight points.
84
+ *
85
+ * `sm` is the compact size; below it, use fewer boxes rather than smaller ones.
86
+ */
87
+ type InputOTPSize = Exclude<Size, 'xs'>;
88
+ /** What the boxes are allowed to contain. A string is compiled once, per §. */
89
+ type InputOTPPattern = string | RegExp;
90
+ /** What `ref` gives you: the three things only the hidden input can do. */
91
+ type InputOTPHandle = {
92
+ focus: () => void;
93
+ blur: () => void;
94
+ clear: () => void;
95
+ };
96
+ type InputOTPOwnProps = {
97
+ /** How many boxes, and therefore how long the code is. */
98
+ maxLength: number;
99
+ variant?: InputOTPVariant;
100
+ /** The box's height and width, the type inside it, and the gaps. */
101
+ size?: InputOTPSize;
102
+ /** Overrides the `lg` radius the theme chose for every size. */
103
+ radius?: RadiusKey;
104
+ /**
105
+ * A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
106
+ * tokens, and it is also the ring the active box takes — the focus colour is a role
107
+ * like any other.
108
+ */
109
+ color?: string;
110
+ /** Controlled. Leave it out and the component keeps the value itself. */
111
+ value?: string;
112
+ /** The starting value when uncontrolled. */
113
+ defaultValue?: string;
114
+ onChangeText?: (value: string) => void;
115
+ /** Fired once the last box is filled — the only event most callers need. */
116
+ onComplete?: (value: string) => void;
117
+ /**
118
+ * What a box may contain. `OTP_DIGITS`, `OTP_LETTERS` and `OTP_ALPHANUMERIC` are
119
+ * exported for the three usual answers; anything else is your own expression.
120
+ *
121
+ * It is tested against the **whole** value rather than each character, so a pattern
122
+ * that allows a shape rather than a set works too.
123
+ */
124
+ pattern?: InputOTPPattern;
125
+ /**
126
+ * One character per box, or a single character repeated across all of them. Shown only
127
+ * where there is neither a typed character nor the caret.
128
+ */
129
+ placeholder?: string;
130
+ /** Paints the boxes in `danger` and takes the active ring off the accent. */
131
+ isInvalid?: boolean;
132
+ /** Dims the boxes and stops the hidden input. */
133
+ isDisabled?: boolean;
134
+ /** The keyboard the hidden input asks for. @default 'numeric' */
135
+ inputMode?: TextInputProps['inputMode'];
136
+ /**
137
+ * Everything else the hidden `TextInput` should carry — `autoComplete="one-time-code"`,
138
+ * `textContentType`, `onSubmitEditing`. It is a prop rather than a slot because the
139
+ * input is not composed: it is the one node this component owns and hides.
140
+ */
141
+ textInputProps?: Omit<TextInputProps, 'value' | 'defaultValue' | 'onChangeText' | 'onFocus' | 'onBlur' | 'editable' | 'maxLength' | 'style'>;
142
+ style?: StyleProp<ViewStyle>;
143
+ children?: ReactNode;
144
+ };
145
+ /**
146
+ * R14 — the component's own props, the `Pressable`'s, and every `ViewStyle` key neither
147
+ * already claims.
148
+ *
149
+ * **No `asChild`** (the one root in the library without it, deliberately): this root is
150
+ * not a pass-through container. It owns a hidden `TextInput` that has to be its own
151
+ * child, and `Slot` merges into a *single* element. A caller who wants their own element
152
+ * around the boxes wraps the `InputOTP` instead of replacing it.
153
+ */
154
+ type InputOTPProps = InputOTPOwnProps & Omit<ViewProps, keyof InputOTPOwnProps> & Omit<ViewStyleProps, keyof InputOTPOwnProps | keyof ViewProps>;
155
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
156
+ type InputOTPViewProps = ViewProps & Omit<ViewStyleProps, keyof ViewProps> & {
157
+ children?: ReactNode;
158
+ };
159
+ /**
160
+ * A group takes a render function as well as elements, which is what lets a caller draw
161
+ * `maxLength` boxes without writing them out — the one place in the library where a slot
162
+ * does, because the number of children is data here rather than markup.
163
+ */
164
+ type InputOTPGroupProps = Omit<InputOTPViewProps, 'children'> & {
165
+ children?: ReactNode | ((state: InputOTPRenderState) => ReactNode);
166
+ };
167
+ /** What the render function is handed. Everything the boxes are drawn from. */
168
+ type InputOTPRenderState = {
169
+ slots: readonly OTPSlotState[];
170
+ value: string;
171
+ maxLength: number;
172
+ isFocused: boolean;
173
+ isDisabled: boolean;
174
+ isInvalid: boolean;
175
+ };
176
+ type InputOTPBoxProps = Omit<InputOTPViewProps, 'children'> & {
177
+ /** Which box this is. It is what the root's state is read by. */
178
+ index: number;
179
+ /** Replaces the value, the placeholder and the caret with your own. */
180
+ children?: ReactNode;
181
+ };
182
+ type InputOTPSeparatorProps = InputOTPViewProps;
183
+ /** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
184
+ type InputOTPTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
185
+ children?: ReactNode;
186
+ };
187
+ type InputOTPValueProps = InputOTPTextProps;
188
+ type InputOTPPlaceholderProps = InputOTPTextProps;
189
+ type InputOTPCaretOwnProps = {
190
+ /** `false` stops the blink. The bar stays, so nothing moves. */
191
+ animation?: boolean;
192
+ style?: StyleProp<ViewStyle>;
193
+ };
194
+ type InputOTPCaretProps = InputOTPCaretOwnProps & Omit<ViewStyleProps, keyof InputOTPCaretOwnProps>;
195
+ /**
196
+ * R5 — resolved styles, not props for a slot to resolve a second time.
197
+ *
198
+ * The box comes in two, because exactly one box is active at a time and a slot that
199
+ * resolved its own would be re-running the recipe per box. The root resolves both once —
200
+ * two cache reads — and each box picks the reference that applies to it.
201
+ */
202
+ type InputOTPContextValue = {
203
+ groupStyle: StyleProp<ViewStyle>;
204
+ boxStyle: StyleProp<ViewStyle>;
205
+ boxActiveStyle: StyleProp<ViewStyle>;
206
+ valueStyle: StyleProp<TextStyle>;
207
+ placeholderStyle: StyleProp<TextStyle>;
208
+ caretStyle: StyleProp<ViewStyle>;
209
+ separatorStyle: StyleProp<ViewStyle>;
210
+ slots: readonly OTPSlotState[];
211
+ value: string;
212
+ maxLength: number;
213
+ isFocused: boolean;
214
+ isDisabled: boolean;
215
+ isInvalid: boolean;
216
+ /** So a custom box, or a "change number" link, can put the caret back. */
217
+ inputRef: RefObject<TextInput | null>;
218
+ };
219
+ /** What one box publishes to whatever it contains. */
220
+ type InputOTPBoxContextValue = {
221
+ slot: OTPSlotState | undefined;
222
+ };
223
+
224
+ /**
225
+ * The bar in the box the next character lands in.
226
+ *
227
+ * It is ours rather than the platform's: the real caret belongs to the hidden input,
228
+ * which is stretched across the whole row, so it would sit wherever the invisible text
229
+ * happens to end rather than in the box the reader is looking at. `caretHidden` on that
230
+ * input is the other half of the same decision.
231
+ *
232
+ * It renders only while its box is active **and** empty — a bar over a character would
233
+ * cross it out.
234
+ */
235
+ declare function InputOTPCaret({ style, animation, ...props }: InputOTPCaretProps): react.JSX.Element | null;
236
+ declare namespace InputOTPCaret {
237
+ var displayName: string;
238
+ }
239
+
240
+ declare const useInputOTP: () => InputOTPContextValue;
241
+ declare const useInputOTPBox: () => InputOTPBoxContextValue;
242
+
243
+ declare const inputOTPRecipe: Recipe<"value" | "separator" | "root" | "group" | "box" | "placeholder" | "caret", InputOTPVariant, {
244
+ readonly size: {
245
+ readonly sm: (theme: XAUITheme) => SlotStyles<InputOTPSlot>;
246
+ readonly md: (theme: XAUITheme) => SlotStyles<InputOTPSlot>;
247
+ readonly lg: (theme: XAUITheme) => SlotStyles<InputOTPSlot>;
248
+ };
249
+ readonly radius: Record<RadiusKey, StyleFn<"box">>;
250
+ /**
251
+ * Declared after `size` and before the states, so a code that is wrong stays wrong
252
+ * under the finger: the ring below reads `borderFocus`, and the root hands it the
253
+ * danger colour by suppressing the active state and painting every box instead.
254
+ */
255
+ readonly isInvalid: {
256
+ readonly true: (theme: XAUITheme) => {
257
+ box: {
258
+ borderColor: string;
259
+ borderWidth: number;
260
+ };
261
+ };
262
+ };
263
+ }>;
264
+
265
+ declare const InputOTP: react.ForwardRefExoticComponent<{
266
+ maxLength: number;
267
+ variant?: InputOTPVariant;
268
+ size?: InputOTPSize;
269
+ radius?: RadiusKey;
270
+ color?: string;
271
+ value?: string;
272
+ defaultValue?: string;
273
+ onChangeText?: (value: string) => void;
274
+ onComplete?: (value: string) => void;
275
+ pattern?: InputOTPPattern;
276
+ placeholder?: string;
277
+ isInvalid?: boolean;
278
+ isDisabled?: boolean;
279
+ inputMode?: react_native.TextInputProps["inputMode"];
280
+ textInputProps?: Omit<react_native.TextInputProps, "value" | "defaultValue" | "onChangeText" | "onFocus" | "onBlur" | "editable" | "maxLength" | "style">;
281
+ style?: react_native.StyleProp<react_native.ViewStyle>;
282
+ children?: react.ReactNode;
283
+ } & Omit<react_native.ViewProps, keyof {
284
+ maxLength: number;
285
+ variant?: InputOTPVariant;
286
+ size?: InputOTPSize;
287
+ radius?: RadiusKey;
288
+ color?: string;
289
+ value?: string;
290
+ defaultValue?: string;
291
+ onChangeText?: (value: string) => void;
292
+ onComplete?: (value: string) => void;
293
+ pattern?: InputOTPPattern;
294
+ placeholder?: string;
295
+ isInvalid?: boolean;
296
+ isDisabled?: boolean;
297
+ inputMode?: react_native.TextInputProps["inputMode"];
298
+ textInputProps?: Omit<react_native.TextInputProps, "value" | "defaultValue" | "onChangeText" | "onFocus" | "onBlur" | "editable" | "maxLength" | "style">;
299
+ style?: react_native.StyleProp<react_native.ViewStyle>;
300
+ children?: react.ReactNode;
301
+ }> & Omit<ViewStyleProps, "color" | "value" | "pointerEvents" | "style" | "children" | "size" | "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" | "pattern" | "variant" | "radius" | "defaultValue" | "isDisabled" | "isInvalid" | "placeholder" | "inputMode" | "maxLength" | "onChangeText" | "onComplete" | "textInputProps"> & react.RefAttributes<InputOTPHandle>> & {
302
+ Group: react.ForwardRefExoticComponent<Omit<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
303
+ children?: react.ReactNode;
304
+ }, "children"> & {
305
+ children?: react.ReactNode | ((state: InputOTPRenderState) => react.ReactNode);
306
+ } & react.RefAttributes<react_native.View>>;
307
+ Box: react.ForwardRefExoticComponent<Omit<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
308
+ children?: react.ReactNode;
309
+ }, "children"> & {
310
+ index: number;
311
+ children?: react.ReactNode;
312
+ } & react.RefAttributes<react_native.View>>;
313
+ Value: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
314
+ children?: react.ReactNode;
315
+ } & react.RefAttributes<react_native.Text>>;
316
+ Placeholder: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
317
+ children?: react.ReactNode;
318
+ } & react.RefAttributes<react_native.Text>>;
319
+ Caret: typeof InputOTPCaret;
320
+ Separator: react.ForwardRefExoticComponent<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
321
+ children?: react.ReactNode;
322
+ } & react.RefAttributes<react_native.View>>;
323
+ };
324
+
325
+ export { InputOTP, type InputOTPBoxContextValue, type InputOTPBoxProps, type InputOTPCaretProps, type InputOTPContextValue, type InputOTPGroupProps, type InputOTPHandle, type InputOTPPattern, type InputOTPPlaceholderProps, type InputOTPProps, type InputOTPRenderState, type InputOTPSeparatorProps, type InputOTPSize, type InputOTPSlot, type InputOTPValueProps, type InputOTPVariant, type OTPSlotState, OTP_ALPHANUMERIC, OTP_DIGITS, OTP_LETTERS, buildSlots, extractPastedCode, inputOTPRecipe, useInputOTP, useInputOTPBox };
@@ -0,0 +1,325 @@
1
+ import * as react from 'react';
2
+ import { RefObject, ReactNode } from 'react';
3
+ import * as react_native from 'react-native';
4
+ import { StyleProp, ViewStyle, TextStyle, TextInput, ViewProps, TextProps, TextInputProps } from 'react-native';
5
+ import { V as ViewStyleProps, T as TextStyleProps } from '../../style-props.type-CfnoGEP7.js';
6
+ import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
7
+ import { R as Recipe, S as SlotStyles, a as StyleFn } from '../../create-recipe-BdVd2ffi.js';
8
+
9
+ /**
10
+ * The two decisions this component makes that are worth pinning down: which box shows
11
+ * what, and what survives a paste. Both are pure string work, so they live here and are
12
+ * tested — the component around them is verified by its demo screen like every other.
13
+ */
14
+ /** What one box knows about itself. The slots read it; nothing else does. */
15
+ type OTPSlotState = {
16
+ index: number;
17
+ /** The character typed here, or `null` while the box is empty. */
18
+ char: string | null;
19
+ /** The placeholder for this box, or `null` when a char or the caret takes the room. */
20
+ placeholderChar: string | null;
21
+ /** The box the next character will land in. Only ever one, and only while focused. */
22
+ isActive: boolean;
23
+ /** Active **and** empty: a caret over a character would sit on top of it. */
24
+ isCaretVisible: boolean;
25
+ };
26
+ type BuildSlotsArgs = {
27
+ value: string;
28
+ maxLength: number;
29
+ isFocused: boolean;
30
+ /** One character per box, or a single character repeated across all of them. */
31
+ placeholder?: string;
32
+ };
33
+ /**
34
+ * The boxes, from the value. One pass, no state: what a box shows is a function of the
35
+ * value's length and where the caret is, and deriving it is what keeps a paste, a
36
+ * backspace and a keystroke from each needing their own update path.
37
+ *
38
+ * The active box is the one **after** the last character — `value.length` — which is
39
+ * also why a full value has no active box: there is nowhere left to type.
40
+ */
41
+ declare function buildSlots({ value, maxLength, isFocused, placeholder, }: BuildSlotsArgs): OTPSlotState[];
42
+ /**
43
+ * The code inside whatever the platform handed us on paste.
44
+ *
45
+ * A one-time code arrives surrounded by prose far more often than alone — "Your code is
46
+ * 482913, it expires in 10 minutes" — and the naïve `slice(0, maxLength)` takes "Your c".
47
+ * This looks for a run of exactly `maxLength` digits with no digit on either side, which
48
+ * is what rules out the "10" in that sentence and the year in a date.
49
+ *
50
+ * Returns `''` when nothing matches, so a paste of unrelated text clears nothing and
51
+ * fills nothing.
52
+ */
53
+ declare function extractPastedCode(pasted: string, maxLength: number): string;
54
+ /** The three patterns a one-time code is normally restricted to. */
55
+ declare const OTP_DIGITS = "^\\d+$";
56
+ declare const OTP_LETTERS = "^[a-zA-Z]+$";
57
+ declare const OTP_ALPHANUMERIC = "^[a-zA-Z0-9]+$";
58
+
59
+ type InputOTPSlot = 'root' | 'group' | 'box' | 'value' | 'placeholder' | 'caret' | 'separator';
60
+ /**
61
+ * Three of the `Input`'s four levels — a one-time code is a field, and a box of it is a
62
+ * field one character wide. `primary` is the `fieldBackground` fill plus the theme's
63
+ * `field` shadow, `secondary` the neutral fill and the default here, `tertiary` the border
64
+ * alone.
65
+ *
66
+ * **No `ghost`**, where the `Input` has one, and it is the shape of the component that
67
+ * removes it: an input is one wide field whose position the caret and the label already
68
+ * give away, so it survives having neither fill nor edge. A code is *six* boxes, and their
69
+ * only job before anything is typed is to say **how many characters are expected and where
70
+ * they go**. With no fill and no border there is nothing to count. It is the reason the
71
+ * `Checkbox` has no `ghost` either — a box that is not a box is not a box.
72
+ *
73
+ * HeroUI splits their OTP slot the same two ways their input is split, and they reach for
74
+ * the `field` shadow on `primary` here explicitly — which is the same reading our `Input`
75
+ * takes.
76
+ */
77
+ type InputOTPVariant = 'primary' | 'secondary' | 'tertiary';
78
+ /**
79
+ * Three of the four, and `xs` is the one missing. The box's width is the control height
80
+ * less one spacing step, so `xs` is 28 by 32 — a box that small has to carry an 18pt
81
+ * character to stay legible, and 18 in 28 leaves no room for the two-point active ring
82
+ * without the digit touching it. A code is also the one field a user reads back to
83
+ * themselves character by character, which is the worst place to save eight points.
84
+ *
85
+ * `sm` is the compact size; below it, use fewer boxes rather than smaller ones.
86
+ */
87
+ type InputOTPSize = Exclude<Size, 'xs'>;
88
+ /** What the boxes are allowed to contain. A string is compiled once, per §. */
89
+ type InputOTPPattern = string | RegExp;
90
+ /** What `ref` gives you: the three things only the hidden input can do. */
91
+ type InputOTPHandle = {
92
+ focus: () => void;
93
+ blur: () => void;
94
+ clear: () => void;
95
+ };
96
+ type InputOTPOwnProps = {
97
+ /** How many boxes, and therefore how long the code is. */
98
+ maxLength: number;
99
+ variant?: InputOTPVariant;
100
+ /** The box's height and width, the type inside it, and the gaps. */
101
+ size?: InputOTPSize;
102
+ /** Overrides the `lg` radius the theme chose for every size. */
103
+ radius?: RadiusKey;
104
+ /**
105
+ * A raw tint (`'#7c3aed'`), never a token (R7). It lands where the variant put its
106
+ * tokens, and it is also the ring the active box takes — the focus colour is a role
107
+ * like any other.
108
+ */
109
+ color?: string;
110
+ /** Controlled. Leave it out and the component keeps the value itself. */
111
+ value?: string;
112
+ /** The starting value when uncontrolled. */
113
+ defaultValue?: string;
114
+ onChangeText?: (value: string) => void;
115
+ /** Fired once the last box is filled — the only event most callers need. */
116
+ onComplete?: (value: string) => void;
117
+ /**
118
+ * What a box may contain. `OTP_DIGITS`, `OTP_LETTERS` and `OTP_ALPHANUMERIC` are
119
+ * exported for the three usual answers; anything else is your own expression.
120
+ *
121
+ * It is tested against the **whole** value rather than each character, so a pattern
122
+ * that allows a shape rather than a set works too.
123
+ */
124
+ pattern?: InputOTPPattern;
125
+ /**
126
+ * One character per box, or a single character repeated across all of them. Shown only
127
+ * where there is neither a typed character nor the caret.
128
+ */
129
+ placeholder?: string;
130
+ /** Paints the boxes in `danger` and takes the active ring off the accent. */
131
+ isInvalid?: boolean;
132
+ /** Dims the boxes and stops the hidden input. */
133
+ isDisabled?: boolean;
134
+ /** The keyboard the hidden input asks for. @default 'numeric' */
135
+ inputMode?: TextInputProps['inputMode'];
136
+ /**
137
+ * Everything else the hidden `TextInput` should carry — `autoComplete="one-time-code"`,
138
+ * `textContentType`, `onSubmitEditing`. It is a prop rather than a slot because the
139
+ * input is not composed: it is the one node this component owns and hides.
140
+ */
141
+ textInputProps?: Omit<TextInputProps, 'value' | 'defaultValue' | 'onChangeText' | 'onFocus' | 'onBlur' | 'editable' | 'maxLength' | 'style'>;
142
+ style?: StyleProp<ViewStyle>;
143
+ children?: ReactNode;
144
+ };
145
+ /**
146
+ * R14 — the component's own props, the `Pressable`'s, and every `ViewStyle` key neither
147
+ * already claims.
148
+ *
149
+ * **No `asChild`** (the one root in the library without it, deliberately): this root is
150
+ * not a pass-through container. It owns a hidden `TextInput` that has to be its own
151
+ * child, and `Slot` merges into a *single* element. A caller who wants their own element
152
+ * around the boxes wraps the `InputOTP` instead of replacing it.
153
+ */
154
+ type InputOTPProps = InputOTPOwnProps & Omit<ViewProps, keyof InputOTPOwnProps> & Omit<ViewStyleProps, keyof InputOTPOwnProps | keyof ViewProps>;
155
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
156
+ type InputOTPViewProps = ViewProps & Omit<ViewStyleProps, keyof ViewProps> & {
157
+ children?: ReactNode;
158
+ };
159
+ /**
160
+ * A group takes a render function as well as elements, which is what lets a caller draw
161
+ * `maxLength` boxes without writing them out — the one place in the library where a slot
162
+ * does, because the number of children is data here rather than markup.
163
+ */
164
+ type InputOTPGroupProps = Omit<InputOTPViewProps, 'children'> & {
165
+ children?: ReactNode | ((state: InputOTPRenderState) => ReactNode);
166
+ };
167
+ /** What the render function is handed. Everything the boxes are drawn from. */
168
+ type InputOTPRenderState = {
169
+ slots: readonly OTPSlotState[];
170
+ value: string;
171
+ maxLength: number;
172
+ isFocused: boolean;
173
+ isDisabled: boolean;
174
+ isInvalid: boolean;
175
+ };
176
+ type InputOTPBoxProps = Omit<InputOTPViewProps, 'children'> & {
177
+ /** Which box this is. It is what the root's state is read by. */
178
+ index: number;
179
+ /** Replaces the value, the placeholder and the caret with your own. */
180
+ children?: ReactNode;
181
+ };
182
+ type InputOTPSeparatorProps = InputOTPViewProps;
183
+ /** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
184
+ type InputOTPTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
185
+ children?: ReactNode;
186
+ };
187
+ type InputOTPValueProps = InputOTPTextProps;
188
+ type InputOTPPlaceholderProps = InputOTPTextProps;
189
+ type InputOTPCaretOwnProps = {
190
+ /** `false` stops the blink. The bar stays, so nothing moves. */
191
+ animation?: boolean;
192
+ style?: StyleProp<ViewStyle>;
193
+ };
194
+ type InputOTPCaretProps = InputOTPCaretOwnProps & Omit<ViewStyleProps, keyof InputOTPCaretOwnProps>;
195
+ /**
196
+ * R5 — resolved styles, not props for a slot to resolve a second time.
197
+ *
198
+ * The box comes in two, because exactly one box is active at a time and a slot that
199
+ * resolved its own would be re-running the recipe per box. The root resolves both once —
200
+ * two cache reads — and each box picks the reference that applies to it.
201
+ */
202
+ type InputOTPContextValue = {
203
+ groupStyle: StyleProp<ViewStyle>;
204
+ boxStyle: StyleProp<ViewStyle>;
205
+ boxActiveStyle: StyleProp<ViewStyle>;
206
+ valueStyle: StyleProp<TextStyle>;
207
+ placeholderStyle: StyleProp<TextStyle>;
208
+ caretStyle: StyleProp<ViewStyle>;
209
+ separatorStyle: StyleProp<ViewStyle>;
210
+ slots: readonly OTPSlotState[];
211
+ value: string;
212
+ maxLength: number;
213
+ isFocused: boolean;
214
+ isDisabled: boolean;
215
+ isInvalid: boolean;
216
+ /** So a custom box, or a "change number" link, can put the caret back. */
217
+ inputRef: RefObject<TextInput | null>;
218
+ };
219
+ /** What one box publishes to whatever it contains. */
220
+ type InputOTPBoxContextValue = {
221
+ slot: OTPSlotState | undefined;
222
+ };
223
+
224
+ /**
225
+ * The bar in the box the next character lands in.
226
+ *
227
+ * It is ours rather than the platform's: the real caret belongs to the hidden input,
228
+ * which is stretched across the whole row, so it would sit wherever the invisible text
229
+ * happens to end rather than in the box the reader is looking at. `caretHidden` on that
230
+ * input is the other half of the same decision.
231
+ *
232
+ * It renders only while its box is active **and** empty — a bar over a character would
233
+ * cross it out.
234
+ */
235
+ declare function InputOTPCaret({ style, animation, ...props }: InputOTPCaretProps): react.JSX.Element | null;
236
+ declare namespace InputOTPCaret {
237
+ var displayName: string;
238
+ }
239
+
240
+ declare const useInputOTP: () => InputOTPContextValue;
241
+ declare const useInputOTPBox: () => InputOTPBoxContextValue;
242
+
243
+ declare const inputOTPRecipe: Recipe<"value" | "separator" | "root" | "group" | "box" | "placeholder" | "caret", InputOTPVariant, {
244
+ readonly size: {
245
+ readonly sm: (theme: XAUITheme) => SlotStyles<InputOTPSlot>;
246
+ readonly md: (theme: XAUITheme) => SlotStyles<InputOTPSlot>;
247
+ readonly lg: (theme: XAUITheme) => SlotStyles<InputOTPSlot>;
248
+ };
249
+ readonly radius: Record<RadiusKey, StyleFn<"box">>;
250
+ /**
251
+ * Declared after `size` and before the states, so a code that is wrong stays wrong
252
+ * under the finger: the ring below reads `borderFocus`, and the root hands it the
253
+ * danger colour by suppressing the active state and painting every box instead.
254
+ */
255
+ readonly isInvalid: {
256
+ readonly true: (theme: XAUITheme) => {
257
+ box: {
258
+ borderColor: string;
259
+ borderWidth: number;
260
+ };
261
+ };
262
+ };
263
+ }>;
264
+
265
+ declare const InputOTP: react.ForwardRefExoticComponent<{
266
+ maxLength: number;
267
+ variant?: InputOTPVariant;
268
+ size?: InputOTPSize;
269
+ radius?: RadiusKey;
270
+ color?: string;
271
+ value?: string;
272
+ defaultValue?: string;
273
+ onChangeText?: (value: string) => void;
274
+ onComplete?: (value: string) => void;
275
+ pattern?: InputOTPPattern;
276
+ placeholder?: string;
277
+ isInvalid?: boolean;
278
+ isDisabled?: boolean;
279
+ inputMode?: react_native.TextInputProps["inputMode"];
280
+ textInputProps?: Omit<react_native.TextInputProps, "value" | "defaultValue" | "onChangeText" | "onFocus" | "onBlur" | "editable" | "maxLength" | "style">;
281
+ style?: react_native.StyleProp<react_native.ViewStyle>;
282
+ children?: react.ReactNode;
283
+ } & Omit<react_native.ViewProps, keyof {
284
+ maxLength: number;
285
+ variant?: InputOTPVariant;
286
+ size?: InputOTPSize;
287
+ radius?: RadiusKey;
288
+ color?: string;
289
+ value?: string;
290
+ defaultValue?: string;
291
+ onChangeText?: (value: string) => void;
292
+ onComplete?: (value: string) => void;
293
+ pattern?: InputOTPPattern;
294
+ placeholder?: string;
295
+ isInvalid?: boolean;
296
+ isDisabled?: boolean;
297
+ inputMode?: react_native.TextInputProps["inputMode"];
298
+ textInputProps?: Omit<react_native.TextInputProps, "value" | "defaultValue" | "onChangeText" | "onFocus" | "onBlur" | "editable" | "maxLength" | "style">;
299
+ style?: react_native.StyleProp<react_native.ViewStyle>;
300
+ children?: react.ReactNode;
301
+ }> & Omit<ViewStyleProps, "color" | "value" | "pointerEvents" | "style" | "children" | "size" | "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" | "pattern" | "variant" | "radius" | "defaultValue" | "isDisabled" | "isInvalid" | "placeholder" | "inputMode" | "maxLength" | "onChangeText" | "onComplete" | "textInputProps"> & react.RefAttributes<InputOTPHandle>> & {
302
+ Group: react.ForwardRefExoticComponent<Omit<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
303
+ children?: react.ReactNode;
304
+ }, "children"> & {
305
+ children?: react.ReactNode | ((state: InputOTPRenderState) => react.ReactNode);
306
+ } & react.RefAttributes<react_native.View>>;
307
+ Box: react.ForwardRefExoticComponent<Omit<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
308
+ children?: react.ReactNode;
309
+ }, "children"> & {
310
+ index: number;
311
+ children?: react.ReactNode;
312
+ } & react.RefAttributes<react_native.View>>;
313
+ Value: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
314
+ children?: react.ReactNode;
315
+ } & react.RefAttributes<react_native.Text>>;
316
+ Placeholder: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
317
+ children?: react.ReactNode;
318
+ } & react.RefAttributes<react_native.Text>>;
319
+ Caret: typeof InputOTPCaret;
320
+ Separator: react.ForwardRefExoticComponent<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
321
+ children?: react.ReactNode;
322
+ } & react.RefAttributes<react_native.View>>;
323
+ };
324
+
325
+ export { InputOTP, type InputOTPBoxContextValue, type InputOTPBoxProps, type InputOTPCaretProps, type InputOTPContextValue, type InputOTPGroupProps, type InputOTPHandle, type InputOTPPattern, type InputOTPPlaceholderProps, type InputOTPProps, type InputOTPRenderState, type InputOTPSeparatorProps, type InputOTPSize, type InputOTPSlot, type InputOTPValueProps, type InputOTPVariant, type OTPSlotState, OTP_ALPHANUMERIC, OTP_DIGITS, OTP_LETTERS, buildSlots, extractPastedCode, inputOTPRecipe, useInputOTP, useInputOTPBox };