@akinon/pz-otp 2.0.0-beta.11 → 2.0.0-beta.13

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 CHANGED
@@ -1,57 +1,112 @@
1
1
  # @akinon/pz-otp
2
2
 
3
- ## 2.0.0-beta.11
3
+ ## 2.0.0-beta.13
4
4
 
5
- ### Minor Changes
5
+ ## 1.118.0
6
+
7
+ ## 1.117.0
8
+
9
+ ## 1.116.0
10
+
11
+ ## 1.115.0
12
+
13
+ ## 1.114.0
14
+
15
+ ## 1.113.0
16
+
17
+ ## 1.112.0
18
+
19
+ ## 1.111.0
6
20
 
7
- - ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
21
+ ## 1.110.0
8
22
 
9
- ## 2.0.0-beta.10
23
+ ## 1.109.0
24
+
25
+ ## 1.108.0
26
+
27
+ ## 1.107.0
28
+
29
+ ## 1.106.0
10
30
 
11
31
  ### Minor Changes
12
32
 
13
- - 2806320: ZERO-3390: Update version tailwindcss, autoprefixer, tailwind-merge, postcss
33
+ - ae010f0: ZERO-3410: Update readme
34
+
35
+ ## 1.105.0
36
+
37
+ ## 1.104.0
38
+
39
+ ## 1.103.0
40
+
41
+ ## 1.102.0
14
42
 
15
- ## 2.0.0-beta.9
43
+ ## 1.101.0
44
+
45
+ ## 1.100.0
46
+
47
+ ## 1.99.0
16
48
 
17
49
  ### Minor Changes
18
50
 
19
- - 0fe7711: ZERO-3387: Upgrade nextjs, eslint-config-next
51
+ - d58538b: ZERO-3638: Enhance RC pipeline: add fetch, merge, and pre-release setup with conditional commit
52
+
53
+ ## 1.98.0
54
+
55
+ ## 1.97.0
56
+
57
+ ## 1.96.0
58
+
59
+ ## 1.95.0
60
+
61
+ ## 1.94.0
20
62
 
21
- ## 2.0.0-beta.8
63
+ ## 1.93.0
22
64
 
23
- ## 2.0.0-beta.7
65
+ ## 1.92.0
24
66
 
25
- ## 2.0.0-beta.6
67
+ ## 1.91.0
68
+
69
+ ## 1.90.0
26
70
 
27
71
  ### Minor Changes
28
72
 
29
- - 8f05f9b: ZERO-3250: Beta branch synchronized with Main branch
73
+ - 9c3a22a: ZERO-3382: Enhance OTP component with customizable UI rendering support
74
+
75
+ ## 1.89.0
30
76
 
31
- ## 2.0.0-beta.5
77
+ ## 1.88.0
32
78
 
33
- ## 2.0.0-beta.4
79
+ ## 1.87.0
34
80
 
35
- ## 2.0.0-beta.3
81
+ ## 1.86.0
36
82
 
37
- ## 2.0.0-beta.2
83
+ ## 1.85.0
38
84
 
39
85
  ### Minor Changes
40
86
 
41
- - a006015: ZERO-3116: Add not-found page and update default middleware.
42
- - 1eeb3d8: ZERO-3116: Add not found page
87
+ - a0a1bac: ZERO-3228 :edit OTP login flow to use Redux for popup visibility and clean up unused props
43
88
 
44
- ## 2.0.0-beta.1
89
+ ## 1.84.0
45
90
 
46
91
  ### Minor Changes
47
92
 
48
- - ZERO-3091: Upgrade Next.js to v15 and React to v19
93
+ - 624a4eb: ZERO-3276: Update installation instructions across multiple README files to standardize format and improve clarity
94
+
95
+ ## 1.83.0
96
+
97
+ ## 1.82.0
98
+
99
+ ## 1.81.0
100
+
101
+ ## 1.80.0
102
+
103
+ ## 1.79.0
49
104
 
50
- ## 2.0.0-beta.0
105
+ ## 1.78.0
51
106
 
52
- ### Major Changes
107
+ ## 1.77.0
53
108
 
54
- - be6c09d: ZERO-3114: Create beta version.
109
+ ## 1.76.0
55
110
 
56
111
  ## 1.75.0
57
112
 
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@akinon/pz-otp",
3
- "version": "2.0.0-beta.11",
3
+ "version": "2.0.0-beta.13",
4
4
  "license": "MIT",
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
7
7
  "peerDependencies": {
8
- "react": "^19.0.0",
9
- "react-dom": "^19.0.0"
8
+ "react": "^18.0.0 || ^19.0.0",
9
+ "react-dom": "^18.0.0 || ^19.0.0"
10
10
  },
11
11
  "devDependencies": {
12
- "@types/node": "^22.10.2",
13
- "@types/react": "^19.0.2",
14
- "@types/react-dom": "^19.0.2",
15
- "prettier": "^3.4.2",
12
+ "@types/node": "^18.7.8",
13
+ "@types/react": "^18.0.17",
14
+ "@types/react-dom": "^18.0.6",
15
+ "prettier": "3.0.3",
16
16
  "prettier-plugin-tailwindcss": "0.5.6",
17
- "react": "^19.0.0",
18
- "react-dom": "^19.0.0",
17
+ "react": "^19.2.4",
18
+ "react-dom": "^19.2.4",
19
19
  "react-hook-form": "7.31.3",
20
- "typescript": "^5.7.2"
20
+ "typescript": "^4.7.4"
21
21
  },
22
22
  "dependencies": {
23
23
  "react-otp-input": "^3.1.0",
package/readme.md CHANGED
@@ -12,13 +12,29 @@ npx @akinon/projectzero@latest --plugins
12
12
 
13
13
  ### Props
14
14
 
15
- | Property | Type | Description |
16
- | --- | --- | --- |
17
- | `customUIRender` | `React.ReactNode` | Optional function to fully customize the otp. Receives closeHandler, resendHandler, otp, setOtp, hasError, error, canResend, time, codeLength, setHasError and onSubmit props. |
15
+ | Property | Type | Required | Description |
16
+ | --- | --- | --- | --- |
17
+ | `customUIRender` | `React.ReactNode` | `Optional` | function to fully customize the otp. Receives closeHandler, resendHandler, otp, setOtp, hasError, error, canResend, time, codeLength, setHasError and onSubmit props. |
18
+ | `submitAction` | `SubmitHandler<{ [key: string]: any }>` | `Required` | A submit handler function triggered when OTP form is submitted. |
19
+ | `data` | `{ [key: string]: any }` | `Required` | Data object containing required fields like phone number. OTP code will be appended here before submission |
20
+
21
+ ### Default Usage
22
+
23
+ ```js
24
+ import PluginModule, { Component } from '@akinon/next/components/plugin-module';
25
+
26
+ <PluginModule
27
+ component={Component.Otp}
28
+ props={{
29
+ data: getValues(),
30
+ submitAction: registerHandler
31
+ }}
32
+ />;
33
+ ```
18
34
 
19
35
  ### Customizing OTP
20
36
 
21
- ```javascript
37
+ ```js
22
38
  import PluginModule, { Component } from '@akinon/next/components/plugin-module';
23
39
 
24
40
  <PluginModule
package/src/views/Otp.tsx CHANGED
@@ -161,7 +161,7 @@ export const Otp = ({
161
161
 
162
162
  return (
163
163
  <div className="fixed left-0 top-0 z-50 flex h-screen w-screen items-end md:items-center md:justify-center md:bg-black/10">
164
- <div className="h-[calc(100vh-48px)] w-screen flex md:h-auto md:max-w-lg flex-col items-center rounded-xs bg-white p-8 shadow-xl">
164
+ <div className="h-[calc(100vh-48px)] w-screen flex md:h-auto md:max-w-lg flex-col items-center rounded-sm bg-white p-8 shadow-xl">
165
165
  <div className="w-full flex items-center justify-end">
166
166
  <div className="cursor-pointer" onClick={closeHandler}>
167
167
  <svg