@akinon/pz-otp 2.0.0-beta.12 → 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,63 +1,112 @@
1
1
  # @akinon/pz-otp
2
2
 
3
- ## 2.0.0-beta.12
3
+ ## 2.0.0-beta.13
4
4
 
5
- ### Minor Changes
5
+ ## 1.118.0
6
6
 
7
- - 1d79e32: ZERO-3540: Next.js Upgrade to 15.4.5
7
+ ## 1.117.0
8
8
 
9
- ## 2.0.0-beta.11
9
+ ## 1.116.0
10
10
 
11
- ### Minor Changes
11
+ ## 1.115.0
12
+
13
+ ## 1.114.0
14
+
15
+ ## 1.113.0
16
+
17
+ ## 1.112.0
18
+
19
+ ## 1.111.0
20
+
21
+ ## 1.110.0
12
22
 
13
- - ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
23
+ ## 1.109.0
14
24
 
15
- ## 2.0.0-beta.10
25
+ ## 1.108.0
26
+
27
+ ## 1.107.0
28
+
29
+ ## 1.106.0
16
30
 
17
31
  ### Minor Changes
18
32
 
19
- - 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
42
+
43
+ ## 1.101.0
20
44
 
21
- ## 2.0.0-beta.9
45
+ ## 1.100.0
46
+
47
+ ## 1.99.0
22
48
 
23
49
  ### Minor Changes
24
50
 
25
- - 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
62
+
63
+ ## 1.93.0
26
64
 
27
- ## 2.0.0-beta.8
65
+ ## 1.92.0
28
66
 
29
- ## 2.0.0-beta.7
67
+ ## 1.91.0
30
68
 
31
- ## 2.0.0-beta.6
69
+ ## 1.90.0
32
70
 
33
71
  ### Minor Changes
34
72
 
35
- - 8f05f9b: ZERO-3250: Beta branch synchronized with Main branch
73
+ - 9c3a22a: ZERO-3382: Enhance OTP component with customizable UI rendering support
36
74
 
37
- ## 2.0.0-beta.5
75
+ ## 1.89.0
38
76
 
39
- ## 2.0.0-beta.4
77
+ ## 1.88.0
40
78
 
41
- ## 2.0.0-beta.3
79
+ ## 1.87.0
42
80
 
43
- ## 2.0.0-beta.2
81
+ ## 1.86.0
82
+
83
+ ## 1.85.0
44
84
 
45
85
  ### Minor Changes
46
86
 
47
- - a006015: ZERO-3116: Add not-found page and update default middleware.
48
- - 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
49
88
 
50
- ## 2.0.0-beta.1
89
+ ## 1.84.0
51
90
 
52
91
  ### Minor Changes
53
92
 
54
- - 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
55
104
 
56
- ## 2.0.0-beta.0
105
+ ## 1.78.0
57
106
 
58
- ### Major Changes
107
+ ## 1.77.0
59
108
 
60
- - be6c09d: ZERO-3114: Create beta version.
109
+ ## 1.76.0
61
110
 
62
111
  ## 1.75.0
63
112
 
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@akinon/pz-otp",
3
- "version": "2.0.0-beta.12",
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