@akinon/pz-otp 1.26.0-rc.9 → 1.27.0

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,40 +1,8 @@
1
1
  # @akinon/pz-otp
2
2
 
3
- ## 1.26.0-rc.9
3
+ ## 1.27.0
4
4
 
5
- ### Minor Changes
6
-
7
- - 42320c2: ZERO-2516: Add if there are errors in the OTP login
8
-
9
- ### Patch Changes
10
-
11
- - 073fbd2: ZERO-2503: Add check changeset control script
12
-
13
- ## 1.26.0-rc.8
14
-
15
- ## 1.26.0-rc.7
16
-
17
- ## 1.26.0-rc.6
18
-
19
- ## 1.26.0-rc.5
20
-
21
- ### Minor Changes
22
-
23
- - 42320c2: ZERO-2516: Add if there are errors in the OTP login
24
-
25
- ## 1.26.0-rc.4
26
-
27
- ## 1.26.0-rc.3
28
-
29
- ### Patch Changes
30
-
31
- - 073fbd2: ZERO-2503: Add check changeset control script
32
-
33
- ## 1.26.0-rc.2
34
-
35
- ## 1.26.0-rc.1
36
-
37
- ## 1.26.0-rc.0
5
+ ## 1.26.0
38
6
 
39
7
  ## 1.25.0
40
8
 
@@ -48,12 +16,6 @@
48
16
 
49
17
  - 95510c7: ZERO-2508: Enable rc branch pipeline and add check-publish-version step
50
18
 
51
- ## 1.25.0-rc.0
52
-
53
- ### Minor Changes
54
-
55
- - e20b27f: ZERO-2454:add otp login
56
-
57
19
  ## 1.24.0
58
20
 
59
21
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-otp",
3
- "version": "1.26.0-rc.9",
3
+ "version": "1.27.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
package/src/views/Otp.tsx CHANGED
@@ -22,9 +22,9 @@ enum ComponentWrapper {
22
22
  Otp = 'otp'
23
23
  }
24
24
 
25
- type ComponentClassKey = (typeof Component)[keyof typeof Component];
25
+ type ComponentClassKey = typeof Component[keyof typeof Component];
26
26
  type ComponentWrapperClassKey =
27
- `${(typeof ComponentWrapper)[keyof typeof ComponentWrapper]}Wrapper`;
27
+ `${typeof ComponentWrapper[keyof typeof ComponentWrapper]}Wrapper`;
28
28
  type ComponentClasses = ComponentClassKey | ComponentWrapperClassKey;
29
29
 
30
30
  type OtpProps = {
@@ -42,7 +42,6 @@ type OtpProps = {
42
42
  classes?: {
43
43
  [c in ComponentClasses]?: string;
44
44
  };
45
- error?: string;
46
45
  };
47
46
 
48
47
  export const Otp = ({
@@ -51,8 +50,7 @@ export const Otp = ({
51
50
  codeLength = 6,
52
51
  timer = 60,
53
52
  texts,
54
- classes,
55
- error
53
+ classes
56
54
  }: OtpProps) => {
57
55
  const [otp, setOtp] = useState('');
58
56
  const [canResend, setCanResend] = useState(false);
@@ -72,7 +70,7 @@ export const Otp = ({
72
70
  data.code = otp;
73
71
  const res = await submitAction(data);
74
72
 
75
- if (res?.status !== 200 || error) {
73
+ if (res.status !== 200) {
76
74
  setHasError(true);
77
75
  }
78
76
  }
@@ -180,7 +178,6 @@ export const Otp = ({
180
178
  renderInput={({ style, ...props }) => <input {...props} />}
181
179
  skipDefaultStyles={true}
182
180
  />
183
- {error && <p className="text-xs text-error mt-2">{error}</p>}
184
181
  <Button
185
182
  type="submit"
186
183
  className={twMerge(