@r5n/otp-react-native 0.0.0-stage → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -0
- package/LICENSE +21 -0
- package/README.md +227 -2
- package/lib/commonjs/Cell.js +140 -0
- package/lib/commonjs/Cell.js.map +1 -0
- package/lib/commonjs/OtpInput.js +129 -0
- package/lib/commonjs/OtpInput.js.map +1 -0
- package/lib/commonjs/accessibility.js +90 -0
- package/lib/commonjs/accessibility.js.map +1 -0
- package/lib/commonjs/clipboard.js +197 -0
- package/lib/commonjs/clipboard.js.map +1 -0
- package/lib/commonjs/dev.js +63 -0
- package/lib/commonjs/dev.js.map +1 -0
- package/lib/commonjs/hiddenInput.js +95 -0
- package/lib/commonjs/hiddenInput.js.map +1 -0
- package/lib/commonjs/index.js +53 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/legacy.js +218 -0
- package/lib/commonjs/legacy.js.map +1 -0
- package/lib/commonjs/managedProps.js +73 -0
- package/lib/commonjs/managedProps.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types.js +45 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useOtpController.js +70 -0
- package/lib/commonjs/useOtpController.js.map +1 -0
- package/lib/commonjs/useOtpInput.js +251 -0
- package/lib/commonjs/useOtpInput.js.map +1 -0
- package/lib/module/Cell.js +103 -0
- package/lib/module/Cell.js.map +1 -0
- package/lib/module/OtpInput.js +94 -0
- package/lib/module/OtpInput.js.map +1 -0
- package/lib/module/accessibility.js +49 -0
- package/lib/module/accessibility.js.map +1 -0
- package/lib/module/clipboard.js +156 -0
- package/lib/module/clipboard.js.map +1 -0
- package/lib/module/dev.js +22 -0
- package/lib/module/dev.js.map +1 -0
- package/lib/module/hiddenInput.js +54 -0
- package/lib/module/hiddenInput.js.map +1 -0
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/legacy.js +188 -0
- package/lib/module/legacy.js.map +1 -0
- package/lib/module/managedProps.js +32 -0
- package/lib/module/managedProps.js.map +1 -0
- package/lib/module/types.js +3 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useOtpController.js +29 -0
- package/lib/module/useOtpController.js.map +1 -0
- package/lib/module/useOtpInput.js +216 -0
- package/lib/module/useOtpInput.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/Cell.d.ts +39 -0
- package/lib/typescript/commonjs/src/Cell.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/OtpInput.d.ts +12 -0
- package/lib/typescript/commonjs/src/OtpInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/accessibility.d.ts +39 -0
- package/lib/typescript/commonjs/src/accessibility.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/clipboard.d.ts +9 -0
- package/lib/typescript/commonjs/src/clipboard.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dev.d.ts +13 -0
- package/lib/typescript/commonjs/src/dev.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hiddenInput.d.ts +31 -0
- package/lib/typescript/commonjs/src/hiddenInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/legacy.d.ts +78 -0
- package/lib/typescript/commonjs/src/legacy.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/managedProps.d.ts +5 -0
- package/lib/typescript/commonjs/src/managedProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +262 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOtpController.d.ts +28 -0
- package/lib/typescript/commonjs/src/useOtpController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useOtpInput.d.ts +22 -0
- package/lib/typescript/commonjs/src/useOtpInput.d.ts.map +1 -0
- package/lib/typescript/module/src/Cell.d.ts +39 -0
- package/lib/typescript/module/src/Cell.d.ts.map +1 -0
- package/lib/typescript/module/src/OtpInput.d.ts +12 -0
- package/lib/typescript/module/src/OtpInput.d.ts.map +1 -0
- package/lib/typescript/module/src/accessibility.d.ts +39 -0
- package/lib/typescript/module/src/accessibility.d.ts.map +1 -0
- package/lib/typescript/module/src/clipboard.d.ts +9 -0
- package/lib/typescript/module/src/clipboard.d.ts.map +1 -0
- package/lib/typescript/module/src/dev.d.ts +13 -0
- package/lib/typescript/module/src/dev.d.ts.map +1 -0
- package/lib/typescript/module/src/hiddenInput.d.ts +31 -0
- package/lib/typescript/module/src/hiddenInput.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +11 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/legacy.d.ts +78 -0
- package/lib/typescript/module/src/legacy.d.ts.map +1 -0
- package/lib/typescript/module/src/managedProps.d.ts +5 -0
- package/lib/typescript/module/src/managedProps.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +262 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/lib/typescript/module/src/useOtpController.d.ts +28 -0
- package/lib/typescript/module/src/useOtpController.d.ts.map +1 -0
- package/lib/typescript/module/src/useOtpInput.d.ts +22 -0
- package/lib/typescript/module/src/useOtpInput.d.ts.map +1 -0
- package/package.json +93 -4
- package/src/Cell.tsx +146 -0
- package/src/OtpInput.tsx +120 -0
- package/src/accessibility.ts +86 -0
- package/src/clipboard.ts +232 -0
- package/src/dev.ts +33 -0
- package/src/hiddenInput.ts +80 -0
- package/src/index.ts +38 -0
- package/src/legacy.tsx +320 -0
- package/src/managedProps.ts +29 -0
- package/src/types.ts +299 -0
- package/src/useOtpController.ts +58 -0
- package/src/useOtpInput.ts +313 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 8.0.1 (2026-12-03)
|
|
4
|
+
|
|
5
|
+
### 🪨 Fix a crash of the deprecated default export when the clipboard has no getString, and document the clipboard baseline on Android 10 and later
|
|
6
|
+
|
|
7
|
+
<details>
|
|
8
|
+
<summary>Description</summary>
|
|
9
|
+
|
|
10
|
+
**Fixes**
|
|
11
|
+
|
|
12
|
+
- The deprecated default export no longer throws while rendering when `clipboard` is a value without a `getString` function, for example `{}` or a module that failed to load. It is treated as no clipboard, with the existing development warning when `autofillFromClipboard` is set (#269).
|
|
13
|
+
|
|
14
|
+
**Documentation**
|
|
15
|
+
|
|
16
|
+
- Clipboard autofill: an empty first read counts as the baseline, so on Android 10 and later a code copied long before can still be filled in once. The guide now says so, and shows how to switch autofill on from the first focus (#259). This has not been run on an Android 10 device.
|
|
17
|
+
- The migration guide no longer says that the library never dismisses the keyboard: the deprecated default export does, once the code is complete (#304).
|
|
18
|
+
</details>
|
|
19
|
+
|
|
20
|
+
### 🪨 Bug fixes
|
|
21
|
+
|
|
22
|
+
- [`57648ec`](https://github.com/r5n-labs/react-native-otp-inputs/commit/57648ec) fix(otp-react-native): treat a clipboard without getString as none, and document the baseline (#332)
|
|
23
|
+
<details>
|
|
24
|
+
<summary>Details</summary>
|
|
25
|
+
|
|
26
|
+
The deprecated default export bound `clipboard.getString` while rendering, so `clipboard={{}}`
|
|
27
|
+
(untyped callers, or a module that failed to load) threw. Such a value is now no clipboard.
|
|
28
|
+
|
|
29
|
+
Documents that an empty first clipboard read counts as the baseline, so on Android 10 and later a
|
|
30
|
+
code copied long before can still be filled in once, and how to switch autofill on from the first
|
|
31
|
+
focus. Corrects the migration guide, which said the library never dismisses the keyboard: the
|
|
32
|
+
deprecated default export does, once the code is complete.
|
|
33
|
+
|
|
34
|
+
Adds a render-phase warning check for the default export in StrictMode, and a source guard against
|
|
35
|
+
importing a clipboard package. Adds a patch stone for @r5n/otp-react-native.
|
|
36
|
+
</details>
|
|
37
|
+
|
|
38
|
+
## 8.0.0 (2026-12-03)
|
|
39
|
+
|
|
40
|
+
### 🪨 Rewrite on a single native `TextInput` and the headless `@r5n/otp-core`. The v7 component stays available as a deprecated default export. Migration guide: [v7 to v8](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/migration/v7-to-v8.md).
|
|
41
|
+
|
|
42
|
+
<details>
|
|
43
|
+
<summary>Description</summary>
|
|
44
|
+
|
|
45
|
+
**Breaking changes**
|
|
46
|
+
|
|
47
|
+
- The package is renamed from `react-native-otp-inputs` to `@r5n/otp-react-native`: uninstall the old one, install the new one and change the import path. `react-native-otp-inputs` stays on npm at 7.4.0.
|
|
48
|
+
- Requires `react-native` 0.86 or newer and `react` 19.2.3 or newer (the lowest React Native version the React Native team still supported on 2026-12-02, with the React version it requires). Apps on older versions stay on 7.x.
|
|
49
|
+
- The `@react-native-clipboard/clipboard` peer dependency is gone. Clipboard autofill is opt-in through `clipboardAutofill={{ getString }}`, so you can pass `@react-native-clipboard/clipboard`, `expo-clipboard` or any other source. When enabled, it ignores the code already in the clipboard at mount, applies a changed clipboard only if it contains a code, and never writes to the clipboard. It reads on focus and on return to the app. On Android, clipboard autofill also reads when the window regains focus (React Native's `AppState` `focus` event), for example after the notification shade closes; unit-tested, not yet verified on a device (Expo Go does not deliver the event); `intervalMs` is the fallback.
|
|
50
|
+
- New named export `OtpInput`, plus `useOtpInput` for custom UIs and `OtpInputRef` (`focus`, `blur`, `clear`, `setValue`, `getValue`, `isFocused`). Every public type is exported.
|
|
51
|
+
- The default export is the v7-compatible wrapper (props type `OtpInputsProps`). It is deprecated, warns once in development, and will be removed in the next major version.
|
|
52
|
+
- It maps `numberOfInputs`, `handleChange`, `inputStyles`, `inputContainerStyles`, `focusStyles`, `isRTL`, `secureTextEntry`, `editable`, `readOnly`, `placeholderTextColor`, `maxFontSizeMultiplier`, `allowFontScaling` and `testIDPrefix` to the new props. Passing any of the three style props turns off the built-in cell look, so the cells look as they did in v7.
|
|
53
|
+
- Test IDs changed: v7 gave each box `otpInput-0` to `otpInput-N` (from `testIDPrefix`). v8 puts `otpInput` (or `testID`) on the hidden input and `otpInput-cell-N` on the cells. Detox, Maestro and Testing Library tests must type into the input; on iOS the cells are hidden from the accessibility tree, so assert the input's accessibility value instead.
|
|
54
|
+
- `secureTextEntry` masks the cells with `•`. On Android the hidden input also stays a real secure field, as in v7.4.0, and uses `number-pad` instead of `phone-pad` while secure, because Android does not treat a phone-pad field as a password field. On iOS it is mask only: the hidden input is no longer a secure text field.
|
|
55
|
+
- `style` is merged over the component's base row (centred, with an 8 pt gap) instead of replacing the container style.
|
|
56
|
+
- `isRTL` becomes `direction: 'rtl'` when it differs from `I18nManager.isRTL`, and `'ltr'` otherwise, which reproduces v7's layout in left-to-right and right-to-left apps.
|
|
57
|
+
- A `defaultValue` that changes after mount fills the code as if it had been entered, and is reported through `handleChange`, as in v7.
|
|
58
|
+
- `autofillFromClipboard` needs the new `clipboard` prop, because v8 has no native dependency.
|
|
59
|
+
- It ignores `selectTextOnFocus`, `clearTextOnFocus`, `caretHidden`, `contextMenuHidden`, `maxLength`, `value`, `selection`, `pointerEvents` and `inputMode`, which would break the single input, and names them in one development warning.
|
|
60
|
+
- One hidden `TextInput` covers the whole row of cells, replacing one input per digit. The operating system handles typing, deletion, paste and one-time-code autofill. The whole row is the touch target.
|
|
61
|
+
- `OtpInput` never dismisses the keyboard. Set `blurOnComplete` to restore that. The legacy default export still dismisses on completion, as v7 did.
|
|
62
|
+
- `OtpInput` accepts digits only by default (`charset: 'numeric'`). The legacy default export keeps v7's `charset: 'any'`.
|
|
63
|
+
- The value has no gaps. Deleting a character in the middle shifts the rest left, as in a text field.
|
|
64
|
+
- Cells are laid out left to right by default (`direction: 'ltr'`). `'rtl'` mirrors them, and `'auto'` follows `I18nManager`. The value is always in reading order; the array is never reversed.
|
|
65
|
+
- `onComplete` fires after `onChange` each time typing, paste, autofill or `ref.setValue()` produces a different complete code, including when one complete code is edited into another. A `value` the parent sets never fires `onChange` or `onComplete`.
|
|
66
|
+
- In controlled mode, `onChange` fires at the edit, and `onComplete` waits until the parent's next `value` answers it. If the parent accepts the code, `onComplete` fires with it. If the parent normalises the value in `onChange` (upper-casing, stripping spaces), `onComplete` fires once with the parent's own complete value. If the parent reverts, or reports an incomplete value, it is dropped. Set `value` synchronously in `onChange`; for asynchronous flows, use an uncontrolled field and `ref.setValue()`.
|
|
67
|
+
- `textInputProps` and `cellProps` can no longer override the props the component manages (`value`, `maxLength`, `selection`, `editable` and others). TypeScript rejects them, and at runtime they are dropped with a development warning. `secureTextEntry` remains an explicit opt-in.
|
|
68
|
+
- The default accessibility label is "One-time code, 6 digits" (or `letters`, `characters`). The test ID is no longer used as the accessibility label. Text scales up to 200% by default (`maxFontSizeMultiplier: 2`).
|
|
69
|
+
- `reset()` (legacy) clears the value, always calls `handleChange('')` and no longer clears the clipboard. `handleChange` no longer defaults to `console.log`.
|
|
70
|
+
|
|
71
|
+
**New**
|
|
72
|
+
|
|
73
|
+
- Controlled `value` or uncontrolled `defaultValue`, with `onChange` and `onComplete`.
|
|
74
|
+
- `charset` (`numeric`, `alphanumeric`, `alphabetic`, `any` or a `RegExp`), `casing` and `groups`, applied to typing, paste, autofill and `setValue`. A pasted SMS or clipboard text such as "Your code is 123-456" yields `123456`, and text that holds no code never fills the field.
|
|
75
|
+
- `mask`, `placeholder`, `error`, `disabled`, `autoFocus` and `autoComplete` (`'auto'` or `'one-time-code'`, or `'off'`).
|
|
76
|
+
- Per-state styles (`cellStyle`, `focusedCellStyle`, `filledCellStyle`, `errorCellStyle`, `cellTextStyle`, `separatorStyle`) and render props (`renderCell`, `renderSeparator`). `useOtpInput()` returns `decorationProps` that keep custom cells away from touches and screen readers.
|
|
77
|
+
- Development warnings for a `value` without `onChange`, a switch between controlled and uncontrolled, ignored props, and a clipboard read that never settles.
|
|
78
|
+
- ES module and CommonJS builds with type declarations. Jest works with the React Native preset and needs no `transformIgnorePatterns` entry.
|
|
79
|
+
- Works in Expo Go (no native modules) and without `setNativeProps`.
|
|
80
|
+
|
|
81
|
+
Addresses #322, #321, #320, #319, #315, #310, #306, #305, #304, #302, #300, #297, #293, #269, #268, #265, #260 and #259 (please confirm on devices). #297 is addressed in part: deleting a middle digit behaves as in a text field, and codes with holes are not supported. #276 (Android SMS User Consent) is covered by a documentation recipe.
|
|
82
|
+
|
|
83
|
+
Smoke-tested on the iOS Simulator (iOS 27.1) and on an Android emulator (API 35, Pixel 7), both in Expo Go debug builds, and in unit tests; release builds, physical devices, Samsung/SwiftKey keyboards, VoiceOver, TalkBack gestures, TalkBack speech inside a secure field, the Android notification-shade clipboard pickup and real SMS autofill are unverified; please report device results.
|
|
84
|
+
|
|
85
|
+
Thanks to `Fay-Hu`, `xjdqq`, `alikazemkhanloo`, `hirbod`, `crieggalder`, `JohnBerd`, `ahansson89`, `lovelytingy`, `manish-vasisst103`, `mapirpg`, `ozdemiremrah` and `yogeshmuli`, whose reports and patches shaped this release.
|
|
86
|
+
</details>
|
|
87
|
+
|
|
88
|
+
### Dependency updates
|
|
89
|
+
- `@r5n/otp-core` 0.0.0 → 0.1.0
|
|
90
|
+
|
|
91
|
+
> Releases after 7.0.0 (7.1.0 to 7.4.0) are recorded only in
|
|
92
|
+
> [GitHub releases](https://github.com/r5n-labs/react-native-otp-inputs/releases). The v6 and v7
|
|
93
|
+
> entries below are kept as history. Their install instructions, with
|
|
94
|
+
> `@react-native-clipboard/clipboard` as a required peer dependency, do not apply to v8: v8 has no
|
|
95
|
+
> native dependencies, and clipboard autofill is an opt-in that takes the clipboard module you pass.
|
|
96
|
+
|
|
97
|
+
## v7.0.0 (31/03/2021)
|
|
98
|
+
|
|
99
|
+
`@react-native-community/clipboard` has been changed to `@react-native-clipboard/clipboard`.
|
|
100
|
+
|
|
101
|
+
Now installation process should be:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
$ yarn add react-native-otp-inputs @react-native-clipboard/clipboard
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### BREAKING CHANGE
|
|
108
|
+
|
|
109
|
+
## v6.0.0 (04/07/2020)
|
|
110
|
+
|
|
111
|
+
### BREAKING CHANGE
|
|
112
|
+
|
|
113
|
+
- `Clipboard` has been extracted from `react-native` core as part of [Lean Core](https://github.com/facebook/react-native/issues/23313). Now this module uses [Clipboard](https://github.com/react-native-clipboard/clipboard). Additional steps needed are:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
$ yarn add @react-native-community/clipboard
|
|
117
|
+
$ npx pod-install
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
For android, the package will be linked automatically on build.
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary>For React Native version 0.59 or older</summary>
|
|
124
|
+
|
|
125
|
+
### React Native <= 0.59
|
|
126
|
+
|
|
127
|
+
run the following command to link the package:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
$ react-native link @react-native-community/clipboard
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
For iOS, make sure you install the pod file.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
cd ios && pod install && cd ..
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
or you could follow the instructions to [manually link the project](https://reactnative.dev/docs/linking-libraries-ios#manual-linking)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Damian Sznajder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,228 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @r5n/otp-react-native
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One-time code input for React Native. One invisible `TextInput` lies over the cells, so typing,
|
|
4
|
+
deletion, the long-press Paste menu, iOS and Android one-time-code autofill and screen readers all
|
|
5
|
+
work as on a normal text field; the cells only draw its value. Behaviour comes from
|
|
6
|
+
[`@r5n/otp-core`](https://www.npmjs.com/package/@r5n/otp-core).
|
|
7
|
+
|
|
8
|
+
- Digits only by default; letters, alphanumeric codes or your own `RegExp` on request.
|
|
9
|
+
- "Your code is 123-456" pasted or autofilled becomes `123456`.
|
|
10
|
+
- `onComplete` once per completed code; the keyboard stays open unless you ask.
|
|
11
|
+
- Style props for every state, `renderCell` for your own cells, `useOtpInput` for your own layout.
|
|
12
|
+
- No native code: Expo Go works, and the package does not depend on the architecture.
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/r5n-labs/react-native-otp-inputs/develop/docs/assets/rn-basic.gif" alt="Six cells fill one by one as digits are typed, then Verified appears" width="32%" />
|
|
16
|
+
<img src="https://raw.githubusercontent.com/r5n-labs/react-native-otp-inputs/develop/docs/assets/rn-error.gif" alt="A wrong code turns the cells red, the field clears itself and the right code is accepted" width="32%" />
|
|
17
|
+
<img src="https://raw.githubusercontent.com/r5n-labs/react-native-otp-inputs/develop/docs/assets/rn-grouped.gif" alt="A masked six digit PIN in two groups of three" width="32%" />
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<p align="center"><sub>Expo Go on the iOS Simulator. The code for each recording is in the <a href="https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/examples.md">examples</a>.</sub></p>
|
|
21
|
+
|
|
22
|
+
**Verification.** v8 was smoke-tested on the iOS Simulator (iOS 27.1) and on an Android emulator
|
|
23
|
+
(API 35, Pixel 7), both in Expo Go (debug builds), and in unit tests. Not verified: release builds,
|
|
24
|
+
physical devices, Samsung Keyboard/SwiftKey, hardware keyboards, TalkBack gestures and focus order,
|
|
25
|
+
TalkBack speech inside a secure field (inconclusive; the field text shows only bullets), VoiceOver,
|
|
26
|
+
real SMS autofill, API levels other than 35, and the Android clipboard read on window focus
|
|
27
|
+
(`AppState` `focus`) outside Expo Go. Details:
|
|
28
|
+
[platform notes](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/platform-notes/react-native.md).
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm install @r5n/otp-react-native
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Peer dependencies: `react-native` 0.86 or later and `react` 19.2.3 or later. There is nothing else to
|
|
37
|
+
install and nothing to rebuild: the package has no native code, so `npx expo install` is optional
|
|
38
|
+
and Expo Go runs it. An app on an older React Native or React stays on 7.x; see the
|
|
39
|
+
[migration guide](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/migration/v7-to-v8.md#peer-dependencies-versions-and-expo).
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
**Basic.**
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { OtpInput } from '@r5n/otp-react-native';
|
|
47
|
+
|
|
48
|
+
export function VerifyScreen({ verify }: { verify: (code: string) => void }) {
|
|
49
|
+
return <OtpInput length={6} autoFocus onComplete={verify} />;
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Controlled, with an error and a reset.** Set the state synchronously in `onChange`. When the user
|
|
54
|
+
completes the code, `onComplete` fires once your state has accepted it, as is or normalised (for
|
|
55
|
+
example upper-cased); not if it keeps its previous value. A value you set by yourself never fires
|
|
56
|
+
`onChange` or `onComplete`, so clearing it is silent and the keyboard stays open. For
|
|
57
|
+
asynchronous state, leave the input uncontrolled and call `ref.setValue()` or `ref.clear()`.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { useState } from 'react';
|
|
61
|
+
import { OtpInput } from '@r5n/otp-react-native';
|
|
62
|
+
|
|
63
|
+
export function ControlledCode({ verify }: { verify: (code: string) => Promise<boolean> }) {
|
|
64
|
+
const [code, setCode] = useState('');
|
|
65
|
+
const [error, setError] = useState(false);
|
|
66
|
+
return (
|
|
67
|
+
<OtpInput
|
|
68
|
+
length={6}
|
|
69
|
+
value={code}
|
|
70
|
+
error={error}
|
|
71
|
+
onChange={(next) => {
|
|
72
|
+
setCode(next);
|
|
73
|
+
setError(false);
|
|
74
|
+
}}
|
|
75
|
+
onComplete={async (complete) => {
|
|
76
|
+
if (await verify(complete)) return;
|
|
77
|
+
setError(true);
|
|
78
|
+
setCode('');
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Custom cells.** `renderCell` receives the state of one cell; render `displayChar` to keep `mask`
|
|
86
|
+
and `placeholder` working.
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
90
|
+
import { OtpInput, type OtpInputCellState } from '@r5n/otp-react-native';
|
|
91
|
+
|
|
92
|
+
function renderCell(cell: OtpInputCellState) {
|
|
93
|
+
return (
|
|
94
|
+
<View style={[styles.cell, cell.isActive && styles.active, cell.isError && styles.error]}>
|
|
95
|
+
<Text style={styles.text}>{cell.displayChar}</Text>
|
|
96
|
+
</View>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function CustomCells() {
|
|
101
|
+
return <OtpInput length={4} renderCell={renderCell} />;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const styles = StyleSheet.create({
|
|
105
|
+
cell: {
|
|
106
|
+
width: 48,
|
|
107
|
+
height: 56,
|
|
108
|
+
borderRadius: 12,
|
|
109
|
+
backgroundColor: '#F2F2F7',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
justifyContent: 'center',
|
|
112
|
+
},
|
|
113
|
+
active: { backgroundColor: '#E5F0FF' },
|
|
114
|
+
error: { backgroundColor: '#FFE5E3' },
|
|
115
|
+
text: { fontSize: 26, fontWeight: '600' },
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Groups with a separator.**
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { Text } from 'react-native';
|
|
123
|
+
import { OtpInput } from '@r5n/otp-react-native';
|
|
124
|
+
|
|
125
|
+
export function GroupedCode() {
|
|
126
|
+
return <OtpInput length={6} groups={[3, 3]} renderSeparator={() => <Text>-</Text>} />;
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Clipboard and SMS.** Clipboard autofill is off unless you pass a provider. Codes from an SMS API
|
|
131
|
+
go through the ref: `setValue` finds the code in the message and fires the callbacks, and ignores
|
|
132
|
+
text without a code, such as the listener's `'Timeout Error.'`.
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
import Clipboard from '@react-native-clipboard/clipboard';
|
|
136
|
+
import { useEffect, useRef } from 'react';
|
|
137
|
+
import { Platform } from 'react-native';
|
|
138
|
+
import { OtpInput, type OtpInputRef } from '@r5n/otp-react-native';
|
|
139
|
+
import { removeListener, startOtpListener } from 'react-native-otp-verify';
|
|
140
|
+
|
|
141
|
+
export function AutofilledCode({ verify }: { verify: (code: string) => void }) {
|
|
142
|
+
const ref = useRef<OtpInputRef>(null);
|
|
143
|
+
useEffect(() => {
|
|
144
|
+
if (Platform.OS !== 'android') return;
|
|
145
|
+
startOtpListener((message) => ref.current?.setValue(message));
|
|
146
|
+
return () => removeListener();
|
|
147
|
+
}, []);
|
|
148
|
+
return <OtpInput ref={ref} length={6} clipboardAutofill={Clipboard} onComplete={verify} />;
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
`react-native-otp-verify` (Android SMS Retriever) and `@react-native-clipboard/clipboard` are
|
|
153
|
+
optional native modules; with Expo, use `expo-clipboard`. See
|
|
154
|
+
[autofill and clipboard](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/autofill-and-clipboard.md).
|
|
155
|
+
|
|
156
|
+
## Props
|
|
157
|
+
|
|
158
|
+
| Prop | Default | Purpose |
|
|
159
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
160
|
+
| `length` | required | Number of cells, 1 to 32. |
|
|
161
|
+
| `charset` | `'numeric'` | `'alphanumeric'`, `'alphabetic'`, `'any'` or a one-character `RegExp`. |
|
|
162
|
+
| `casing` | `'preserve'` | `'upper'` or `'lower'`. |
|
|
163
|
+
| `groups` | `[length]` | Visual groups such as `[3, 3]`. |
|
|
164
|
+
| `value`, `defaultValue`, `onChange`, `onComplete` | | Value and callbacks. |
|
|
165
|
+
| `autoFocus`, `disabled`, `error`, `blurOnComplete` | `false` | Behaviour. |
|
|
166
|
+
| `mask`, `placeholder` | | `true` or a glyph (visual only; `secureTextEntry` also protects it from screen readers); per-cell or repeated placeholder. |
|
|
167
|
+
| `direction` | `'ltr'` | `'rtl'`, or `'auto'` to follow `I18nManager`. |
|
|
168
|
+
| `autoComplete`, `keyboardType` | `'auto'`, from `charset` | One-time-code autofill (`'one-time-code'` is an alias) and keyboard. |
|
|
169
|
+
| `clipboardAutofill` | `false` | Opt-in clipboard provider. |
|
|
170
|
+
| `accessibilityLabel`, `accessibilityHint`, `accessibilityTexts` | "One-time code, 6 digits" | Label, hint, localised announcements. |
|
|
171
|
+
| `style`, `cellStyle`, `filledCellStyle`, `focusedCellStyle`, `errorCellStyle`, `cellTextStyle`, `placeholderTextColor`, `separatorStyle`, `maxFontSizeMultiplier` | | Styling; text scales up to 200% by default. |
|
|
172
|
+
| `renderCell`, `renderSeparator`, `cellProps` | | Custom content. |
|
|
173
|
+
| `textInputProps`, `testID`, `onFocus`, `onBlur` | | Hidden input (managed props are dropped with a warning); cells get `${testID}-cell-${index}`. |
|
|
174
|
+
|
|
175
|
+
Ref (`OtpInputRef`): `focus()`, `blur()`, `clear()`, `setValue(text)`, `getValue()`, `isFocused()`,
|
|
176
|
+
and `input`, the native `TextInput` (`null` before mount), as in `@r5n/otp-react`.
|
|
177
|
+
Headless: `useOtpInput(options)` returns the cell states, the hidden input's props, the
|
|
178
|
+
`decorationProps` to spread on your cells and the ref methods. Every prop, default and type:
|
|
179
|
+
[API reference](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/api.md).
|
|
180
|
+
|
|
181
|
+
## Upgrading from v7
|
|
182
|
+
|
|
183
|
+
The package has a new name: uninstall `react-native-otp-inputs` and install
|
|
184
|
+
`@r5n/otp-react-native`. The v7 default export still works and accepts the v7 props, with a
|
|
185
|
+
deprecation warning in development; it will be removed in the next major version:
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
// illustrative: deprecated
|
|
189
|
+
import OtpInputs from '@r5n/otp-react-native';
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Clipboard autofill is now off unless you pass a `clipboard` provider, and a few behaviours changed.
|
|
193
|
+
Nine v7 props would break the single input and are ignored with a development warning:
|
|
194
|
+
`selectTextOnFocus`, `clearTextOnFocus`, `caretHidden`, `contextMenuHidden`, `maxLength`, `value`,
|
|
195
|
+
`selection`, `pointerEvents` and `inputMode`. Some screens also render differently without a
|
|
196
|
+
warning (`style` is merged over a base row, `inputStyles` styles a `Text`, the container takes
|
|
197
|
+
taps). Read the
|
|
198
|
+
[migration guide](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/migration/v7-to-v8.md),
|
|
199
|
+
including
|
|
200
|
+
[things that look different](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/migration/v7-to-v8.md#things-that-look-different-after-upgrading),
|
|
201
|
+
before upgrading.
|
|
202
|
+
|
|
203
|
+
## Jest
|
|
204
|
+
|
|
205
|
+
The package ships a CommonJS build for Jest next to the ES modules Metro uses, so no
|
|
206
|
+
`transformIgnorePatterns` entry is needed. Use `@react-native/jest-preset` (installed at the
|
|
207
|
+
version of `react-native`), or `jest-expo` on Expo. Examples with React Native Testing Library 14:
|
|
208
|
+
[testing](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/testing.md).
|
|
209
|
+
|
|
210
|
+
## Documentation
|
|
211
|
+
|
|
212
|
+
- [Getting started](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/getting-started.md)
|
|
213
|
+
- [Styling](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/styling.md)
|
|
214
|
+
- [Forms and validation](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/forms-and-validation.md)
|
|
215
|
+
- [Headless hook](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/headless-hook.md)
|
|
216
|
+
- [Accessibility](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/accessibility.md)
|
|
217
|
+
- [Troubleshooting](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/react-native/troubleshooting.md)
|
|
218
|
+
- [Platform notes](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/platform-notes/react-native.md):
|
|
219
|
+
what has and has not been verified on devices
|
|
220
|
+
- [All documentation](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/docs/otp-inputs/README.md)
|
|
221
|
+
|
|
222
|
+
For the web, use [`@r5n/otp-react`](https://www.npmjs.com/package/@r5n/otp-react).
|
|
223
|
+
|
|
224
|
+
## Licence
|
|
225
|
+
|
|
226
|
+
[MIT](https://github.com/r5n-labs/react-native-otp-inputs/blob/develop/packages/otp-react-native/LICENSE).
|
|
227
|
+
Created by Damian Sznajder and Michal Kantor; see the
|
|
228
|
+
[contributors](https://github.com/r5n-labs/react-native-otp-inputs/graphs/contributors).
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
function __accessProp(key) {
|
|
7
|
+
return this[key];
|
|
8
|
+
}
|
|
9
|
+
var __toCommonJS = (from) => {
|
|
10
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
11
|
+
if (entry)
|
|
12
|
+
return entry;
|
|
13
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (var key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(entry, key))
|
|
17
|
+
__defProp(entry, key, {
|
|
18
|
+
get: __accessProp.bind(from, key),
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
__moduleCache.set(from, entry);
|
|
23
|
+
return entry;
|
|
24
|
+
};
|
|
25
|
+
var __moduleCache;
|
|
26
|
+
var __returnValue = (v) => v;
|
|
27
|
+
function __exportSetter(name, newValue) {
|
|
28
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
29
|
+
}
|
|
30
|
+
var __export = (target, all) => {
|
|
31
|
+
for (var name in all)
|
|
32
|
+
__defProp(target, name, {
|
|
33
|
+
get: all[name],
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
set: __exportSetter.bind(all, name)
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/Cell.tsx
|
|
41
|
+
var exports_Cell = {};
|
|
42
|
+
__export(exports_Cell, {
|
|
43
|
+
Cell: () => Cell,
|
|
44
|
+
CellAppearance: () => CellAppearance,
|
|
45
|
+
DECORATION_PROPS: () => DECORATION_PROPS,
|
|
46
|
+
Separator: () => Separator
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(exports_Cell);
|
|
49
|
+
var import_react = require("react");
|
|
50
|
+
var import_react_native = require("react-native");
|
|
51
|
+
var jsx_runtime = require("react/jsx-runtime");
|
|
52
|
+
var DECORATION_PROPS = Object.freeze({
|
|
53
|
+
pointerEvents: "none",
|
|
54
|
+
accessibilityElementsHidden: true,
|
|
55
|
+
importantForAccessibility: "no-hide-descendants"
|
|
56
|
+
});
|
|
57
|
+
var CellAppearance = import_react.createContext("default");
|
|
58
|
+
var styles = import_react_native.StyleSheet.create({
|
|
59
|
+
cell: {
|
|
60
|
+
width: 44,
|
|
61
|
+
flexShrink: 1,
|
|
62
|
+
minHeight: 52,
|
|
63
|
+
paddingHorizontal: 4,
|
|
64
|
+
borderWidth: 1,
|
|
65
|
+
borderRadius: 8,
|
|
66
|
+
borderColor: "#8E8E93",
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
justifyContent: "center"
|
|
69
|
+
},
|
|
70
|
+
disabled: { opacity: 0.5 },
|
|
71
|
+
focused: { borderColor: "#007AFF" },
|
|
72
|
+
error: { borderColor: "#FF3B30" },
|
|
73
|
+
text: { fontSize: 24, fontWeight: "600", fontVariant: ["tabular-nums"], color: "#1C1C1E" },
|
|
74
|
+
textDark: { color: "#FFFFFF" },
|
|
75
|
+
separator: { minWidth: 8, alignItems: "center", justifyContent: "center" }
|
|
76
|
+
});
|
|
77
|
+
var Cell = import_react.memo(function Cell2({
|
|
78
|
+
testID,
|
|
79
|
+
cellStyle,
|
|
80
|
+
filledCellStyle,
|
|
81
|
+
focusedCellStyle,
|
|
82
|
+
errorCellStyle,
|
|
83
|
+
cellTextStyle,
|
|
84
|
+
placeholderTextColor,
|
|
85
|
+
maxFontSizeMultiplier,
|
|
86
|
+
dark,
|
|
87
|
+
renderCell,
|
|
88
|
+
cellProps,
|
|
89
|
+
...state
|
|
90
|
+
}) {
|
|
91
|
+
const styled = import_react.useContext(CellAppearance) === "default";
|
|
92
|
+
if (renderCell) {
|
|
93
|
+
return /* @__PURE__ */ jsx_runtime.jsx(import_react_native.View, {
|
|
94
|
+
...cellProps,
|
|
95
|
+
...DECORATION_PROPS,
|
|
96
|
+
testID,
|
|
97
|
+
children: renderCell(state)
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return /* @__PURE__ */ jsx_runtime.jsx(import_react_native.View, {
|
|
101
|
+
...cellProps,
|
|
102
|
+
...DECORATION_PROPS,
|
|
103
|
+
testID,
|
|
104
|
+
style: [
|
|
105
|
+
styled && styles.cell,
|
|
106
|
+
styled && state.isDisabled && styles.disabled,
|
|
107
|
+
cellStyle,
|
|
108
|
+
state.isFilled && filledCellStyle,
|
|
109
|
+
state.isActive && [styled && styles.focused, focusedCellStyle],
|
|
110
|
+
state.isError && [styled && styles.error, errorCellStyle]
|
|
111
|
+
],
|
|
112
|
+
children: /* @__PURE__ */ jsx_runtime.jsx(import_react_native.Text, {
|
|
113
|
+
style: [
|
|
114
|
+
styled && styles.text,
|
|
115
|
+
styled && dark && styles.textDark,
|
|
116
|
+
cellTextStyle,
|
|
117
|
+
state.isPlaceholder && { color: placeholderTextColor }
|
|
118
|
+
],
|
|
119
|
+
maxFontSizeMultiplier,
|
|
120
|
+
numberOfLines: 1,
|
|
121
|
+
adjustsFontSizeToFit: true,
|
|
122
|
+
minimumFontScale: 0.5,
|
|
123
|
+
children: state.displayChar
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
var Separator = import_react.memo(function Separator2({
|
|
128
|
+
groupIndex,
|
|
129
|
+
style,
|
|
130
|
+
renderSeparator
|
|
131
|
+
}) {
|
|
132
|
+
return /* @__PURE__ */ jsx_runtime.jsx(import_react_native.View, {
|
|
133
|
+
...DECORATION_PROPS,
|
|
134
|
+
style: [styles.separator, style],
|
|
135
|
+
children: renderSeparator?.(groupIndex)
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
//# debugId=C25A8A56BACCADD664756E2164756E21
|
|
140
|
+
//# sourceMappingURL=Cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Cell.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAmF,IAAnF;AASO,IARP;AAAA;AAgBO,IAAM,mBAAuC,OAAO,OAAO;AAAA,EAChE,eAAe;AAAA,EACf,6BAA6B;AAAA,EAC7B,2BAA2B;AAC7B,CAAC;AAMM,IAAM,iBAAiB,2BAAkC,SAAS;AAEzE,IAAM,SAAS,+BAAW,OAAO;AAAA,EAC/B,MAAM;AAAA,IAGJ,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,IAEX,mBAAmB;AAAA,IACnB,aAAa;AAAA,IACb,cAAc;AAAA,IAGd,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,gBAAgB;AAAA,EAClB;AAAA,EACA,UAAU,EAAE,SAAS,IAAI;AAAA,EACzB,SAAS,EAAE,aAAa,UAAU;AAAA,EAClC,OAAO,EAAE,aAAa,UAAU;AAAA,EAGhC,MAAM,EAAE,UAAU,IAAI,YAAY,OAAO,aAAa,CAAC,cAAc,GAAG,OAAO,UAAU;AAAA,EACzF,UAAU,EAAE,OAAO,UAAU;AAAA,EAC7B,WAAW,EAAE,UAAU,GAAG,YAAY,UAAU,gBAAgB,SAAS;AAC3E,CAAC;AAkBM,IAAM,OAAO,kBAAK,SAAS,KAAI;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,GACuB;AAAA,EAC1B,MAAM,SAAS,wBAAW,cAAc,MAAM;AAAA,EAC9C,IAAI,YAAY;AAAA,IACd,uBACE,gBAAC,0BAAD;AAAA,SAAU;AAAA,SAAe;AAAA,MAAkB;AAAA,MAA3C,UACG,WAAW,KAAK;AAAA,KACjB;AAAA,EAEN;AAAA,EACA,uBACE,gBAAC,0BAAD;AAAA,OACM;AAAA,OACA;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,MACL,UAAU,OAAO;AAAA,MACjB,UAAU,MAAM,cAAc,OAAO;AAAA,MACrC;AAAA,MACA,MAAM,YAAY;AAAA,MAClB,MAAM,YAAY,CAAC,UAAU,OAAO,SAAS,gBAAgB;AAAA,MAC7D,MAAM,WAAW,CAAC,UAAU,OAAO,OAAO,cAAc;AAAA,IAC1D;AAAA,IAXF,0BAaE,gBAAC,0BAAD;AAAA,MACE,OAAO;AAAA,QACL,UAAU,OAAO;AAAA,QACjB,UAAU,QAAQ,OAAO;AAAA,QACzB;AAAA,QACA,MAAM,iBAAiB,EAAE,OAAO,qBAAqB;AAAA,MACvD;AAAA,MACA;AAAA,MAGA,eAAe;AAAA,MACf,sBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAZpB,UAcG,MAAM;AAAA,KACP;AAAA,GACF;AAAA,CAEL;AASM,IAAM,YAAY,kBAAK,SAAS,UAAS;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,GAC+B;AAAA,EAC/B,uBACE,gBAAC,0BAAD;AAAA,OAAU;AAAA,IAAkB,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,IAA3D,UACG,kBAAkB,UAAU;AAAA,GAC7B;AAAA,CAEL;","debugId":"C25A8A56BACCADD664756E2164756E21","names":[]}
|