@bluxcc/react 0.1.2 → 0.1.4
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 +6 -6
- package/dist/assets/Icons.d.ts +29 -7
- package/dist/assets/logos.d.ts +8 -7
- package/dist/components/CardItem/index.d.ts +7 -3
- package/dist/components/Input/OTPInput.d.ts +6 -1
- package/dist/components/Input/index.d.ts +3 -3
- package/dist/components/Modal/index.d.ts +1 -2
- package/dist/constants/index.d.ts +0 -2
- package/dist/containers/Pages/ConfirmCode/index.d.ts +1 -1
- package/dist/context/provider.d.ts +5 -4
- package/dist/index.cjs.js +1 -1405
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +1 -1399
- package/dist/index.esm.js.map +1 -1
- package/dist/networks.d.ts +8 -0
- package/dist/types/index.d.ts +31 -13
- package/dist/utils/getWalletNetwork.d.ts +3 -0
- package/dist/utils/network/fallback.d.ts +13 -0
- package/dist/utils/network/url.d.ts +12 -0
- package/dist/utils/setWalletNetwork.d.ts +3 -0
- package/dist/utils/stellar/getTransactionDetails.d.ts +1 -1
- package/dist/utils/stellar/getTransactions.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@ Blux is a **comprehensive authentication and wallet connect kit** designed for S
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Multi-Wallet Support**: Easily integrate Stellar wallets such as **Rabet, xBull, Lobstr, Freighter, and Albedo**.
|
|
8
|
-
- **OAuth & Social Login**
|
|
9
|
-
- **Email & Phone Authentication**
|
|
10
|
-
- **Customizable UI**: Adjust themes, fonts, backgrounds, logos,
|
|
8
|
+
- **OAuth & Social Login** _(Coming Soon)_: Support for **Apple, Meta, Google, and more**.
|
|
9
|
+
- **Email & Phone Authentication** _(Coming Soon)_: Securely onboard users with non-crypto credentials.
|
|
10
|
+
- **Customizable UI**: Adjust themes, fonts, backgrounds, logos, corner radius, and text colors.
|
|
11
11
|
- **Configurable Networks**: Set up and modify network preferences via API keys.
|
|
12
12
|
- **Future-Proof**: More wallets and authentication methods will be added based on community feedback.
|
|
13
13
|
|
|
@@ -30,7 +30,7 @@ yarn add @bluxcc/react
|
|
|
30
30
|
Import Blux and set up the authentication flow:
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import { BluxProvider, useBlux } from
|
|
33
|
+
import { BluxProvider, useBlux } from '@bluxcc/react';
|
|
34
34
|
|
|
35
35
|
const ConnectButton = () => {
|
|
36
36
|
const { connect } = useBlux();
|
|
@@ -39,7 +39,7 @@ const ConnectButton = () => {
|
|
|
39
39
|
|
|
40
40
|
const App = () => {
|
|
41
41
|
return (
|
|
42
|
-
<BluxProvider config={{ appName:
|
|
42
|
+
<BluxProvider config={{ appName: 'YourApp', network: 'testnet' }}>
|
|
43
43
|
<ConnectButton />
|
|
44
44
|
</BluxProvider>
|
|
45
45
|
);
|
|
@@ -53,7 +53,7 @@ export default App;
|
|
|
53
53
|
Developers can customize various UI elements:
|
|
54
54
|
|
|
55
55
|
- **Themes & Fonts**
|
|
56
|
-
- **Backgrounds, Logos
|
|
56
|
+
- **Backgrounds, Logos**
|
|
57
57
|
- **Corner Radius & Text Colors**
|
|
58
58
|
- **Authentication Limits** (Free tier supports 500-1000 accounts per auth method)
|
|
59
59
|
|
package/dist/assets/Icons.d.ts
CHANGED
|
@@ -2,16 +2,38 @@ import React from 'react';
|
|
|
2
2
|
export declare const InfoIcon: ({ fill }: {
|
|
3
3
|
fill?: string;
|
|
4
4
|
}) => React.JSX.Element;
|
|
5
|
-
export declare const ArrowRight: (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
5
|
+
export declare const ArrowRight: ({ fill }: {
|
|
6
|
+
fill?: string;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export declare const ArrowLeft: ({ fill }: {
|
|
9
|
+
fill?: string;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export declare const Close: ({ fill }: {
|
|
12
|
+
fill?: string;
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
export declare const Loading: ({ fill }: {
|
|
15
|
+
fill?: string;
|
|
16
|
+
}) => React.JSX.Element;
|
|
9
17
|
export declare const GreenCheck: () => React.JSX.Element;
|
|
10
18
|
export declare const LogOut: () => React.JSX.Element;
|
|
11
19
|
export declare const Copy: () => React.JSX.Element;
|
|
12
|
-
export declare const History: (
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
export declare const History: ({ fill }: {
|
|
21
|
+
fill?: string;
|
|
22
|
+
}) => React.JSX.Element;
|
|
23
|
+
export declare const Send: ({ fill }: {
|
|
24
|
+
fill?: string;
|
|
25
|
+
}) => React.JSX.Element;
|
|
26
|
+
export declare const ArrowDropUp: ({ fill }: {
|
|
27
|
+
fill?: string;
|
|
28
|
+
}) => React.JSX.Element;
|
|
15
29
|
export declare const RedAlert: () => React.JSX.Element;
|
|
16
30
|
export declare const Upstream: () => React.JSX.Element;
|
|
31
|
+
export declare const MultiOperation: () => React.JSX.Element;
|
|
32
|
+
export declare const Downstream: () => React.JSX.Element;
|
|
17
33
|
export declare const Globe: () => React.JSX.Element;
|
|
34
|
+
export declare const SmallEmailIcon: ({ fill }: {
|
|
35
|
+
fill?: string;
|
|
36
|
+
}) => React.JSX.Element;
|
|
37
|
+
export declare const EmailIcon: ({ fill }: {
|
|
38
|
+
fill?: string;
|
|
39
|
+
}) => React.JSX.Element;
|
package/dist/assets/logos.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
2
|
+
export declare const AlbedoLogo: () => React.JSX.Element;
|
|
3
|
+
export declare const RabetLogo: () => React.JSX.Element;
|
|
4
|
+
export declare const FreighterLogo: () => React.JSX.Element;
|
|
5
|
+
export declare const XBullLogo: () => React.JSX.Element;
|
|
6
|
+
export declare const LobstrLogo: () => React.JSX.Element;
|
|
7
|
+
export declare const StellarLogo: ({ fill }: {
|
|
8
8
|
fill?: string;
|
|
9
9
|
}) => React.JSX.Element;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const StellarSmallLogo: ({ fill }: {
|
|
11
11
|
fill?: string;
|
|
12
12
|
}) => React.JSX.Element;
|
|
13
|
+
export declare const GoogleLogo: () => React.JSX.Element;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type CardItemProps = {
|
|
3
|
-
variant?: 'social' | 'default';
|
|
3
|
+
variant?: 'social' | 'default' | 'input';
|
|
4
4
|
startIcon: React.ReactNode;
|
|
5
5
|
endArrow?: boolean;
|
|
6
|
-
label
|
|
6
|
+
label?: string;
|
|
7
7
|
onClick?: () => void;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
onEnter?: (value: string) => void;
|
|
10
|
+
onSubmit?: (value: string) => void;
|
|
11
|
+
inputType?: 'text' | 'password' | 'number' | 'email' | string;
|
|
8
12
|
};
|
|
9
|
-
declare const CardItem: React.
|
|
13
|
+
declare const CardItem: ({ variant, startIcon, endArrow, label, onClick, onChange, onEnter, onSubmit, inputType, }: CardItemProps) => React.JSX.Element;
|
|
10
14
|
export default CardItem;
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
type InputFieldProps = {
|
|
3
3
|
label?: string;
|
|
4
4
|
placeholder?: string;
|
|
5
|
-
error?:
|
|
6
|
-
|
|
5
|
+
error?: string;
|
|
6
|
+
type?: 'text' | 'password' | 'number';
|
|
7
7
|
iconRight?: React.ReactNode;
|
|
8
8
|
iconLeft?: React.ReactNode;
|
|
9
9
|
button?: string | React.ReactNode;
|
|
@@ -12,5 +12,5 @@ type InputFieldProps = {
|
|
|
12
12
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
13
|
customLabel?: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const InputField: ({ label, placeholder, error,
|
|
15
|
+
declare const InputField: ({ label, type, placeholder, error, iconRight, iconLeft, button, onButtonClick, customLabel, value, onChange, }: InputFieldProps) => React.JSX.Element;
|
|
16
16
|
export default InputField;
|
|
@@ -8,7 +8,6 @@ interface ModalProps {
|
|
|
8
8
|
onInfo?: () => void;
|
|
9
9
|
closeButton?: boolean;
|
|
10
10
|
title: string;
|
|
11
|
-
initialHeight: number;
|
|
12
11
|
}
|
|
13
|
-
declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, title, icon,
|
|
12
|
+
declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, title, icon, closeButton, }: ModalProps) => React.JSX.Element | null;
|
|
14
13
|
export default Modal;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ContextState, IProviderConfig
|
|
2
|
+
import { ContextState, IProviderConfig } from '../types';
|
|
3
3
|
export declare const ProviderContext: React.Context<ContextState | null>;
|
|
4
|
-
|
|
4
|
+
type BluxProviderProps = {
|
|
5
5
|
isDemo?: boolean;
|
|
6
|
-
appearance?: IAppearance;
|
|
7
6
|
config: IProviderConfig;
|
|
8
7
|
children: React.ReactNode;
|
|
9
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const BluxProvider: ({ config, isDemo, children }: BluxProviderProps) => React.JSX.Element;
|
|
10
10
|
export declare const useProvider: () => ContextState;
|
|
11
|
+
export {};
|