@mitrabook/ux 1.0.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/README.md +7 -0
- package/dist/index.css +1 -0
- package/dist/index.d.mts +288 -0
- package/dist/index.d.ts +288 -0
- package/dist/index.js +10 -0
- package/dist/index.mjs +10 -0
- package/package.json +85 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { SizesVariants, InteractionProps, HoverCard, Button, Typography } from '@aksumite/ui';
|
|
2
|
+
export * from '@aksumite/ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ComponentProps, SVGProps, PropsWithChildren, ReactNode } from 'react';
|
|
5
|
+
import { ExtensionStatus, ExtensionAccount } from '@aksumite/react-providers';
|
|
6
|
+
import { ExtensionDetails } from '@aksumite/sdk-types';
|
|
7
|
+
|
|
8
|
+
declare function BTC(props: ComponentProps<"svg">): react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
declare function DOT(props: ComponentProps<"svg">): react.JSX.Element;
|
|
11
|
+
|
|
12
|
+
declare function ETH(props: ComponentProps<"svg">): react.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function PDEX(props: ComponentProps<"svg">): react.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function USDT(props: ComponentProps<"svg">): react.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function IBTC(props: ComponentProps<"svg">): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
declare function UNKN(props: ComponentProps<"svg">): react.JSX.Element;
|
|
21
|
+
|
|
22
|
+
declare function GLMR(props: ComponentProps<"svg">): react.JSX.Element;
|
|
23
|
+
|
|
24
|
+
declare function ASTR(props: ComponentProps<"svg">): react.JSX.Element;
|
|
25
|
+
|
|
26
|
+
declare function EQB(props: ComponentProps<"svg">): react.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare function PHA(props: ComponentProps<"svg">): react.JSX.Element;
|
|
29
|
+
|
|
30
|
+
declare const USDC: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
31
|
+
|
|
32
|
+
declare const DED: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare const PINK: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare const UNQ: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
37
|
+
|
|
38
|
+
declare function BNC(props: ComponentProps<"svg">): react.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare function VDOT(props: ComponentProps<"svg">): react.JSX.Element;
|
|
41
|
+
|
|
42
|
+
declare const Tokens_ASTR: typeof ASTR;
|
|
43
|
+
declare const Tokens_BNC: typeof BNC;
|
|
44
|
+
declare const Tokens_BTC: typeof BTC;
|
|
45
|
+
declare const Tokens_DED: typeof DED;
|
|
46
|
+
declare const Tokens_DOT: typeof DOT;
|
|
47
|
+
declare const Tokens_EQB: typeof EQB;
|
|
48
|
+
declare const Tokens_ETH: typeof ETH;
|
|
49
|
+
declare const Tokens_GLMR: typeof GLMR;
|
|
50
|
+
declare const Tokens_IBTC: typeof IBTC;
|
|
51
|
+
declare const Tokens_PDEX: typeof PDEX;
|
|
52
|
+
declare const Tokens_PHA: typeof PHA;
|
|
53
|
+
declare const Tokens_PINK: typeof PINK;
|
|
54
|
+
declare const Tokens_UNKN: typeof UNKN;
|
|
55
|
+
declare const Tokens_UNQ: typeof UNQ;
|
|
56
|
+
declare const Tokens_USDC: typeof USDC;
|
|
57
|
+
declare const Tokens_USDT: typeof USDT;
|
|
58
|
+
declare const Tokens_VDOT: typeof VDOT;
|
|
59
|
+
declare namespace Tokens {
|
|
60
|
+
export { Tokens_ASTR as ASTR, Tokens_BNC as BNC, Tokens_BTC as BTC, Tokens_DED as DED, Tokens_DOT as DOT, Tokens_EQB as EQB, Tokens_ETH as ETH, Tokens_GLMR as GLMR, Tokens_IBTC as IBTC, Tokens_PDEX as PDEX, Tokens_PHA as PHA, Tokens_PINK as PINK, Tokens_UNKN as UNKN, Tokens_UNQ as UNQ, Tokens_USDC as USDC, Tokens_USDT as USDT, Tokens_VDOT as VDOT };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare const AssetHub: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
64
|
+
|
|
65
|
+
declare const Astar: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
66
|
+
|
|
67
|
+
declare const Bifrost: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
68
|
+
|
|
69
|
+
declare const Ethereum: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
declare const Interlay: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
72
|
+
|
|
73
|
+
declare const Moonbeam: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
74
|
+
|
|
75
|
+
declare const Phala: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
76
|
+
|
|
77
|
+
declare const Polkadex: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
78
|
+
|
|
79
|
+
declare const Polkadot: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
80
|
+
|
|
81
|
+
declare const Unique: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
82
|
+
|
|
83
|
+
declare const Unknown: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
84
|
+
|
|
85
|
+
declare const Chains_AssetHub: typeof AssetHub;
|
|
86
|
+
declare const Chains_Astar: typeof Astar;
|
|
87
|
+
declare const Chains_Bifrost: typeof Bifrost;
|
|
88
|
+
declare const Chains_Ethereum: typeof Ethereum;
|
|
89
|
+
declare const Chains_Interlay: typeof Interlay;
|
|
90
|
+
declare const Chains_Moonbeam: typeof Moonbeam;
|
|
91
|
+
declare const Chains_Phala: typeof Phala;
|
|
92
|
+
declare const Chains_Polkadex: typeof Polkadex;
|
|
93
|
+
declare const Chains_Polkadot: typeof Polkadot;
|
|
94
|
+
declare const Chains_Unique: typeof Unique;
|
|
95
|
+
declare const Chains_Unknown: typeof Unknown;
|
|
96
|
+
declare namespace Chains {
|
|
97
|
+
export { Chains_AssetHub as AssetHub, Chains_Astar as Astar, Chains_Bifrost as Bifrost, Chains_Ethereum as Ethereum, Chains_Interlay as Interlay, Chains_Moonbeam as Moonbeam, Chains_Phala as Phala, Chains_Polkadex as Polkadex, Chains_Polkadot as Polkadot, Chains_Unique as Unique, Chains_Unknown as Unknown };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare const Logo: {
|
|
101
|
+
Thea: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
102
|
+
Orderbook: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
103
|
+
Polkadex: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
104
|
+
Ux: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
type TokensProps = keyof typeof Tokens;
|
|
108
|
+
interface Props$1 extends ComponentProps<"svg"> {
|
|
109
|
+
name: string;
|
|
110
|
+
appearance?: string;
|
|
111
|
+
bordered?: boolean;
|
|
112
|
+
rounded?: boolean;
|
|
113
|
+
size?: SizesVariants;
|
|
114
|
+
loading?: boolean;
|
|
115
|
+
}
|
|
116
|
+
declare const Token: ({ name, appearance, size, loading, bordered, rounded, className, ...props }: Props$1) => react.JSX.Element;
|
|
117
|
+
|
|
118
|
+
interface ChainProps extends ComponentProps<"svg"> {
|
|
119
|
+
name: string;
|
|
120
|
+
size?: SizesVariants;
|
|
121
|
+
loading?: boolean;
|
|
122
|
+
bordered?: boolean;
|
|
123
|
+
rounded?: boolean;
|
|
124
|
+
}
|
|
125
|
+
declare const Chain$1: ({ name, size, loading, bordered, rounded, className, ...props }: ChainProps) => react.JSX.Element;
|
|
126
|
+
|
|
127
|
+
interface ConnectWalletProps extends InteractionProps {
|
|
128
|
+
onConnectProvider: (value: ExtensionDetails) => void;
|
|
129
|
+
installedExtensions: Record<string, ExtensionStatus>;
|
|
130
|
+
onBack: () => void;
|
|
131
|
+
onConnectCallback: () => void;
|
|
132
|
+
showChains?: boolean;
|
|
133
|
+
showTerms?: boolean;
|
|
134
|
+
showFooterClose?: boolean;
|
|
135
|
+
showEvmExtensions?: boolean;
|
|
136
|
+
}
|
|
137
|
+
declare const ConnectWallet: ({ children, onBack, installedExtensions, onConnectProvider, onConnectCallback, showChains, showTerms, showEvmExtensions, showFooterClose, className, ...props }: PropsWithChildren<ConnectWalletProps>) => react.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface ProcessingTransactionProps extends InteractionProps {
|
|
140
|
+
logo: string;
|
|
141
|
+
onRedirect: () => void;
|
|
142
|
+
shouldRedirect: boolean;
|
|
143
|
+
}
|
|
144
|
+
declare const ProcessingTransaction: ({ logo, onRedirect, shouldRedirect, className, ...props }: ProcessingTransactionProps) => react.JSX.Element;
|
|
145
|
+
|
|
146
|
+
interface ExtensionAccountsProps extends InteractionProps {
|
|
147
|
+
extensionAccounts: ExtensionAccount[];
|
|
148
|
+
onSelectExtensionAccount: (v: ExtensionAccount) => void;
|
|
149
|
+
onClose?: () => void;
|
|
150
|
+
onTryAgain?: () => void;
|
|
151
|
+
onRefresh?: () => Promise<boolean>;
|
|
152
|
+
onRedirect?: () => void;
|
|
153
|
+
loading?: boolean;
|
|
154
|
+
success?: boolean;
|
|
155
|
+
extensionIcon?: string;
|
|
156
|
+
extensionName?: string;
|
|
157
|
+
onPermission: () => Promise<boolean>;
|
|
158
|
+
}
|
|
159
|
+
declare const ExtensionAccounts: ({ extensionAccounts, onSelectExtensionAccount, onClose, onTryAgain, onRefresh, onRedirect, loading, success, extensionIcon, extensionName, onPermission, className, ...props }: ExtensionAccountsProps) => react.JSX.Element;
|
|
160
|
+
|
|
161
|
+
type WalletCardProps = {
|
|
162
|
+
name?: string;
|
|
163
|
+
address: string;
|
|
164
|
+
onClick?: () => void;
|
|
165
|
+
withIcon?: boolean;
|
|
166
|
+
hoverable?: boolean;
|
|
167
|
+
present?: boolean;
|
|
168
|
+
addressLength?: number;
|
|
169
|
+
source?: string;
|
|
170
|
+
largeText?: boolean;
|
|
171
|
+
};
|
|
172
|
+
declare const AccountCard: {
|
|
173
|
+
({ name, address, onClick, withIcon, hoverable, addressLength, source, largeText, children }: PropsWithChildren<WalletCardProps>): react.JSX.Element;
|
|
174
|
+
Inverted: ({ name, address, onClick, withIcon, hoverable, present, addressLength, children }: PropsWithChildren<WalletCardProps>) => react.JSX.Element;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
declare const AccountCombobox: ({ account, evm, setAccount, open: controlledOpen, onOpenChange }: {
|
|
178
|
+
account?: ExtensionAccount | null;
|
|
179
|
+
setAccount: (e?: ExtensionAccount | null) => void;
|
|
180
|
+
evm?: boolean;
|
|
181
|
+
/** Optional controlled-open pair so callers (e.g. a form's primary button
|
|
182
|
+
* saying "choose a destination account") can open the picker directly. */
|
|
183
|
+
open?: boolean;
|
|
184
|
+
onOpenChange?: (open: boolean) => void;
|
|
185
|
+
}) => react.JSX.Element;
|
|
186
|
+
|
|
187
|
+
declare const ChainCard: ({ title, description, icon }: {
|
|
188
|
+
title: string;
|
|
189
|
+
description: string;
|
|
190
|
+
icon: TokensProps;
|
|
191
|
+
}) => react.JSX.Element;
|
|
192
|
+
|
|
193
|
+
interface Props extends ComponentProps<"div"> {
|
|
194
|
+
label: string;
|
|
195
|
+
tooltip?: string;
|
|
196
|
+
}
|
|
197
|
+
declare const GenericHorizontalItem: ({ label, tooltip, children, className, ...props }: Props) => react.JSX.Element;
|
|
198
|
+
|
|
199
|
+
declare const HoverInformation: {
|
|
200
|
+
({ children }: {
|
|
201
|
+
children: ReactNode;
|
|
202
|
+
}): react.JSX.Element;
|
|
203
|
+
Trigger: ({ className, children, loading, ...props }: TriggerProps) => react.JSX.Element;
|
|
204
|
+
Content: ({ className, children, ...props }: ComponentProps<typeof HoverCard.Content>) => react.JSX.Element;
|
|
205
|
+
Arrow: ({ children, className, ...props }: ComponentProps<"svg">) => string | number | boolean | react.JSX.Element | Iterable<ReactNode>;
|
|
206
|
+
};
|
|
207
|
+
interface TriggerProps extends ComponentProps<typeof HoverCard.Trigger> {
|
|
208
|
+
loading?: boolean;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
interface ProviderCardProps extends ComponentProps<typeof Button.Ghost> {
|
|
212
|
+
title: string;
|
|
213
|
+
action: () => void;
|
|
214
|
+
icon: string;
|
|
215
|
+
installed?: boolean;
|
|
216
|
+
href?: string;
|
|
217
|
+
}
|
|
218
|
+
declare const ProviderCard: ({ title, action, installed, icon, href, className }: ProviderCardProps) => react.JSX.Element;
|
|
219
|
+
|
|
220
|
+
interface ResponsiveCardProps extends ComponentProps<"div"> {
|
|
221
|
+
label?: string;
|
|
222
|
+
loading?: boolean;
|
|
223
|
+
}
|
|
224
|
+
declare const ResponsiveCard: {
|
|
225
|
+
({ className, label, loading, children, ...props }: ResponsiveCardProps): react.JSX.Element;
|
|
226
|
+
Item: ({ children, loading, ...props }: ItemProps) => string | number | boolean | react.JSX.Element | Iterable<react.ReactNode> | null | undefined;
|
|
227
|
+
};
|
|
228
|
+
interface ItemProps extends ComponentProps<typeof Typography.Text> {
|
|
229
|
+
loading?: boolean;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
type Chain = (typeof chains)[0];
|
|
233
|
+
declare const SelectChain: {
|
|
234
|
+
({ children, chains, onChange }: PropsWithChildren<{
|
|
235
|
+
chains: Chain[];
|
|
236
|
+
onChange: (v: Chain) => void;
|
|
237
|
+
}>): react.JSX.Element;
|
|
238
|
+
Card: ({ title, description, icon }: {
|
|
239
|
+
title: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
icon: string;
|
|
242
|
+
}) => react.JSX.Element;
|
|
243
|
+
};
|
|
244
|
+
declare const Card: ({ title, description, icon }: {
|
|
245
|
+
title: string;
|
|
246
|
+
description?: string;
|
|
247
|
+
icon: string;
|
|
248
|
+
}) => react.JSX.Element;
|
|
249
|
+
|
|
250
|
+
declare const chains: {
|
|
251
|
+
name: string;
|
|
252
|
+
description: string;
|
|
253
|
+
icon: string;
|
|
254
|
+
active: boolean;
|
|
255
|
+
}[];
|
|
256
|
+
|
|
257
|
+
declare const TokenCard: ({ icon, ticker, tokenName, disabled, loading, balance }: {
|
|
258
|
+
icon: string;
|
|
259
|
+
ticker: string;
|
|
260
|
+
tokenName: string;
|
|
261
|
+
disabled?: boolean;
|
|
262
|
+
balance?: number | string;
|
|
263
|
+
loading?: boolean;
|
|
264
|
+
}) => react.JSX.Element;
|
|
265
|
+
|
|
266
|
+
interface ProcessingProps extends ComponentProps<"div"> {
|
|
267
|
+
logo: string;
|
|
268
|
+
errorTitle?: string;
|
|
269
|
+
errorMessage?: string;
|
|
270
|
+
errorButtonTitle?: string;
|
|
271
|
+
onErrorAction?: () => void;
|
|
272
|
+
loadingTitle?: string;
|
|
273
|
+
loadingMessage?: string;
|
|
274
|
+
}
|
|
275
|
+
declare const TransactionLoading: ({ children, logo, errorTitle, errorMessage, errorButtonTitle, onErrorAction, loadingTitle, loadingMessage, className, ...props }: PropsWithChildren<ProcessingProps>) => react.JSX.Element;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @mitrabook/ux — the orderbook-specific UI layer.
|
|
279
|
+
*
|
|
280
|
+
* Re-exports everything from @aksumite/ui (the domain-agnostic component kit)
|
|
281
|
+
* so consumers keep a single import, then adds the pieces that only make
|
|
282
|
+
* sense for this product: token/chain artwork and the wallet + account
|
|
283
|
+
* flows in readyToUse/ and plugAndPlay/.
|
|
284
|
+
*/
|
|
285
|
+
|
|
286
|
+
type ChainsLogos = keyof typeof Chains;
|
|
287
|
+
|
|
288
|
+
export { AccountCard, AccountCombobox, Card, Chain$1 as Chain, ChainCard, Chains, type ChainsLogos, ConnectWallet, ExtensionAccounts, GenericHorizontalItem, HoverInformation, Logo, ProcessingTransaction, ProviderCard, ResponsiveCard, SelectChain, Token, TokenCard, Tokens, type TokensProps, TransactionLoading, chains };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { SizesVariants, InteractionProps, HoverCard, Button, Typography } from '@aksumite/ui';
|
|
2
|
+
export * from '@aksumite/ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ComponentProps, SVGProps, PropsWithChildren, ReactNode } from 'react';
|
|
5
|
+
import { ExtensionStatus, ExtensionAccount } from '@aksumite/react-providers';
|
|
6
|
+
import { ExtensionDetails } from '@aksumite/sdk-types';
|
|
7
|
+
|
|
8
|
+
declare function BTC(props: ComponentProps<"svg">): react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
declare function DOT(props: ComponentProps<"svg">): react.JSX.Element;
|
|
11
|
+
|
|
12
|
+
declare function ETH(props: ComponentProps<"svg">): react.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function PDEX(props: ComponentProps<"svg">): react.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function USDT(props: ComponentProps<"svg">): react.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function IBTC(props: ComponentProps<"svg">): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
declare function UNKN(props: ComponentProps<"svg">): react.JSX.Element;
|
|
21
|
+
|
|
22
|
+
declare function GLMR(props: ComponentProps<"svg">): react.JSX.Element;
|
|
23
|
+
|
|
24
|
+
declare function ASTR(props: ComponentProps<"svg">): react.JSX.Element;
|
|
25
|
+
|
|
26
|
+
declare function EQB(props: ComponentProps<"svg">): react.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare function PHA(props: ComponentProps<"svg">): react.JSX.Element;
|
|
29
|
+
|
|
30
|
+
declare const USDC: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
31
|
+
|
|
32
|
+
declare const DED: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare const PINK: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare const UNQ: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
37
|
+
|
|
38
|
+
declare function BNC(props: ComponentProps<"svg">): react.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare function VDOT(props: ComponentProps<"svg">): react.JSX.Element;
|
|
41
|
+
|
|
42
|
+
declare const Tokens_ASTR: typeof ASTR;
|
|
43
|
+
declare const Tokens_BNC: typeof BNC;
|
|
44
|
+
declare const Tokens_BTC: typeof BTC;
|
|
45
|
+
declare const Tokens_DED: typeof DED;
|
|
46
|
+
declare const Tokens_DOT: typeof DOT;
|
|
47
|
+
declare const Tokens_EQB: typeof EQB;
|
|
48
|
+
declare const Tokens_ETH: typeof ETH;
|
|
49
|
+
declare const Tokens_GLMR: typeof GLMR;
|
|
50
|
+
declare const Tokens_IBTC: typeof IBTC;
|
|
51
|
+
declare const Tokens_PDEX: typeof PDEX;
|
|
52
|
+
declare const Tokens_PHA: typeof PHA;
|
|
53
|
+
declare const Tokens_PINK: typeof PINK;
|
|
54
|
+
declare const Tokens_UNKN: typeof UNKN;
|
|
55
|
+
declare const Tokens_UNQ: typeof UNQ;
|
|
56
|
+
declare const Tokens_USDC: typeof USDC;
|
|
57
|
+
declare const Tokens_USDT: typeof USDT;
|
|
58
|
+
declare const Tokens_VDOT: typeof VDOT;
|
|
59
|
+
declare namespace Tokens {
|
|
60
|
+
export { Tokens_ASTR as ASTR, Tokens_BNC as BNC, Tokens_BTC as BTC, Tokens_DED as DED, Tokens_DOT as DOT, Tokens_EQB as EQB, Tokens_ETH as ETH, Tokens_GLMR as GLMR, Tokens_IBTC as IBTC, Tokens_PDEX as PDEX, Tokens_PHA as PHA, Tokens_PINK as PINK, Tokens_UNKN as UNKN, Tokens_UNQ as UNQ, Tokens_USDC as USDC, Tokens_USDT as USDT, Tokens_VDOT as VDOT };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare const AssetHub: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
64
|
+
|
|
65
|
+
declare const Astar: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
66
|
+
|
|
67
|
+
declare const Bifrost: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
68
|
+
|
|
69
|
+
declare const Ethereum: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
declare const Interlay: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
72
|
+
|
|
73
|
+
declare const Moonbeam: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
74
|
+
|
|
75
|
+
declare const Phala: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
76
|
+
|
|
77
|
+
declare const Polkadex: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
78
|
+
|
|
79
|
+
declare const Polkadot: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
80
|
+
|
|
81
|
+
declare const Unique: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
82
|
+
|
|
83
|
+
declare const Unknown: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
|
|
84
|
+
|
|
85
|
+
declare const Chains_AssetHub: typeof AssetHub;
|
|
86
|
+
declare const Chains_Astar: typeof Astar;
|
|
87
|
+
declare const Chains_Bifrost: typeof Bifrost;
|
|
88
|
+
declare const Chains_Ethereum: typeof Ethereum;
|
|
89
|
+
declare const Chains_Interlay: typeof Interlay;
|
|
90
|
+
declare const Chains_Moonbeam: typeof Moonbeam;
|
|
91
|
+
declare const Chains_Phala: typeof Phala;
|
|
92
|
+
declare const Chains_Polkadex: typeof Polkadex;
|
|
93
|
+
declare const Chains_Polkadot: typeof Polkadot;
|
|
94
|
+
declare const Chains_Unique: typeof Unique;
|
|
95
|
+
declare const Chains_Unknown: typeof Unknown;
|
|
96
|
+
declare namespace Chains {
|
|
97
|
+
export { Chains_AssetHub as AssetHub, Chains_Astar as Astar, Chains_Bifrost as Bifrost, Chains_Ethereum as Ethereum, Chains_Interlay as Interlay, Chains_Moonbeam as Moonbeam, Chains_Phala as Phala, Chains_Polkadex as Polkadex, Chains_Polkadot as Polkadot, Chains_Unique as Unique, Chains_Unknown as Unknown };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare const Logo: {
|
|
101
|
+
Thea: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
102
|
+
Orderbook: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
103
|
+
Polkadex: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
104
|
+
Ux: (props: ComponentProps<"svg">) => react.JSX.Element;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
type TokensProps = keyof typeof Tokens;
|
|
108
|
+
interface Props$1 extends ComponentProps<"svg"> {
|
|
109
|
+
name: string;
|
|
110
|
+
appearance?: string;
|
|
111
|
+
bordered?: boolean;
|
|
112
|
+
rounded?: boolean;
|
|
113
|
+
size?: SizesVariants;
|
|
114
|
+
loading?: boolean;
|
|
115
|
+
}
|
|
116
|
+
declare const Token: ({ name, appearance, size, loading, bordered, rounded, className, ...props }: Props$1) => react.JSX.Element;
|
|
117
|
+
|
|
118
|
+
interface ChainProps extends ComponentProps<"svg"> {
|
|
119
|
+
name: string;
|
|
120
|
+
size?: SizesVariants;
|
|
121
|
+
loading?: boolean;
|
|
122
|
+
bordered?: boolean;
|
|
123
|
+
rounded?: boolean;
|
|
124
|
+
}
|
|
125
|
+
declare const Chain$1: ({ name, size, loading, bordered, rounded, className, ...props }: ChainProps) => react.JSX.Element;
|
|
126
|
+
|
|
127
|
+
interface ConnectWalletProps extends InteractionProps {
|
|
128
|
+
onConnectProvider: (value: ExtensionDetails) => void;
|
|
129
|
+
installedExtensions: Record<string, ExtensionStatus>;
|
|
130
|
+
onBack: () => void;
|
|
131
|
+
onConnectCallback: () => void;
|
|
132
|
+
showChains?: boolean;
|
|
133
|
+
showTerms?: boolean;
|
|
134
|
+
showFooterClose?: boolean;
|
|
135
|
+
showEvmExtensions?: boolean;
|
|
136
|
+
}
|
|
137
|
+
declare const ConnectWallet: ({ children, onBack, installedExtensions, onConnectProvider, onConnectCallback, showChains, showTerms, showEvmExtensions, showFooterClose, className, ...props }: PropsWithChildren<ConnectWalletProps>) => react.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface ProcessingTransactionProps extends InteractionProps {
|
|
140
|
+
logo: string;
|
|
141
|
+
onRedirect: () => void;
|
|
142
|
+
shouldRedirect: boolean;
|
|
143
|
+
}
|
|
144
|
+
declare const ProcessingTransaction: ({ logo, onRedirect, shouldRedirect, className, ...props }: ProcessingTransactionProps) => react.JSX.Element;
|
|
145
|
+
|
|
146
|
+
interface ExtensionAccountsProps extends InteractionProps {
|
|
147
|
+
extensionAccounts: ExtensionAccount[];
|
|
148
|
+
onSelectExtensionAccount: (v: ExtensionAccount) => void;
|
|
149
|
+
onClose?: () => void;
|
|
150
|
+
onTryAgain?: () => void;
|
|
151
|
+
onRefresh?: () => Promise<boolean>;
|
|
152
|
+
onRedirect?: () => void;
|
|
153
|
+
loading?: boolean;
|
|
154
|
+
success?: boolean;
|
|
155
|
+
extensionIcon?: string;
|
|
156
|
+
extensionName?: string;
|
|
157
|
+
onPermission: () => Promise<boolean>;
|
|
158
|
+
}
|
|
159
|
+
declare const ExtensionAccounts: ({ extensionAccounts, onSelectExtensionAccount, onClose, onTryAgain, onRefresh, onRedirect, loading, success, extensionIcon, extensionName, onPermission, className, ...props }: ExtensionAccountsProps) => react.JSX.Element;
|
|
160
|
+
|
|
161
|
+
type WalletCardProps = {
|
|
162
|
+
name?: string;
|
|
163
|
+
address: string;
|
|
164
|
+
onClick?: () => void;
|
|
165
|
+
withIcon?: boolean;
|
|
166
|
+
hoverable?: boolean;
|
|
167
|
+
present?: boolean;
|
|
168
|
+
addressLength?: number;
|
|
169
|
+
source?: string;
|
|
170
|
+
largeText?: boolean;
|
|
171
|
+
};
|
|
172
|
+
declare const AccountCard: {
|
|
173
|
+
({ name, address, onClick, withIcon, hoverable, addressLength, source, largeText, children }: PropsWithChildren<WalletCardProps>): react.JSX.Element;
|
|
174
|
+
Inverted: ({ name, address, onClick, withIcon, hoverable, present, addressLength, children }: PropsWithChildren<WalletCardProps>) => react.JSX.Element;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
declare const AccountCombobox: ({ account, evm, setAccount, open: controlledOpen, onOpenChange }: {
|
|
178
|
+
account?: ExtensionAccount | null;
|
|
179
|
+
setAccount: (e?: ExtensionAccount | null) => void;
|
|
180
|
+
evm?: boolean;
|
|
181
|
+
/** Optional controlled-open pair so callers (e.g. a form's primary button
|
|
182
|
+
* saying "choose a destination account") can open the picker directly. */
|
|
183
|
+
open?: boolean;
|
|
184
|
+
onOpenChange?: (open: boolean) => void;
|
|
185
|
+
}) => react.JSX.Element;
|
|
186
|
+
|
|
187
|
+
declare const ChainCard: ({ title, description, icon }: {
|
|
188
|
+
title: string;
|
|
189
|
+
description: string;
|
|
190
|
+
icon: TokensProps;
|
|
191
|
+
}) => react.JSX.Element;
|
|
192
|
+
|
|
193
|
+
interface Props extends ComponentProps<"div"> {
|
|
194
|
+
label: string;
|
|
195
|
+
tooltip?: string;
|
|
196
|
+
}
|
|
197
|
+
declare const GenericHorizontalItem: ({ label, tooltip, children, className, ...props }: Props) => react.JSX.Element;
|
|
198
|
+
|
|
199
|
+
declare const HoverInformation: {
|
|
200
|
+
({ children }: {
|
|
201
|
+
children: ReactNode;
|
|
202
|
+
}): react.JSX.Element;
|
|
203
|
+
Trigger: ({ className, children, loading, ...props }: TriggerProps) => react.JSX.Element;
|
|
204
|
+
Content: ({ className, children, ...props }: ComponentProps<typeof HoverCard.Content>) => react.JSX.Element;
|
|
205
|
+
Arrow: ({ children, className, ...props }: ComponentProps<"svg">) => string | number | boolean | react.JSX.Element | Iterable<ReactNode>;
|
|
206
|
+
};
|
|
207
|
+
interface TriggerProps extends ComponentProps<typeof HoverCard.Trigger> {
|
|
208
|
+
loading?: boolean;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
interface ProviderCardProps extends ComponentProps<typeof Button.Ghost> {
|
|
212
|
+
title: string;
|
|
213
|
+
action: () => void;
|
|
214
|
+
icon: string;
|
|
215
|
+
installed?: boolean;
|
|
216
|
+
href?: string;
|
|
217
|
+
}
|
|
218
|
+
declare const ProviderCard: ({ title, action, installed, icon, href, className }: ProviderCardProps) => react.JSX.Element;
|
|
219
|
+
|
|
220
|
+
interface ResponsiveCardProps extends ComponentProps<"div"> {
|
|
221
|
+
label?: string;
|
|
222
|
+
loading?: boolean;
|
|
223
|
+
}
|
|
224
|
+
declare const ResponsiveCard: {
|
|
225
|
+
({ className, label, loading, children, ...props }: ResponsiveCardProps): react.JSX.Element;
|
|
226
|
+
Item: ({ children, loading, ...props }: ItemProps) => string | number | boolean | react.JSX.Element | Iterable<react.ReactNode> | null | undefined;
|
|
227
|
+
};
|
|
228
|
+
interface ItemProps extends ComponentProps<typeof Typography.Text> {
|
|
229
|
+
loading?: boolean;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
type Chain = (typeof chains)[0];
|
|
233
|
+
declare const SelectChain: {
|
|
234
|
+
({ children, chains, onChange }: PropsWithChildren<{
|
|
235
|
+
chains: Chain[];
|
|
236
|
+
onChange: (v: Chain) => void;
|
|
237
|
+
}>): react.JSX.Element;
|
|
238
|
+
Card: ({ title, description, icon }: {
|
|
239
|
+
title: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
icon: string;
|
|
242
|
+
}) => react.JSX.Element;
|
|
243
|
+
};
|
|
244
|
+
declare const Card: ({ title, description, icon }: {
|
|
245
|
+
title: string;
|
|
246
|
+
description?: string;
|
|
247
|
+
icon: string;
|
|
248
|
+
}) => react.JSX.Element;
|
|
249
|
+
|
|
250
|
+
declare const chains: {
|
|
251
|
+
name: string;
|
|
252
|
+
description: string;
|
|
253
|
+
icon: string;
|
|
254
|
+
active: boolean;
|
|
255
|
+
}[];
|
|
256
|
+
|
|
257
|
+
declare const TokenCard: ({ icon, ticker, tokenName, disabled, loading, balance }: {
|
|
258
|
+
icon: string;
|
|
259
|
+
ticker: string;
|
|
260
|
+
tokenName: string;
|
|
261
|
+
disabled?: boolean;
|
|
262
|
+
balance?: number | string;
|
|
263
|
+
loading?: boolean;
|
|
264
|
+
}) => react.JSX.Element;
|
|
265
|
+
|
|
266
|
+
interface ProcessingProps extends ComponentProps<"div"> {
|
|
267
|
+
logo: string;
|
|
268
|
+
errorTitle?: string;
|
|
269
|
+
errorMessage?: string;
|
|
270
|
+
errorButtonTitle?: string;
|
|
271
|
+
onErrorAction?: () => void;
|
|
272
|
+
loadingTitle?: string;
|
|
273
|
+
loadingMessage?: string;
|
|
274
|
+
}
|
|
275
|
+
declare const TransactionLoading: ({ children, logo, errorTitle, errorMessage, errorButtonTitle, onErrorAction, loadingTitle, loadingMessage, className, ...props }: PropsWithChildren<ProcessingProps>) => react.JSX.Element;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @mitrabook/ux — the orderbook-specific UI layer.
|
|
279
|
+
*
|
|
280
|
+
* Re-exports everything from @aksumite/ui (the domain-agnostic component kit)
|
|
281
|
+
* so consumers keep a single import, then adds the pieces that only make
|
|
282
|
+
* sense for this product: token/chain artwork and the wallet + account
|
|
283
|
+
* flows in readyToUse/ and plugAndPlay/.
|
|
284
|
+
*/
|
|
285
|
+
|
|
286
|
+
type ChainsLogos = keyof typeof Chains;
|
|
287
|
+
|
|
288
|
+
export { AccountCard, AccountCombobox, Card, Chain$1 as Chain, ChainCard, Chains, type ChainsLogos, ConnectWallet, ExtensionAccounts, GenericHorizontalItem, HoverInformation, Logo, ProcessingTransaction, ProviderCard, ResponsiveCard, SelectChain, Token, TokenCard, Tokens, type TokensProps, TransactionLoading, chains };
|