@make-software/csprclick-ui 1.2.1 → 1.4.2

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.
Files changed (73) hide show
  1. package/dist/cjs/lib/assets/animations/dotsDark.gif +0 -0
  2. package/dist/cjs/lib/assets/animations/dotsLight.gif +0 -0
  3. package/dist/cjs/lib/assets/animations/spinnerDark.gif +0 -0
  4. package/dist/cjs/lib/assets/animations/spinnerLight.gif +0 -0
  5. package/dist/cjs/lib/assets/generic-wallet-logo-dark.svg +4 -0
  6. package/dist/cjs/lib/assets/generic-wallet-logo.svg +4 -0
  7. package/dist/cjs/lib/assets/icons/ic-error.svg +10 -0
  8. package/dist/cjs/lib/assets/icons/ic-no-provider.png +0 -0
  9. package/dist/cjs/lib/assets/icons/rate.svg +3 -0
  10. package/dist/cjs/lib/assets/logos/casper-signer-sign.png +0 -0
  11. package/dist/cjs/lib/assets/logos/casper-wallet-sign.png +0 -0
  12. package/dist/cjs/lib/assets/logos/cspr-click-mono-black.png +0 -0
  13. package/dist/cjs/lib/assets/logos/logo.svg +4 -0
  14. package/dist/cjs/lib/assets/logos/walletconnect-logo.svg +16 -0
  15. package/dist/cjs/lib/assets/logos/walletconnect-white-bg.svg +3 -0
  16. package/dist/cjs/lib/index.js +11 -6
  17. package/dist/cjs/lib/lib/BuyCspr/BuyCSPRContainer.d.ts +9 -0
  18. package/dist/cjs/lib/lib/BuyCspr/api/onRampApi.d.ts +9 -0
  19. package/dist/cjs/lib/lib/BuyCspr/api/useOnRamApi.d.ts +14 -0
  20. package/dist/cjs/lib/lib/BuyCspr/components/BuyCSPRForm.d.ts +2 -0
  21. package/dist/cjs/lib/lib/BuyCspr/components/ChooseProvider.d.ts +12 -0
  22. package/dist/cjs/lib/lib/BuyCspr/components/NoAvailableProviders.d.ts +11 -0
  23. package/dist/cjs/lib/lib/BuyCspr/components/ProviderRow.d.ts +3 -0
  24. package/dist/cjs/lib/lib/BuyCspr/components/RedirectionBlocked.d.ts +6 -0
  25. package/dist/cjs/lib/lib/BuyCspr/types.d.ts +113 -0
  26. package/dist/cjs/lib/lib/Click.d.ts +1 -1
  27. package/dist/cjs/lib/lib/ClickModal.d.ts +1 -0
  28. package/dist/cjs/lib/lib/{ClickTopBar.d.ts → ClickUI.d.ts} +9 -4
  29. package/dist/cjs/lib/lib/InfoPopup/InfoPopup.d.ts +10 -0
  30. package/dist/cjs/lib/lib/OneClickSignIn/OneClickSignIn.d.ts +12 -0
  31. package/dist/cjs/lib/lib/ProviderConnection/ProviderConnection.d.ts +1 -1
  32. package/dist/cjs/lib/lib/{TopBar/components → SkeletonLoader}/SkeletonLoader.d.ts +1 -1
  33. package/dist/cjs/lib/lib/TopBar/components/BuyCSPRMenuItem.d.ts +1 -1
  34. package/dist/cjs/lib/lib/{ProviderConnection/components → TransactionReview}/DeploySignatureInstructions.d.ts +3 -1
  35. package/dist/cjs/lib/lib/{ProviderConnection/components → TransactionReview}/MessageSignatureInstructions.d.ts +2 -1
  36. package/dist/cjs/lib/lib/TransactionReview/TransactionReviewHandler.d.ts +2 -0
  37. package/dist/cjs/lib/lib/WalletConnect/WalletConnectConnection.d.ts +22 -0
  38. package/dist/cjs/lib/lib/WalletConnect/components/ListAccounts.d.ts +13 -0
  39. package/dist/cjs/lib/lib/WalletConnect/components/NewPairing.d.ts +10 -0
  40. package/dist/cjs/lib/lib/WalletConnect/components/PairedWalletListItem.d.ts +13 -0
  41. package/dist/cjs/lib/lib/WalletConnect/components/PairedWallets.d.ts +13 -0
  42. package/dist/cjs/lib/lib/components/AccountIdenticon.d.ts +9 -0
  43. package/dist/cjs/lib/lib/components/AccountListItemMenu.d.ts +2 -1
  44. package/dist/cjs/lib/lib/components/ScrollContainer.d.ts +5 -2
  45. package/dist/cjs/lib/lib/components/WalletLogo.d.ts +3 -2
  46. package/dist/cjs/lib/lib/constants/index.d.ts +2 -0
  47. package/dist/cjs/lib/lib/index.d.ts +3 -2
  48. package/dist/cjs/lib/lib/types/theme.d.ts +17 -0
  49. package/dist/cjs/lib/lib/types/wallet.d.ts +2 -11
  50. package/dist/index.d.ts +44 -19
  51. package/dist/lib/assets/animations/dotsDark.gif +0 -0
  52. package/dist/lib/assets/animations/dotsLight.gif +0 -0
  53. package/dist/lib/assets/animations/spinnerDark.gif +0 -0
  54. package/dist/lib/assets/animations/spinnerLight.gif +0 -0
  55. package/dist/lib/assets/generic-wallet-logo-dark.svg +4 -0
  56. package/dist/lib/assets/generic-wallet-logo.svg +4 -0
  57. package/dist/lib/assets/icons/ic-error.svg +10 -0
  58. package/dist/lib/assets/icons/ic-no-provider.png +0 -0
  59. package/dist/lib/assets/icons/rate.svg +3 -0
  60. package/dist/lib/assets/logos/casper-signer-sign.png +0 -0
  61. package/dist/lib/assets/logos/casper-wallet-sign.png +0 -0
  62. package/dist/lib/assets/logos/cspr-click-mono-black.png +0 -0
  63. package/dist/lib/assets/logos/logo.svg +4 -0
  64. package/dist/lib/assets/logos/walletconnect-logo.svg +16 -0
  65. package/dist/lib/assets/logos/walletconnect-white-bg.svg +3 -0
  66. package/dist/lib/index.js +11 -6
  67. package/package.json +10 -9
  68. package/package.json.local +9 -5
  69. package/dist/cjs/lib/lib/ChooseAccount/ChooseAccount.d.ts +0 -12
  70. package/dist/cjs/lib/lib/CustomerActionWindow/CustomerActionWindow.d.ts +0 -9
  71. package/dist/cjs/lib/lib/WarningNoticePopup/WarningNoticePopup.d.ts +0 -10
  72. package/dist/cjs/lib/lib/components/ModalHeader.d.ts +0 -7
  73. /package/dist/cjs/lib/lib/{ChooseAccount → OneClickSignIn}/ChooseAccountModal.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import { CSPRClickSDK } from '@make-software/csprclick-core-client';
2
+ import { ThemeModeType } from '../types';
3
+ interface BuyCsprContainerProps {
4
+ clickRef: CSPRClickSDK;
5
+ themeMode?: ThemeModeType;
6
+ onModalClose: () => void;
7
+ }
8
+ export declare const BuyCSPRContainer: ({ clickRef, themeMode, onModalClose }: BuyCsprContainerProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ConfirmBuyCSPRResponse, GetOnRampResponse, GetResponseType, ResponseOnRampProps } from '../types';
2
+ export declare const ON_RAMP_API: string;
3
+ type OnRampApi = {
4
+ getBuyCSPRData: () => Promise<GetResponseType<GetOnRampResponse>>;
5
+ getProvidersList: (payload: any) => Promise<GetResponseType<ResponseOnRampProps>>;
6
+ confirmBuyCSPR: (payload: any) => Promise<GetResponseType<ConfirmBuyCSPRResponse>>;
7
+ };
8
+ export declare const onRampApi: OnRampApi;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ConfirmBuyCSPRResponse, GetOnRampResponse, GetResponseType, ResponseOnRampProps } from "../types";
2
+ export declare const useGetBuyCSPRData: () => GetResponseType<GetOnRampResponse>;
3
+ export declare const useGetProvidersList: () => {
4
+ loading?: boolean | undefined;
5
+ error?: import("../types").ErrorResult | null | undefined;
6
+ data?: ResponseOnRampProps | null | undefined;
7
+ update: (payload: any) => void;
8
+ };
9
+ export declare const useConfirmBuyCSPR: () => {
10
+ loading?: boolean | undefined;
11
+ error?: import("../types").ErrorResult | null | undefined;
12
+ data?: ConfirmBuyCSPRResponse | null | undefined;
13
+ update: (payload: any) => void;
14
+ };
@@ -0,0 +1,2 @@
1
+ import { BuyCSPRFormProps } from '../types';
2
+ export declare const BuyCSPRForm: ({ acc, buyCSPRFormData, onNextStep, themeMode, }: BuyCSPRFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { ResponseOnRampProps } from '../types';
2
+ interface ChooseProviderProps {
3
+ rampData: ResponseOnRampProps;
4
+ lastInputIsCrypto: boolean;
5
+ countryTitle: string;
6
+ currencyCode: string;
7
+ onSubmit: (data: any) => void;
8
+ onBack: () => void;
9
+ onClose: () => void;
10
+ }
11
+ export declare const ChooseProvider: ({ rampData, lastInputIsCrypto, countryTitle, currencyCode, onSubmit, onBack, onClose, }: ChooseProviderProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import { OnRampError } from '../types';
2
+ interface NoAvailableProvidersProps {
3
+ countryTitle?: string;
4
+ currencyCode?: string;
5
+ message?: string;
6
+ onBack?: () => void;
7
+ onClose: () => void;
8
+ error?: OnRampError;
9
+ }
10
+ export declare const NoAvailableProviders: ({ countryTitle, currencyCode, message, error, onBack, onClose, }: NoAvailableProvidersProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ProviderRowProps } from '../types';
2
+ export declare const ProviderRow: ({ providerName, csprExchangeRate, cryptoAsset, cryptoAmount, isActive, onClick, logoSVG, logoPNG, margin, fees, }: ProviderRowProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ProviderRow;
@@ -0,0 +1,6 @@
1
+ export interface RedirectionBlockedProps {
2
+ provider: string;
3
+ location: string;
4
+ onClose: () => void;
5
+ }
6
+ export declare const RedirectionBlocked: ({ provider, location, onClose, }: RedirectionBlockedProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,113 @@
1
+ import { AccountType } from '@make-software/csprclick-core-types';
2
+ import { ThemeModeType } from '../types';
3
+ import React from "react";
4
+ export interface CountryProps {
5
+ value: string;
6
+ label: string;
7
+ icon?: React.ReactElement;
8
+ }
9
+ export interface CurrencyProps {
10
+ value: string;
11
+ label: string;
12
+ rate: number;
13
+ }
14
+ export interface ResponseCountryProps {
15
+ name: string;
16
+ code: string;
17
+ }
18
+ export interface ResponseCurrencyProps {
19
+ id: number;
20
+ code: string;
21
+ type_id: string;
22
+ rate: number;
23
+ }
24
+ export interface BuyCSPRFormDataProps {
25
+ countryList: CountryProps[];
26
+ country: CountryProps;
27
+ currencyList: CurrencyProps[];
28
+ currency: CurrencyProps;
29
+ isLoading: boolean;
30
+ fiatAmount: string;
31
+ csprAmount: string;
32
+ isLastInputCrypto: boolean;
33
+ providersList: any;
34
+ reloadProviders: boolean;
35
+ }
36
+ export interface GetOnRampResponse {
37
+ countries: ResponseCountryProps[];
38
+ defaultCountry: string;
39
+ currencies: ResponseCurrencyProps[];
40
+ defaultCurrency: string;
41
+ defaultAmount: string;
42
+ }
43
+ export interface BuyCSPRFormProps {
44
+ acc: AccountType | null;
45
+ buyCSPRFormData: BuyCSPRFormDataProps;
46
+ onNextStep: (data: RequestOnRampProps, lastInputIsCrypto: boolean) => void;
47
+ themeMode?: ThemeModeType;
48
+ }
49
+ export interface RequestOnRampProps {
50
+ country: string | CountryProps;
51
+ currency: string | CurrencyProps;
52
+ amount: number;
53
+ approxAmount: number;
54
+ paymentCurrency: string;
55
+ }
56
+ export interface ProviderProps {
57
+ cryptoAmount: string;
58
+ cryptoCurrency: string;
59
+ fiatAmount: string;
60
+ fiatCurrency: string;
61
+ csprExchangeRate: string;
62
+ fees: string;
63
+ logoPNG: string;
64
+ logoSVG?: string;
65
+ providerKey: string;
66
+ providerName: string;
67
+ }
68
+ export interface ResponseOnRampProps {
69
+ availableProviders: ProviderProps[];
70
+ currencies: CurrencyProps[];
71
+ fiatAmount: number;
72
+ fiatCurrency: string;
73
+ cryptoAmount: number;
74
+ cryptoCurrency: string;
75
+ isCryptoChanged: boolean;
76
+ }
77
+ export interface OnRampError {
78
+ code?: string;
79
+ message?: string;
80
+ description?: string;
81
+ serverIsDown?: boolean;
82
+ }
83
+ export interface ResponseOnRampErrorProps {
84
+ error: OnRampError | null;
85
+ }
86
+ export interface ConfirmBuyCSPRResponse {
87
+ provider: string;
88
+ location: string;
89
+ }
90
+ export interface ProviderRowProps {
91
+ logoSVG?: string | null;
92
+ logoPNG?: string | null;
93
+ providerName: string;
94
+ fees: string;
95
+ cryptoAmount: string;
96
+ cryptoAsset: string;
97
+ csprExchangeRate: string;
98
+ margin?: string;
99
+ isActive?: boolean;
100
+ onClick?: () => any;
101
+ }
102
+ export interface ErrorResult {
103
+ code: string;
104
+ message: string;
105
+ description?: string;
106
+ }
107
+ export type GetResponseType<Entity> = {
108
+ loading: boolean;
109
+ error: ErrorResult | null;
110
+ data: Entity | null;
111
+ };
112
+ export declare const initCountry: CountryProps;
113
+ export declare const initCurrency: CurrencyProps;
@@ -12,5 +12,5 @@ interface ClickProviderProps {
12
12
  children: any;
13
13
  }
14
14
  export declare function ClickProvider(props: ClickProviderProps): import("react/jsx-runtime").JSX.Element;
15
- export declare function useClickRef(): CSPRClickSDK | undefined;
15
+ export declare function useClickRef(): CSPRClickSDK;
16
16
  export default ClickProvider;
@@ -9,6 +9,7 @@ interface ClickModalProps {
9
9
  clickRef: any;
10
10
  signInOptions: any;
11
11
  themeMode?: ThemeModeType;
12
+ rootAppElement?: string;
12
13
  }
13
14
  export declare function ClickModal(props: ClickModalProps): import("react/jsx-runtime").JSX.Element;
14
15
  export default ClickModal;
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CurrencySettings, LanguageSettings, NetworkSettings, ThemeModeType, CustomTopBarMenuSettings } from './types';
3
- interface ClickTopBarProps {
4
- themeMode?: ThemeModeType;
3
+ export interface TopBarSettings {
5
4
  onThemeSwitch?: () => void;
6
5
  accountMenuItems?: React.ReactElement[];
7
6
  languageSettings?: LanguageSettings;
@@ -9,5 +8,11 @@ interface ClickTopBarProps {
9
8
  networkSettings?: NetworkSettings;
10
9
  customTopBarMenuSettings?: CustomTopBarMenuSettings[];
11
10
  }
12
- export declare function ClickTopBar({ themeMode, onThemeSwitch, accountMenuItems, languageSettings, currencySettings, networkSettings, customTopBarMenuSettings, }: ClickTopBarProps): import("react/jsx-runtime").JSX.Element;
13
- export default ClickTopBar;
11
+ interface ClickUIProps {
12
+ themeMode?: ThemeModeType;
13
+ topBarSettings?: TopBarSettings;
14
+ rootAppElement?: string;
15
+ show1ClickModal?: boolean;
16
+ }
17
+ export declare function ClickUI({ themeMode, topBarSettings, rootAppElement, show1ClickModal, }: ClickUIProps): import("react/jsx-runtime").JSX.Element;
18
+ export default ClickUI;
@@ -0,0 +1,10 @@
1
+ import { ThemeModeType } from '@make-software/cspr-ui';
2
+ import React from "react";
3
+ export interface InfoPopupRef {
4
+ hide: () => void;
5
+ }
6
+ interface InfoPopupProps {
7
+ themeMode?: ThemeModeType;
8
+ }
9
+ export declare const InfoPopup: React.ForwardRefExoticComponent<InfoPopupProps & React.RefAttributes<InfoPopupRef>>;
10
+ export default InfoPopup;
@@ -0,0 +1,12 @@
1
+ import { AccountType } from '@make-software/csprclick-core-types';
2
+ import { ThemeModeType } from "../types";
3
+ interface OneClickSignInProps {
4
+ accounts: AccountType[];
5
+ onAccountClick: (acc: AccountType | null) => Promise<void>;
6
+ handleClose: () => void;
7
+ onMoreAccountsClick: () => void;
8
+ themeMode?: ThemeModeType;
9
+ }
10
+ export declare const OneClickSignInInner: (props: OneClickSignInProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const OneClickSignIn: (props: OneClickSignInProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default OneClickSignIn;
@@ -20,5 +20,5 @@ interface ProviderConnectionProps {
20
20
  themeMode?: ThemeModeType;
21
21
  onModalClose?: () => void;
22
22
  }
23
- export declare const ProviderConnection: ({ clickRef, event, themeMode, onModalClose }: ProviderConnectionProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const ProviderConnection: ({ clickRef, event, themeMode, onModalClose, }: ProviderConnectionProps) => import("react/jsx-runtime").JSX.Element;
24
24
  export default ProviderConnection;
@@ -4,5 +4,5 @@ interface SkeletonComponentProps {
4
4
  width?: string;
5
5
  height?: string;
6
6
  }
7
- export declare const SkeletonLoader: ({ baseColor, animationColor, height, width }: SkeletonComponentProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const SkeletonLoader: ({ baseColor, animationColor, height, width, }: SkeletonComponentProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -1,4 +1,4 @@
1
- import { BadgeProps } from "./AccountMenuItem";
1
+ import { BadgeProps } from './AccountMenuItem';
2
2
  interface BuyCSPRMenuItemProps {
3
3
  badge?: BadgeProps;
4
4
  }
@@ -1,6 +1,8 @@
1
- import { ThemeModeType } from "../../types";
1
+ import { ThemeModeType } from '../types';
2
2
  interface DeploySignatureInstructionsProps {
3
3
  deployHash: string;
4
+ deviceTitle: string;
5
+ warningInfo?: any;
4
6
  themeMode?: ThemeModeType;
5
7
  }
6
8
  export declare const DeploySignatureInstructions: (props: DeploySignatureInstructionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
- import { ThemeModeType } from "../../types";
1
+ import { ThemeModeType } from "../types";
2
2
  interface MessageSignatureInstructionsProps {
3
3
  message: string;
4
4
  messageHash: string;
5
+ deviceTitle: string;
5
6
  themeMode?: ThemeModeType;
6
7
  }
7
8
  export declare const MessageSignatureInstructions: (props: MessageSignatureInstructionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CSPRClickSDK } from '@make-software/csprclick-core-client';
2
+ export declare const transactionReviewHandler: (event: any, clickRef: CSPRClickSDK) => void;
@@ -0,0 +1,22 @@
1
+ import { AccountType, WCConnectionStatusEvent, WCPairing } from '@make-software/csprclick-core-types';
2
+ import { CSPRClickSDK } from '@make-software/csprclick-core-client';
3
+ import { ThemeModeType } from '../types';
4
+ export type WalletConnectStatus = {
5
+ status: WCConnectionStatusEvent;
6
+ pairings?: WCPairing[];
7
+ pairingUri?: string;
8
+ accounts?: AccountType[];
9
+ deployHash?: string;
10
+ signatureHex?: string;
11
+ message?: string;
12
+ msgHash?: string;
13
+ error?: any;
14
+ };
15
+ interface WalletConnectConnectionProps {
16
+ clickRef: CSPRClickSDK;
17
+ event: WalletConnectStatus;
18
+ themeMode?: ThemeModeType;
19
+ onModalClose?: () => void;
20
+ }
21
+ export declare const WalletConnectConnection: ({ clickRef, event, themeMode, onModalClose, }: WalletConnectConnectionProps) => import("react/jsx-runtime").JSX.Element;
22
+ export default WalletConnectConnection;
@@ -0,0 +1,13 @@
1
+ import { AccountType } from '@make-software/csprclick-core-types';
2
+ import { CSPRClickSDK } from '@make-software/csprclick-core-client';
3
+ import { ThemeModeType } from '../../types';
4
+ interface ListAccountsProps {
5
+ appName: string;
6
+ clickRef: CSPRClickSDK;
7
+ accounts: Array<AccountType>;
8
+ onAccountClick: (acc: AccountType) => Promise<void>;
9
+ onUseAnotherAccountClick: () => Promise<void>;
10
+ themeMode?: ThemeModeType;
11
+ }
12
+ export declare const ListAccounts: (props: ListAccountsProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ThemeModeType } from '../../types';
2
+ import { CSPRClickSDK } from "@make-software/csprclick-core-client";
3
+ interface NewPairingProps {
4
+ pairingUri: string;
5
+ appName: string;
6
+ themeMode?: ThemeModeType;
7
+ clickRef: CSPRClickSDK;
8
+ }
9
+ export declare const NewPairing: ({ pairingUri, appName, clickRef }: NewPairingProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,13 @@
1
+ import { WCPairing } from '@make-software/csprclick-core-types';
2
+ import { ThemeModeType } from '../../types';
3
+ interface PairedWalletListItemProps {
4
+ wallet?: WCPairing;
5
+ isNarrowItem?: boolean;
6
+ onClick: (wallet: WCPairing | null) => void;
7
+ onUnpair?: (e: any, wallet: WCPairing) => void;
8
+ themeMode?: ThemeModeType;
9
+ withBalance?: boolean;
10
+ isItemActive?: boolean;
11
+ }
12
+ declare const PairedWalletListItem: ({ wallet, onClick, onUnpair, isNarrowItem, isItemActive, themeMode }: PairedWalletListItemProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default PairedWalletListItem;
@@ -0,0 +1,13 @@
1
+ import { WCPairing } from '@make-software/csprclick-core-types';
2
+ import { CSPRClickSDK } from '@make-software/csprclick-core-client';
3
+ import { ThemeModeType } from '../../types';
4
+ interface PairedWalletsProps {
5
+ appName: string;
6
+ clickRef: CSPRClickSDK;
7
+ pairings: Array<WCPairing>;
8
+ onWalletClick: (wallet: WCPairing) => Promise<void>;
9
+ onNewPairing: () => Promise<void>;
10
+ themeMode?: ThemeModeType;
11
+ }
12
+ export declare const PairedWallets: ({ pairings, onWalletClick, themeMode, onNewPairing, appName, clickRef }: PairedWalletsProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare const CanvasContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ size: number;
3
+ }, never>;
4
+ interface AccountIdenticonProps {
5
+ hex: string;
6
+ size: 'xs' | 'sm' | 'm' | 'l' | number;
7
+ }
8
+ export declare const AccountIdenticon: ({ hex, size }: AccountIdenticonProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -2,6 +2,7 @@ interface AccountListItemMenuProps {
2
2
  onMenuOpen: () => void;
3
3
  onCloseSession: (e: any) => void;
4
4
  isItemActive?: boolean;
5
+ title?: string;
5
6
  }
6
- declare const AccountListItemMenu: ({ onMenuOpen, onCloseSession, isItemActive }: AccountListItemMenuProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const AccountListItemMenu: ({ onMenuOpen, onCloseSession, isItemActive, title }: AccountListItemMenuProps) => import("react/jsx-runtime").JSX.Element;
7
8
  export default AccountListItemMenu;
@@ -2,17 +2,20 @@
2
2
  interface ScrollContainerProps {
3
3
  isModalOverflowing?: boolean;
4
4
  customMaxHeight?: number;
5
+ customMinHeight?: number;
5
6
  children: any;
6
7
  variation?: string;
7
8
  }
8
9
  export declare const ScrollWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@make-software/cspr-ui").FlexColumnProps & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, ScrollContainerProps & {
9
10
  maxHeight: number;
11
+ minHeight?: number | undefined;
10
12
  isScrolling?: boolean | undefined;
11
13
  onMouseLeave?: (() => void) | undefined;
12
14
  }, never>;
13
15
  export declare enum ScrollVariations {
14
16
  'small' = "small",
15
- 'big' = "big"
17
+ 'big' = "big",
18
+ 'medium' = "medium"
16
19
  }
17
- declare const ScrollContainer: ({ children, isModalOverflowing, variation, customMaxHeight, }: ScrollContainerProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const ScrollContainer: ({ children, isModalOverflowing, variation, customMaxHeight, customMinHeight, }: ScrollContainerProps) => import("react/jsx-runtime").JSX.Element;
18
21
  export default ScrollContainer;
@@ -1,4 +1,4 @@
1
- import { ThemeModeType } from '../types';
1
+ import { ThemeModeType } from '@make-software/cspr-ui';
2
2
  export declare enum Size {
3
3
  small = "small",
4
4
  default = "default"
@@ -7,6 +7,7 @@ interface WalletLogoProps {
7
7
  providerKey: string;
8
8
  size?: Size.small | Size.default;
9
9
  themeMode?: ThemeModeType;
10
+ logoPath?: string;
10
11
  }
11
- declare const WalletLogo: ({ providerKey, size, themeMode }: WalletLogoProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const WalletLogo: ({ providerKey, size, themeMode, logoPath }: WalletLogoProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export default WalletLogo;
@@ -5,5 +5,7 @@ export declare const MODAL_ACTIONS: {
5
5
  CHOSE_ACCOUNT: string;
6
6
  LEDGER_PROVIDER_UI: string;
7
7
  METAMASK_PROVIDER_UI: string;
8
+ WALLETCONNECT_PROVIDER_UI: string;
9
+ BUY_CSPR: string;
8
10
  };
9
11
  export type MODAL_ACTIONS = string;
@@ -1,7 +1,7 @@
1
- export * from './ChooseAccount/ChooseAccount';
1
+ export * from './OneClickSignIn/OneClickSignIn';
2
2
  export * from './Click';
3
3
  export * from './ClickModal';
4
- export * from './ClickTopBar';
4
+ export * from './ClickUI';
5
5
  export * from './constants';
6
6
  export * from './SignIn/SignIn';
7
7
  export * from './TopBar/TopBar';
@@ -10,4 +10,5 @@ export * from './TopBar/components/AccountMenuItem';
10
10
  export * from './TopBar/components/BuyCSPRMenuItem';
11
11
  export * from './TopBar/components/CopyHashMenuItem';
12
12
  export * from './TopBar/components/ViewAccountOnExplorerMenuItem';
13
+ export * from './components/AccountIdenticon';
13
14
  export * from './types';
@@ -1,5 +1,22 @@
1
1
  export declare const CsprClickThemes: any;
2
+ export interface getThemesByColorProps {
3
+ csprclickDarkTheme: object;
4
+ csprclickLightTheme: object;
5
+ appDarkTheme: object;
6
+ appLightTheme: object;
7
+ }
8
+ export declare enum mappedColors {
9
+ backgroundTopBarColor = "backgroundTertiary",
10
+ backgroundMenuColor = "backgroundPrimary",
11
+ hoverProductMenu = "backgroundSecondary",
12
+ hoverAccountMenu = "fillSecondary",
13
+ textColor = "contentPrimary"
14
+ }
2
15
  export declare enum ThemeModeType {
3
16
  light = "light",
4
17
  dark = "dark"
5
18
  }
19
+ export declare const getThemesByColor: (theme: getThemesByColorProps) => {
20
+ dark: any;
21
+ light: any;
22
+ };
@@ -1,17 +1,8 @@
1
- import { AccountType } from '@make-software/csprclick-core-types';
2
- export declare enum WalletKeys {
3
- CasperWallet = "casper-wallet",
4
- CasperSigner = "casper-signer",
5
- Ledger = "ledger",
6
- Torus = "torus-wallet",
7
- CasperDash = "casperdash",
8
- MetamaskSnap = "metamask-snap"
9
- }
10
- export type ProviderKeys = WalletKeys.CasperWallet | WalletKeys.CasperSigner;
1
+ import { AccountType, WALLET_KEYS } from '@make-software/csprclick-core-types';
11
2
  export type Provider = {
12
3
  connected: boolean;
13
4
  icon: string;
14
- key: ProviderKeys;
5
+ key: WALLET_KEYS;
15
6
  text: string;
16
7
  };
17
8
  export type Options = {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { AccountType, BadgeSettings } from '@make-software/csprclick-core-types';
2
+ import { WALLET_KEYS, AccountType, BadgeSettings } from '@make-software/csprclick-core-types';
3
3
  import CSPRClickSDK from '@make-software/csprclick-core-client/sdk';
4
4
  import { CsprClickInitOptions } from '@make-software/csprclick-core-client';
5
5
  import React from 'react';
@@ -67,24 +67,32 @@ interface NetworkSettings {
67
67
  }
68
68
 
69
69
  declare const CsprClickThemes: any;
70
+ interface getThemesByColorProps {
71
+ csprclickDarkTheme: object;
72
+ csprclickLightTheme: object;
73
+ appDarkTheme: object;
74
+ appLightTheme: object;
75
+ }
76
+ declare enum mappedColors {
77
+ backgroundTopBarColor = "backgroundTertiary",
78
+ backgroundMenuColor = "backgroundPrimary",
79
+ hoverProductMenu = "backgroundSecondary",
80
+ hoverAccountMenu = "fillSecondary",
81
+ textColor = "contentPrimary"
82
+ }
70
83
  declare enum ThemeModeType {
71
84
  light = "light",
72
85
  dark = "dark"
73
86
  }
87
+ declare const getThemesByColor: (theme: getThemesByColorProps) => {
88
+ dark: any;
89
+ light: any;
90
+ };
74
91
 
75
- declare enum WalletKeys {
76
- CasperWallet = "casper-wallet",
77
- CasperSigner = "casper-signer",
78
- Ledger = "ledger",
79
- Torus = "torus-wallet",
80
- CasperDash = "casperdash",
81
- MetamaskSnap = "metamask-snap"
82
- }
83
- type ProviderKeys = WalletKeys.CasperWallet | WalletKeys.CasperSigner;
84
92
  type Provider = {
85
93
  connected: boolean;
86
94
  icon: string;
87
- key: ProviderKeys;
95
+ key: WALLET_KEYS;
88
96
  text: string;
89
97
  };
90
98
  type Options = {
@@ -92,14 +100,14 @@ type Options = {
92
100
  accounts: AccountType[];
93
101
  };
94
102
 
95
- interface ChooseAccountProps {
103
+ interface OneClickSignInProps {
96
104
  accounts: AccountType[];
97
105
  onAccountClick: (acc: AccountType | null) => Promise<void>;
98
106
  handleClose: () => void;
99
- onChooseAccount: () => void;
107
+ onMoreAccountsClick: () => void;
100
108
  themeMode?: ThemeModeType;
101
109
  }
102
- declare const ChooseAccountInner: (props: ChooseAccountProps) => react_jsx_runtime.JSX.Element;
110
+ declare const OneClickSignInInner: (props: OneClickSignInProps) => react_jsx_runtime.JSX.Element;
103
111
 
104
112
  declare global {
105
113
  interface Window {
@@ -113,7 +121,7 @@ interface ClickProviderProps {
113
121
  children: any;
114
122
  }
115
123
  declare function ClickProvider(props: ClickProviderProps): react_jsx_runtime.JSX.Element;
116
- declare function useClickRef(): CSPRClickSDK | undefined;
124
+ declare function useClickRef(): CSPRClickSDK;
117
125
 
118
126
  interface ClickModalProps {
119
127
  modalAction: string;
@@ -124,11 +132,11 @@ interface ClickModalProps {
124
132
  clickRef: any;
125
133
  signInOptions: any;
126
134
  themeMode?: ThemeModeType;
135
+ rootAppElement?: string;
127
136
  }
128
137
  declare function ClickModal(props: ClickModalProps): react_jsx_runtime.JSX.Element;
129
138
 
130
- interface ClickTopBarProps {
131
- themeMode?: ThemeModeType;
139
+ interface TopBarSettings {
132
140
  onThemeSwitch?: () => void;
133
141
  accountMenuItems?: React.ReactElement[];
134
142
  languageSettings?: LanguageSettings;
@@ -136,7 +144,13 @@ interface ClickTopBarProps {
136
144
  networkSettings?: NetworkSettings;
137
145
  customTopBarMenuSettings?: CustomTopBarMenuSettings[];
138
146
  }
139
- declare function ClickTopBar({ themeMode, onThemeSwitch, accountMenuItems, languageSettings, currencySettings, networkSettings, customTopBarMenuSettings, }: ClickTopBarProps): react_jsx_runtime.JSX.Element;
147
+ interface ClickUIProps {
148
+ themeMode?: ThemeModeType;
149
+ topBarSettings?: TopBarSettings;
150
+ rootAppElement?: string;
151
+ show1ClickModal?: boolean;
152
+ }
153
+ declare function ClickUI({ themeMode, topBarSettings, rootAppElement, show1ClickModal, }: ClickUIProps): react_jsx_runtime.JSX.Element;
140
154
 
141
155
  declare const MODAL_ACTIONS: {
142
156
  NONE: string;
@@ -145,6 +159,8 @@ declare const MODAL_ACTIONS: {
145
159
  CHOSE_ACCOUNT: string;
146
160
  LEDGER_PROVIDER_UI: string;
147
161
  METAMASK_PROVIDER_UI: string;
162
+ WALLETCONNECT_PROVIDER_UI: string;
163
+ BUY_CSPR: string;
148
164
  };
149
165
  type MODAL_ACTIONS = string;
150
166
 
@@ -203,4 +219,13 @@ declare const CopyHashMenuItem: (props: any) => react_jsx_runtime.JSX.Element;
203
219
 
204
220
  declare const ViewAccountOnExplorerMenuItem: (props: any) => react_jsx_runtime.JSX.Element;
205
221
 
206
- export { AccountMenuItem, type AccountMenuItemProps, type BadgeBackgroundColor, type BadgeProps, BannerLink, BuyCSPRMenuItem, CURRENCY, CUSTOM, ChooseAccountInner, ClickModal, ClickProvider, ClickTopBar, CopyHashMenuItem, CsprClickThemes, type Currency, type CurrencySettings, CurrencyType, type CustomTopBarMenuItem, type CustomTopBarMenuSettings, LANGUAGE, Lang, type LanguageSettings, MODAL_ACTIONS, NETWORK, type Network, type NetworkSettings, type Options, type Provider, type ProviderKeys, SignIn, type SignInSceneProps, ThemeModeType, TopBar, ViewAccountOnExplorerMenuItem, WalletKeys, useClickBadge, useClickRef };
222
+ declare const CanvasContainer: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
223
+ size: number;
224
+ }, never>;
225
+ interface AccountIdenticonProps {
226
+ hex: string;
227
+ size: 'xs' | 'sm' | 'm' | 'l' | number;
228
+ }
229
+ declare const AccountIdenticon: ({ hex, size }: AccountIdenticonProps) => react_jsx_runtime.JSX.Element;
230
+
231
+ export { AccountIdenticon, AccountMenuItem, type AccountMenuItemProps, type BadgeBackgroundColor, type BadgeProps, BannerLink, BuyCSPRMenuItem, CURRENCY, CUSTOM, CanvasContainer, ClickModal, ClickProvider, ClickUI, CopyHashMenuItem, CsprClickThemes, type Currency, type CurrencySettings, CurrencyType, type CustomTopBarMenuItem, type CustomTopBarMenuSettings, LANGUAGE, Lang, type LanguageSettings, MODAL_ACTIONS, NETWORK, type Network, type NetworkSettings, OneClickSignInInner, type Options, type Provider, SignIn, type SignInSceneProps, ThemeModeType, TopBar, type TopBarSettings, ViewAccountOnExplorerMenuItem, getThemesByColor, type getThemesByColorProps, mappedColors, useClickBadge, useClickRef };