@abaxx_tech/v-integration-react 1.1.0 → 1.1.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/README.md CHANGED
@@ -16,9 +16,9 @@
16
16
  ## Installation
17
17
  Install the package via npm or yarn:
18
18
  ```sh
19
- npm install @abaxxtech/v-integration-react@1.1.0
19
+ npm install @abaxx_tech/v-integration-react
20
20
  # or
21
- yarn add @abaxxtech/v-integration-react@1.1.0
21
+ yarn add @abaxx_tech/v-integration-react
22
22
  ```
23
23
  <br/><br/>
24
24
 
@@ -26,7 +26,7 @@ yarn add @abaxxtech/v-integration-react@1.1.0
26
26
  ### 1. Wrap your app with `VerifierProvider`
27
27
  Wrap your application with `VerifierProvider` to manage authentication. The provider automatically handles PKCE generation, SSE connections, and token management through the `AuthService`.
28
28
  ```ts
29
- import { VerifierProvider } from "@abaxxtech/v-integration-react";
29
+ import { VerifierProvider } from "@abaxx_tech/v-integration-react";
30
30
 
31
31
  const App = () => {
32
32
  return (
@@ -47,7 +47,7 @@ export default App;
47
47
 
48
48
  #### Complete Authentication UI (`VerifierAuth`)
49
49
  ```ts
50
- import { VerifierAuth } from "@abaxxtech/v-integration-react";
50
+ import { VerifierAuth } from "@abaxx_tech/v-integration-react";
51
51
  import "v-integration-react/index.css";
52
52
 
53
53
  const LoginPage = () => {
@@ -59,7 +59,7 @@ export default LoginPage;
59
59
 
60
60
  #### QR Code Only (`VerifierAuthQr`)
61
61
  ```ts
62
- import { VerifierAuthQr } from "@abaxxtech/v-integration-react";
62
+ import { VerifierAuthQr } from "@abaxx_tech/v-integration-react";
63
63
  import "v-integration-react/index.css";
64
64
 
65
65
  const QRLoginAuth = () => {
@@ -78,7 +78,7 @@ export default QRLoginAuth;
78
78
 
79
79
  #### Email Input Only (`VerifierAuthEmail`)
80
80
  ```ts
81
- import { VerifierAuthEmail } from "@abaxxtech/v-integration-react";
81
+ import { VerifierAuthEmail } from "@abaxx_tech/v-integration-react";
82
82
  import "v-integration-react/index.css";
83
83
 
84
84
  const EmailLoginAuth = () => {
@@ -321,4 +321,4 @@ VITE_CLIENT_ID="your-client-id"
321
321
  3. Start development:
322
322
  ```sh
323
323
  npm run dev
324
- ```
324
+ ```
@@ -0,0 +1 @@
1
+ .v-auth-container *,.v-auth-container *:before,.v-auth-container *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.v-auth-container{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;line-height:1.5}.v-grid{display:grid}.v-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.v-grid-responsive{grid-template-columns:1fr}@media (min-width: 768px){.v-grid-responsive{grid-template-columns:1fr 1fr}}.v-h-screen{height:100vh}.v-bg-white{background-color:#fff}.v-bg-left{display:none}@media (min-width: 768px){.v-bg-left{display:block}}.v-flex{display:flex}.v-flex-col{flex-direction:column}.v-items-center{align-items:center}.v-justify-center{justify-content:center}.v-gap-2{gap:.5rem}.v-relative{position:relative}.v-absolute{position:absolute}.v-hidden{display:none}@media (min-width: 768px){.v-hidden.md\:v-block{display:block}}.v-inset-0{top:0;right:0;bottom:0;left:0}.v-h-full{height:100%}.v-w-full{width:100%}.v-w-20{width:5rem}.v-h-20{height:5rem}.v-h-10{height:2.5rem}.v-h-4{height:1rem}.v-h-130{height:130px}.v-h-16{height:4rem}.v-w-4{width:1rem}.v-min-w-300{min-width:300px}.v-w-130{width:130px}.v-w-16{width:4rem}.v-p-3{padding:.75rem}.v-p-4{padding:1rem}.v-p-6{padding:1.5rem}.v-px-2{padding-left:.5rem;padding-right:.5rem}.v-px-4{padding-left:1rem;padding-right:1rem}.v-mb-3{margin-bottom:.75rem}.v-mb-4{margin-bottom:1rem}.v-mb-5{margin-bottom:1.25rem}.v-mb-6{margin-bottom:1.5rem}.v-mb-8{margin-bottom:2rem}.v-my-4{margin-top:1rem;margin-bottom:1rem}.v-text-center{text-align:center}.v-text-sm{font-size:.875rem;line-height:1.25rem}.v-text-base{font-size:1rem;line-height:1.5rem}.v-text-xl{font-size:1.25rem;line-height:1.75rem}.v-text-2xl{font-size:1.5rem;line-height:2rem}.v-font-medium{font-weight:500}.v-font-semibold{font-weight:600}.v-tracking-wide{letter-spacing:.025em}.v-text-black{color:#000}.v-text-white{color:#fff}.v-text-gray-400{color:#9ca3af}.v-text-gray-800{color:#1f2937}.v-text-green-700{color:#15803d}.v-text-green-800{color:#166534}.v-bg-green-100{background-color:#dcfce7}.v-bg-slate-100{background-color:#f1f5f9}.v-text-slate-800{color:#1e293b}.v-bg-transparent{background-color:transparent}.v-bg-red{background-color:#cf0000}.v-text-gray-600{color:#6b7280}.v-border{border-width:1px}.v-border-gray-400{border-color:#9ca3af}.v-rounded{border-radius:.25rem}.v-rounded-lg{border-radius:.5rem}.v-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;border:1px solid #9ca3af;background-color:transparent;padding:.5rem;text-align:center;color:#6b7280}.v-input:focus{outline:2px solid transparent;outline-offset:2px;border-color:#3b82f6}.v-input:disabled{opacity:.5;cursor:not-allowed}.v-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:.25rem;padding:.5rem 1rem;font-weight:600;transition:all .2s;cursor:pointer;border:none;background-color:#cf0000;color:#fff}.v-button:hover{background-color:#b91c1c}.v-button:disabled{opacity:.5;cursor:not-allowed}.v-animate-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.v-fade-in{animation:fadeIn .3s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.v-bg-cover{background-size:cover}.v-bg-no-repeat{background-repeat:no-repeat}.v-object-contain{object-fit:contain}.v-mix-blend-multiply{mix-blend-mode:multiply}.v-blur-sm{filter:blur(4px)}.v-fixed{position:fixed}.v-top-4{top:1rem}.v-right-4{right:1rem}
@@ -0,0 +1,87 @@
1
+ import { default as default_2 } from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ declare type Props = {
5
+ appId: string | number;
6
+ clientId: string;
7
+ apiUrl: string;
8
+ children: ReactNode;
9
+ };
10
+
11
+ export declare const VContext: default_2.Context<VContextObj>;
12
+
13
+ export declare type VContextObj = {
14
+ appId: string | number;
15
+ apiUrl: string;
16
+ clientId: string;
17
+ authRequestId: string;
18
+ setAuthRequestId: default_2.Dispatch<default_2.SetStateAction<string>>;
19
+ identity: string;
20
+ setIdentity: default_2.Dispatch<default_2.SetStateAction<string>>;
21
+ isAuthenticating: boolean;
22
+ setIsAuthenticating: default_2.Dispatch<default_2.SetStateAction<boolean>>;
23
+ codeVerifier: string;
24
+ setCodeVerifier: default_2.Dispatch<default_2.SetStateAction<string>>;
25
+ codeChallenge: string;
26
+ setCodeChallenge: default_2.Dispatch<default_2.SetStateAction<string>>;
27
+ authCode: string;
28
+ setAuthCode: default_2.Dispatch<default_2.SetStateAction<string>>;
29
+ authRequestIdExpires: Date;
30
+ setAuthRequestIdExpires: default_2.Dispatch<default_2.SetStateAction<Date>>;
31
+ token: string | null;
32
+ setToken: default_2.Dispatch<default_2.SetStateAction<string | null>>;
33
+ authError: string | null;
34
+ setAuthError: default_2.Dispatch<default_2.SetStateAction<string | null>>;
35
+ };
36
+
37
+ export declare const VContextProvider: default_2.FC<Props>;
38
+
39
+ export declare const VerifierAuth: default_2.FC<VerifierAuthProps>;
40
+
41
+ export declare const VerifierAuthEmail: default_2.FC<VerifierAuthEmailProps>;
42
+
43
+ export declare interface VerifierAuthEmailProps {
44
+ inputPlaceholder?: string;
45
+ buttonText?: string;
46
+ inputHeight?: string;
47
+ inputWidth?: string;
48
+ inputTextColor?: string;
49
+ inputBorderColor?: string;
50
+ inputBackgroundColor?: string;
51
+ buttonHeight?: string;
52
+ buttonWidth?: string;
53
+ buttonBackgroundColor?: string;
54
+ buttonTextColor?: string;
55
+ containerClass?: string;
56
+ checkmarkColor?: string;
57
+ }
58
+
59
+ export declare interface VerifierAuthProps {
60
+ title: string;
61
+ containerClass?: string;
62
+ }
63
+
64
+ export declare const VerifierAuthQr: default_2.FC<VerifierAuthQrProps>;
65
+
66
+ export declare interface VerifierAuthQrProps {
67
+ size?: number;
68
+ qrColor?: string;
69
+ logoImage?: string;
70
+ logoWidth?: number;
71
+ logoHeight?: number;
72
+ quietZone?: number;
73
+ containerClass?: string;
74
+ showStatus?: boolean;
75
+ checkmarkColor?: string;
76
+ }
77
+
78
+ export declare const VerifierProvider: default_2.FC<VerifierProviderProps>;
79
+
80
+ export declare interface VerifierProviderProps {
81
+ appId: string | number;
82
+ clientId: string;
83
+ apiUrl: string;
84
+ children: ReactNode;
85
+ }
86
+
87
+ export { }