@tuwaio/nova-transactions 0.2.5 → 0.2.6
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/dist/{TransactionsInfoModal-6RO18o9e.d.cts → TransactionsInfoModal-DSBueMY4.d.cts} +318 -8
- package/dist/{TransactionsInfoModal-6RO18o9e.d.ts → TransactionsInfoModal-DSBueMY4.d.ts} +318 -8
- package/dist/chunk-B3JQWEZF.cjs +1 -0
- package/dist/chunk-QZL22XK4.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +1 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.d.cts +2 -2
- package/dist/providers/index.d.ts +2 -2
- package/dist/providers/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-2DECUTV3.cjs +0 -15
- package/dist/chunk-2UT35IW2.js +0 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DialogContent } from '@tuwaio/nova-core';
|
|
2
|
+
import { ToastCloseButtonProps, DialogContent } from '@tuwaio/nova-core';
|
|
3
3
|
import { TransactionStatus, Transaction, TxAdapter, TransactionPool, ITxTrackingStore, InitialTransaction } from '@tuwaio/pulsar-core';
|
|
4
4
|
import { ReactNode, ComponentType, JSX, ComponentPropsWithoutRef } from 'react';
|
|
5
5
|
import { OrbitAdapter } from '@tuwaio/orbit-core';
|
|
@@ -21,8 +21,21 @@ type HashLinkProps = {
|
|
|
21
21
|
variant?: 'default' | 'compact';
|
|
22
22
|
/** Additional CSS classes to apply to the container element for custom styling. */
|
|
23
23
|
className?: string;
|
|
24
|
+
/** Granular class names for sub-elements */
|
|
25
|
+
classNames?: {
|
|
26
|
+
/** Classes for the label text */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Classes for the link element */
|
|
29
|
+
link?: string;
|
|
30
|
+
/** Classes for the hash text */
|
|
31
|
+
hash?: string;
|
|
32
|
+
/** Classes for the copy button */
|
|
33
|
+
copyButton?: string;
|
|
34
|
+
/** Classes for the link icon */
|
|
35
|
+
linkIcon?: string;
|
|
36
|
+
};
|
|
24
37
|
};
|
|
25
|
-
declare function HashLink({ label, hash, explorerUrl, variant, className }: HashLinkProps): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function HashLink({ label, hash, explorerUrl, variant, className, classNames }: HashLinkProps): react_jsx_runtime.JSX.Element;
|
|
26
39
|
|
|
27
40
|
/**
|
|
28
41
|
* @file This file contains the `StatusAwareText` component, which displays different text based on a transaction's status.
|
|
@@ -194,6 +207,7 @@ type NovaTransactionsProviderProps<T extends Transaction> = {
|
|
|
194
207
|
};
|
|
195
208
|
customization?: {
|
|
196
209
|
toast?: ToastTransactionCustomization<T>;
|
|
210
|
+
toastCloseButton?: Omit<ToastCloseButtonProps, 'closeToast'>;
|
|
197
211
|
transactionsInfoModal?: TransactionsInfoModalCustomization<T>;
|
|
198
212
|
trackingTxModal?: TrackingTxModalCustomization<T>;
|
|
199
213
|
};
|
|
@@ -210,14 +224,27 @@ type TransactionKeyProps<T extends Transaction> = Pick<NovaTransactionsProviderP
|
|
|
210
224
|
className?: string;
|
|
211
225
|
renderHashLink?: (props: HashLinkProps) => ReactNode;
|
|
212
226
|
confirmations?: number;
|
|
227
|
+
/** ClassNames to pass to HashLink components (default and replaced hash) */
|
|
228
|
+
hashLinkClassNames?: HashLinkProps['classNames'];
|
|
229
|
+
/** ClassNames for original hash link in replaced transactions (falls back to hashLinkClassNames) */
|
|
230
|
+
originalHashLinkClassNames?: HashLinkProps['classNames'];
|
|
213
231
|
};
|
|
214
|
-
declare function TransactionKey<T extends Transaction>({ tx, adapter, variant, className, renderHashLink, confirmations, }: TransactionKeyProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
232
|
+
declare function TransactionKey<T extends Transaction>({ tx, adapter, variant, className, renderHashLink, confirmations, hashLinkClassNames, originalHashLinkClassNames, }: TransactionKeyProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
215
233
|
|
|
216
234
|
type TransactionStatusBadgeProps<T extends Transaction> = {
|
|
217
235
|
tx: T;
|
|
218
236
|
className?: string;
|
|
237
|
+
/** Granular class names for sub-elements */
|
|
238
|
+
classNames?: {
|
|
239
|
+
/** Classes for the badge container */
|
|
240
|
+
container?: string;
|
|
241
|
+
/** Classes for the status icon */
|
|
242
|
+
icon?: string;
|
|
243
|
+
/** Classes for the label text */
|
|
244
|
+
label?: string;
|
|
245
|
+
};
|
|
219
246
|
};
|
|
220
|
-
declare function TransactionStatusBadge<T extends Transaction>({ tx, className }: TransactionStatusBadgeProps<T>): react_jsx_runtime.JSX.Element;
|
|
247
|
+
declare function TransactionStatusBadge<T extends Transaction>({ tx, className, classNames, }: TransactionStatusBadgeProps<T>): react_jsx_runtime.JSX.Element;
|
|
221
248
|
|
|
222
249
|
/**
|
|
223
250
|
* @file This file contains the `ToastTransaction` component, which serves as the main body for a transaction notification toast.
|
|
@@ -226,8 +253,10 @@ declare function TransactionStatusBadge<T extends Transaction>({ tx, className }
|
|
|
226
253
|
type CustomActionButtonProps = {
|
|
227
254
|
onClick: () => void;
|
|
228
255
|
children: ReactNode;
|
|
256
|
+
className?: string;
|
|
229
257
|
};
|
|
230
258
|
type ToastTransactionCustomization<T extends Transaction> = {
|
|
259
|
+
/** Custom components */
|
|
231
260
|
components?: {
|
|
232
261
|
StatusAwareText?: ComponentType<StatusAwareTextProps>;
|
|
233
262
|
TransactionKey?: ComponentType<TransactionKeyProps<T>>;
|
|
@@ -236,6 +265,51 @@ type ToastTransactionCustomization<T extends Transaction> = {
|
|
|
236
265
|
SpeedUpButton?: ComponentType<CustomActionButtonProps>;
|
|
237
266
|
CancelButton?: ComponentType<CustomActionButtonProps>;
|
|
238
267
|
};
|
|
268
|
+
/** Granular classNames for all sub-elements */
|
|
269
|
+
classNames?: {
|
|
270
|
+
/** Classes for the toast container */
|
|
271
|
+
container?: string;
|
|
272
|
+
/** Classes for the header section (icon + content) */
|
|
273
|
+
header?: string;
|
|
274
|
+
/** Classes for the icon wrapper */
|
|
275
|
+
iconWrapper?: string;
|
|
276
|
+
/** Classes for the content wrapper */
|
|
277
|
+
contentWrapper?: string;
|
|
278
|
+
/** Classes for the title text */
|
|
279
|
+
title?: string;
|
|
280
|
+
/** Classes for the description text */
|
|
281
|
+
description?: string;
|
|
282
|
+
/** Classes for the transaction key section */
|
|
283
|
+
transactionKey?: string;
|
|
284
|
+
/** Classes for the default hash label */
|
|
285
|
+
hashLabel?: string;
|
|
286
|
+
/** Classes for the default hash link */
|
|
287
|
+
hashLink?: string;
|
|
288
|
+
/** Classes for the default hash copy button */
|
|
289
|
+
hashCopyButton?: string;
|
|
290
|
+
/** Classes for the original hash label (replaced transactions) */
|
|
291
|
+
originalHashLabel?: string;
|
|
292
|
+
/** Classes for the original hash link (replaced transactions) */
|
|
293
|
+
originalHashLink?: string;
|
|
294
|
+
/** Classes for the original hash copy button (replaced transactions) */
|
|
295
|
+
originalHashCopyButton?: string;
|
|
296
|
+
/** Classes for the footer section */
|
|
297
|
+
footer?: string;
|
|
298
|
+
/** Classes for the status badge container */
|
|
299
|
+
statusBadge?: string;
|
|
300
|
+
/** Classes for the status badge icon */
|
|
301
|
+
statusBadgeIcon?: string;
|
|
302
|
+
/** Classes for the status badge label */
|
|
303
|
+
statusBadgeLabel?: string;
|
|
304
|
+
/** Classes for the actions container */
|
|
305
|
+
actionsContainer?: string;
|
|
306
|
+
/** Classes for the SpeedUp button */
|
|
307
|
+
speedUpButton?: string;
|
|
308
|
+
/** Classes for the Cancel button */
|
|
309
|
+
cancelButton?: string;
|
|
310
|
+
/** Classes for the TxInfo button */
|
|
311
|
+
txInfoButton?: string;
|
|
312
|
+
};
|
|
239
313
|
};
|
|
240
314
|
type ToastTransactionProps<T extends Transaction> = {
|
|
241
315
|
tx: T;
|
|
@@ -266,6 +340,7 @@ type CustomFooterProps = {
|
|
|
266
340
|
type TrackingTxModalCustomization<T extends Transaction> = {
|
|
267
341
|
modalProps?: Partial<ComponentPropsWithoutRef<typeof DialogContent>>;
|
|
268
342
|
motionProps?: MotionProps;
|
|
343
|
+
/** Custom components to override default elements */
|
|
269
344
|
components?: {
|
|
270
345
|
Header?: ComponentType<CustomHeaderProps$1>;
|
|
271
346
|
Footer?: ComponentType<CustomFooterProps>;
|
|
@@ -274,6 +349,58 @@ type TrackingTxModalCustomization<T extends Transaction> = {
|
|
|
274
349
|
InfoBlock?: ComponentType<TxInfoBlockProps<T>>;
|
|
275
350
|
ErrorBlock?: ComponentType<TxErrorBlockProps>;
|
|
276
351
|
};
|
|
352
|
+
/** Granular classNames for all sub-elements */
|
|
353
|
+
classNames?: {
|
|
354
|
+
/** Classes for the outer container */
|
|
355
|
+
container?: string;
|
|
356
|
+
/** Classes for the header section */
|
|
357
|
+
header?: string;
|
|
358
|
+
/** Classes for the header title */
|
|
359
|
+
headerTitle?: string;
|
|
360
|
+
/** Classes for the close button */
|
|
361
|
+
closeButton?: string;
|
|
362
|
+
/** Classes for the main content area */
|
|
363
|
+
main?: string;
|
|
364
|
+
/** Classes for the footer section */
|
|
365
|
+
footer?: string;
|
|
366
|
+
/** Classes for the actions container (left side of footer) */
|
|
367
|
+
footerActions?: string;
|
|
368
|
+
/** Classes for the buttons container (right side of footer) */
|
|
369
|
+
footerButtons?: string;
|
|
370
|
+
/** Classes for the SpeedUp button */
|
|
371
|
+
speedUpButton?: string;
|
|
372
|
+
/** Classes for the Cancel button */
|
|
373
|
+
cancelButton?: string;
|
|
374
|
+
/** Classes for the Retry button */
|
|
375
|
+
retryButton?: string;
|
|
376
|
+
/** Classes for the All Transactions button */
|
|
377
|
+
allTransactionsButton?: string;
|
|
378
|
+
/** Classes for the Close button */
|
|
379
|
+
closeModalButton?: string;
|
|
380
|
+
};
|
|
381
|
+
/** Customization for TxInfoBlock */
|
|
382
|
+
infoBlockCustomization?: TxInfoBlockCustomization<T>;
|
|
383
|
+
/** Customization for TxProgressIndicator */
|
|
384
|
+
progressIndicatorCustomization?: {
|
|
385
|
+
/** Container className */
|
|
386
|
+
className?: string;
|
|
387
|
+
/** Step classNames */
|
|
388
|
+
stepClassNames?: TxProgressIndicatorProps['stepClassNames'];
|
|
389
|
+
};
|
|
390
|
+
/** Customization for TxStatusVisual */
|
|
391
|
+
statusVisualCustomization?: {
|
|
392
|
+
/** Container className */
|
|
393
|
+
className?: string;
|
|
394
|
+
/** Icon classNames with status-specific overrides */
|
|
395
|
+
iconClassNames?: TxStatusVisualClassNames;
|
|
396
|
+
};
|
|
397
|
+
/** Customization for TxErrorBlock */
|
|
398
|
+
errorBlockCustomization?: {
|
|
399
|
+
/** Container className */
|
|
400
|
+
className?: string;
|
|
401
|
+
/** Granular classNames */
|
|
402
|
+
classNames?: TxErrorBlockClassNames;
|
|
403
|
+
};
|
|
277
404
|
};
|
|
278
405
|
type TrackingTxModalProps<T extends Transaction> = Pick<NovaTransactionsProviderProps<T>, 'executeTxAction' | 'initialTx' | 'transactionsPool' | 'adapter' | 'connectedWalletAddress'> & {
|
|
279
406
|
onClose: (txKey?: string) => void;
|
|
@@ -286,28 +413,70 @@ declare function TrackingTxModal<T extends Transaction>({ adapter, onClose, onOp
|
|
|
286
413
|
/**
|
|
287
414
|
* @file This file contains the `TxErrorBlock` component for displaying transaction error messages.
|
|
288
415
|
*/
|
|
416
|
+
type TxErrorBlockClassNames = {
|
|
417
|
+
/** Classes for the container */
|
|
418
|
+
container?: string;
|
|
419
|
+
/** Classes for the header row */
|
|
420
|
+
header?: string;
|
|
421
|
+
/** Classes for the title container (icon + text) */
|
|
422
|
+
title?: string;
|
|
423
|
+
/** Classes for the error icon */
|
|
424
|
+
icon?: string;
|
|
425
|
+
/** Classes for the copy button */
|
|
426
|
+
copyButton?: string;
|
|
427
|
+
/** Classes for the message container */
|
|
428
|
+
messageContainer?: string;
|
|
429
|
+
/** Classes for the message text */
|
|
430
|
+
messageText?: string;
|
|
431
|
+
};
|
|
289
432
|
type TxErrorBlockProps = {
|
|
290
433
|
/** The error message string to display. If undefined or empty, the component renders nothing. */
|
|
291
434
|
error?: string;
|
|
292
435
|
/** Optional additional CSS classes for the container. */
|
|
293
436
|
className?: string;
|
|
437
|
+
/** Granular classNames for sub-elements */
|
|
438
|
+
classNames?: TxErrorBlockClassNames;
|
|
294
439
|
};
|
|
295
440
|
/**
|
|
296
441
|
* A component that displays a formatted block for a transaction error message.
|
|
297
442
|
* It includes a title, an icon, the error message in a scrollable area,
|
|
298
443
|
* and a button to copy the message to the clipboard.
|
|
299
444
|
*/
|
|
300
|
-
declare function TxErrorBlock({ error, className }: TxErrorBlockProps): react_jsx_runtime.JSX.Element | null;
|
|
445
|
+
declare function TxErrorBlock({ error, className, classNames }: TxErrorBlockProps): react_jsx_runtime.JSX.Element | null;
|
|
301
446
|
|
|
302
447
|
type CustomInfoRowProps = {
|
|
303
448
|
label: ReactNode;
|
|
304
449
|
value: ReactNode;
|
|
450
|
+
classNames?: InfoRowClassNames;
|
|
451
|
+
};
|
|
452
|
+
type InfoRowClassNames = {
|
|
453
|
+
row?: string;
|
|
454
|
+
label?: string;
|
|
455
|
+
value?: string;
|
|
305
456
|
};
|
|
306
457
|
type TxInfoBlockCustomization<T extends Transaction> = {
|
|
458
|
+
/** Custom components */
|
|
307
459
|
components?: {
|
|
308
460
|
InfoRow?: ComponentType<CustomInfoRowProps>;
|
|
309
461
|
transactionKey?: TransactionKeyProps<T>['renderHashLink'];
|
|
310
462
|
};
|
|
463
|
+
/** Granular classNames for sub-elements */
|
|
464
|
+
classNames?: {
|
|
465
|
+
/** Classes for the container */
|
|
466
|
+
container?: string;
|
|
467
|
+
/** Classes for info row */
|
|
468
|
+
row?: string;
|
|
469
|
+
/** Classes for row label */
|
|
470
|
+
rowLabel?: string;
|
|
471
|
+
/** Classes for row value */
|
|
472
|
+
rowValue?: string;
|
|
473
|
+
/** Classes for the transaction key section separator */
|
|
474
|
+
separator?: string;
|
|
475
|
+
/** ClassNames for the hash link (Tx Hash row) */
|
|
476
|
+
hashLink?: HashLinkProps['classNames'];
|
|
477
|
+
/** ClassNames for original hash link in replaced transactions (falls back to hashLink) */
|
|
478
|
+
originalHashLink?: HashLinkProps['classNames'];
|
|
479
|
+
};
|
|
311
480
|
};
|
|
312
481
|
type TxInfoBlockProps<T extends Transaction> = {
|
|
313
482
|
/** The transaction object to display, which can be a full transaction or an initial one. */
|
|
@@ -322,11 +491,29 @@ type TxInfoBlockProps<T extends Transaction> = {
|
|
|
322
491
|
declare function TxInfoBlock<T extends Transaction>({ tx, adapter, className, customization }: TxInfoBlockProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
323
492
|
|
|
324
493
|
type StepStatus = 'active' | 'completed' | 'error' | 'inactive' | 'replaced';
|
|
494
|
+
/** ClassNames for step styling overrides */
|
|
495
|
+
type StepClassNames = {
|
|
496
|
+
/** Classes for the step container */
|
|
497
|
+
container?: string;
|
|
498
|
+
/** Classes for the connecting line */
|
|
499
|
+
line?: string;
|
|
500
|
+
/** Classes for the circle element */
|
|
501
|
+
circle?: string;
|
|
502
|
+
/** Classes for the label text */
|
|
503
|
+
label?: string;
|
|
504
|
+
/** Status-specific overrides */
|
|
505
|
+
statusOverrides?: Partial<Record<StepStatus, {
|
|
506
|
+
line?: string;
|
|
507
|
+
circle?: string;
|
|
508
|
+
label?: string;
|
|
509
|
+
}>>;
|
|
510
|
+
};
|
|
325
511
|
type StepProps = {
|
|
326
512
|
status: StepStatus;
|
|
327
513
|
label: string;
|
|
328
514
|
isFirst?: boolean;
|
|
329
515
|
isLast?: boolean;
|
|
516
|
+
classNames?: StepClassNames;
|
|
330
517
|
};
|
|
331
518
|
interface TxProgressIndicatorProps {
|
|
332
519
|
isProcessing?: boolean;
|
|
@@ -335,12 +522,21 @@ interface TxProgressIndicatorProps {
|
|
|
335
522
|
isReplaced?: boolean;
|
|
336
523
|
className?: string;
|
|
337
524
|
StepComponent?: ComponentType<StepProps>;
|
|
525
|
+
/** ClassNames for step customization */
|
|
526
|
+
stepClassNames?: StepClassNames;
|
|
338
527
|
}
|
|
339
|
-
declare function TxProgressIndicator({ isProcessing, isSucceed, isFailed, isReplaced, className, StepComponent, }: TxProgressIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
528
|
+
declare function TxProgressIndicator({ isProcessing, isSucceed, isFailed, isReplaced, className, StepComponent, stepClassNames, }: TxProgressIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
340
529
|
|
|
341
530
|
/**
|
|
342
531
|
* @file This file contains the `TxStatusVisual` component, which displays a large icon representing the transaction's status.
|
|
343
532
|
*/
|
|
533
|
+
type StatusKey = 'succeed' | 'failed' | 'replaced' | 'processing' | 'initializing';
|
|
534
|
+
type TxStatusVisualClassNames = {
|
|
535
|
+
/** Base icon className applied to all statuses */
|
|
536
|
+
icon?: string;
|
|
537
|
+
/** Status-specific icon overrides */
|
|
538
|
+
statusOverrides?: Partial<Record<StatusKey, string>>;
|
|
539
|
+
};
|
|
344
540
|
type TxStatusVisualProps = {
|
|
345
541
|
/** True if the transaction is currently being processed (e.g., in the mempool). */
|
|
346
542
|
isProcessing?: boolean;
|
|
@@ -350,12 +546,16 @@ type TxStatusVisualProps = {
|
|
|
350
546
|
isFailed?: boolean;
|
|
351
547
|
/** True if the transaction was replaced (e.g., sped up). */
|
|
352
548
|
isReplaced?: boolean;
|
|
549
|
+
/** Additional class names for the container */
|
|
550
|
+
className?: string;
|
|
551
|
+
/** ClassNames for icon styling */
|
|
552
|
+
iconClassNames?: TxStatusVisualClassNames;
|
|
353
553
|
};
|
|
354
554
|
/**
|
|
355
555
|
* A component that renders a large, animated icon to visually represent the
|
|
356
556
|
* current state of a transaction within the tracking modal.
|
|
357
557
|
*/
|
|
358
|
-
declare function TxStatusVisual({ isProcessing, isSucceed, isFailed, isReplaced }: TxStatusVisualProps): react_jsx_runtime.JSX.Element;
|
|
558
|
+
declare function TxStatusVisual({ isProcessing, isSucceed, isFailed, isReplaced, className: containerClassName, iconClassNames, }: TxStatusVisualProps): react_jsx_runtime.JSX.Element;
|
|
359
559
|
|
|
360
560
|
/**
|
|
361
561
|
* @file This file contains the `TransactionHistoryItem` component, which renders a single transaction
|
|
@@ -364,11 +564,18 @@ declare function TxStatusVisual({ isProcessing, isSucceed, isFailed, isReplaced
|
|
|
364
564
|
|
|
365
565
|
type CustomIconProps = {
|
|
366
566
|
chainId: number | string;
|
|
567
|
+
className?: string;
|
|
367
568
|
};
|
|
368
569
|
type CustomTimestampProps = {
|
|
369
570
|
timestamp?: number;
|
|
571
|
+
className?: string;
|
|
370
572
|
};
|
|
573
|
+
/**
|
|
574
|
+
* Customization options for TransactionHistoryItem component.
|
|
575
|
+
* Allows styling of all sub-elements including icon, text, badge, and hash link.
|
|
576
|
+
*/
|
|
371
577
|
type TransactionHistoryItemCustomization<T extends Transaction> = {
|
|
578
|
+
/** Custom components */
|
|
372
579
|
components?: {
|
|
373
580
|
Icon?: ComponentType<CustomIconProps>;
|
|
374
581
|
Title?: ComponentType<StatusAwareTextProps>;
|
|
@@ -377,6 +584,43 @@ type TransactionHistoryItemCustomization<T extends Transaction> = {
|
|
|
377
584
|
StatusBadge?: ComponentType<TransactionStatusBadgeProps<T>>;
|
|
378
585
|
TransactionKey?: ComponentType<TransactionKeyProps<T>>;
|
|
379
586
|
};
|
|
587
|
+
/** Custom class name generators for all sub-elements */
|
|
588
|
+
classNames?: {
|
|
589
|
+
/** Classes for the item container */
|
|
590
|
+
container?: string;
|
|
591
|
+
/** Classes for the icon wrapper */
|
|
592
|
+
iconWrapper?: string;
|
|
593
|
+
/** Classes for the icon itself */
|
|
594
|
+
icon?: string;
|
|
595
|
+
/** Classes for the content wrapper */
|
|
596
|
+
contentWrapper?: string;
|
|
597
|
+
/** Classes for the title */
|
|
598
|
+
title?: string;
|
|
599
|
+
/** Classes for the timestamp */
|
|
600
|
+
timestamp?: string;
|
|
601
|
+
/** Classes for the description */
|
|
602
|
+
description?: string;
|
|
603
|
+
/** Classes for the status badge container */
|
|
604
|
+
statusBadge?: string;
|
|
605
|
+
/** Classes for the status badge icon */
|
|
606
|
+
statusBadgeIcon?: string;
|
|
607
|
+
/** Classes for the status badge label */
|
|
608
|
+
statusBadgeLabel?: string;
|
|
609
|
+
/** Classes for the transaction key container */
|
|
610
|
+
txKeyContainer?: string;
|
|
611
|
+
/** Classes for default hash link label */
|
|
612
|
+
hashLabel?: string;
|
|
613
|
+
/** Classes for default hash link */
|
|
614
|
+
hashLink?: string;
|
|
615
|
+
/** Classes for default copy button */
|
|
616
|
+
hashCopyButton?: string;
|
|
617
|
+
/** Classes for original hash link label (replaced transactions) */
|
|
618
|
+
originalHashLabel?: string;
|
|
619
|
+
/** Classes for original hash link (replaced transactions) */
|
|
620
|
+
originalHashLink?: string;
|
|
621
|
+
/** Classes for original hash copy button (replaced transactions) */
|
|
622
|
+
originalHashCopyButton?: string;
|
|
623
|
+
};
|
|
380
624
|
};
|
|
381
625
|
type TransactionHistoryItemProps<T extends Transaction> = {
|
|
382
626
|
/** The transaction object to display. */
|
|
@@ -391,14 +635,69 @@ declare function TransactionHistoryItem<T extends Transaction>({ tx, adapter, cl
|
|
|
391
635
|
type CustomPlaceholderProps = {
|
|
392
636
|
title: string;
|
|
393
637
|
message: string;
|
|
638
|
+
className?: string;
|
|
394
639
|
};
|
|
640
|
+
/**
|
|
641
|
+
* Customization options for TransactionsHistory component.
|
|
642
|
+
* Allows styling of all sub-elements including individual transaction items.
|
|
643
|
+
*/
|
|
395
644
|
type TransactionsHistoryCustomization<T extends Transaction> = {
|
|
645
|
+
/** Custom title for the transactions history section */
|
|
396
646
|
title?: string;
|
|
647
|
+
/** Custom class name generators for all elements */
|
|
397
648
|
classNames?: {
|
|
649
|
+
/** Classes for the outer container */
|
|
650
|
+
container?: string;
|
|
651
|
+
/** Classes for the title element */
|
|
652
|
+
titleText?: string;
|
|
653
|
+
/** Classes for the list wrapper container */
|
|
398
654
|
listWrapper?: string;
|
|
655
|
+
/** Classes for the placeholder container */
|
|
656
|
+
placeholderContainer?: string;
|
|
657
|
+
/** Classes for the placeholder title */
|
|
658
|
+
placeholderTitle?: string;
|
|
659
|
+
/** Classes for the placeholder message */
|
|
660
|
+
placeholderMessage?: string;
|
|
661
|
+
/** Classes for individual transaction item container */
|
|
662
|
+
itemContainer?: string;
|
|
663
|
+
/** Classes for the icon wrapper */
|
|
664
|
+
itemIconWrapper?: string;
|
|
665
|
+
/** Classes for the icon itself */
|
|
666
|
+
itemIcon?: string;
|
|
667
|
+
/** Classes for the content wrapper (title, timestamp, description) */
|
|
668
|
+
itemContentWrapper?: string;
|
|
669
|
+
/** Classes for the title text */
|
|
670
|
+
itemTitle?: string;
|
|
671
|
+
/** Classes for the timestamp text */
|
|
672
|
+
itemTimestamp?: string;
|
|
673
|
+
/** Classes for the description text */
|
|
674
|
+
itemDescription?: string;
|
|
675
|
+
/** Classes for the status badge container */
|
|
676
|
+
itemStatusBadge?: string;
|
|
677
|
+
/** Classes for the status badge icon */
|
|
678
|
+
itemStatusBadgeIcon?: string;
|
|
679
|
+
/** Classes for the status badge label */
|
|
680
|
+
itemStatusBadgeLabel?: string;
|
|
681
|
+
/** Classes for the transaction key container */
|
|
682
|
+
itemTxKeyContainer?: string;
|
|
683
|
+
/** Classes for the default hash link label */
|
|
684
|
+
itemHashLabel?: string;
|
|
685
|
+
/** Classes for the default hash link */
|
|
686
|
+
itemHashLink?: string;
|
|
687
|
+
/** Classes for the default hash copy button */
|
|
688
|
+
itemHashCopyButton?: string;
|
|
689
|
+
/** Classes for the original hash link label (replaced transactions) */
|
|
690
|
+
itemOriginalHashLabel?: string;
|
|
691
|
+
/** Classes for the original hash link (replaced transactions) */
|
|
692
|
+
itemOriginalHashLink?: string;
|
|
693
|
+
/** Classes for the original hash copy button (replaced transactions) */
|
|
694
|
+
itemOriginalHashCopyButton?: string;
|
|
399
695
|
};
|
|
696
|
+
/** Custom components */
|
|
400
697
|
components?: {
|
|
698
|
+
/** Custom placeholder component */
|
|
401
699
|
Placeholder?: ComponentType<CustomPlaceholderProps>;
|
|
700
|
+
/** Custom history item component */
|
|
402
701
|
HistoryItem?: ComponentType<TransactionHistoryItemProps<T>>;
|
|
403
702
|
};
|
|
404
703
|
};
|
|
@@ -413,9 +712,20 @@ type CustomHeaderProps = {
|
|
|
413
712
|
};
|
|
414
713
|
type TransactionsInfoModalCustomization<T extends Transaction> = {
|
|
415
714
|
modalProps?: Partial<ComponentPropsWithoutRef<typeof DialogContent>>;
|
|
715
|
+
/** Granular classNames for modal elements */
|
|
416
716
|
classNames?: {
|
|
717
|
+
/** Classes for the content wrapper */
|
|
417
718
|
contentWrapper?: string;
|
|
719
|
+
/** Classes for the header section */
|
|
720
|
+
header?: string;
|
|
721
|
+
/** Classes for the header title */
|
|
722
|
+
headerTitle?: string;
|
|
723
|
+
/** Classes for the close button */
|
|
724
|
+
closeButton?: string;
|
|
418
725
|
};
|
|
726
|
+
/** Customization for TransactionsHistory component */
|
|
727
|
+
historyCustomization?: TransactionsHistoryProps<T>['customization'];
|
|
728
|
+
/** Custom components */
|
|
419
729
|
components?: {
|
|
420
730
|
Header?: ComponentType<CustomHeaderProps>;
|
|
421
731
|
History?: ComponentType<TransactionsHistoryProps<T>>;
|
|
@@ -428,4 +738,4 @@ type TransactionsInfoModalProps<T extends Transaction> = Pick<NovaTransactionsPr
|
|
|
428
738
|
};
|
|
429
739
|
declare function TransactionsInfoModal<T extends Transaction>({ isOpen, setIsOpen, customization, adapter, connectedWalletAddress, transactionsPool, }: TransactionsInfoModalProps<T>): react_jsx_runtime.JSX.Element;
|
|
430
740
|
|
|
431
|
-
export { type
|
|
741
|
+
export { type TransactionsHistoryCustomization as A, type TransactionsHistoryProps as B, TransactionsHistory as C, type TransactionsInfoModalCustomization as D, type TransactionsInfoModalProps as E, TransactionsInfoModal as F, type TransactionStatusBadgeProps as G, type HashLinkProps as H, TransactionStatusBadge as I, type NovaTransactionsProviderProps as J, NovaTransactionsProvider as K, type NovaTransactionsLabels as N, type StatusAwareTextProps as S, type ToastTransactionCustomization as T, HashLink as a, StatusAwareText as b, type ToastTransactionProps as c, ToastTransaction as d, type TrackingTxModalCustomization as e, type TrackingTxModalProps as f, TrackingTxModal as g, type TxErrorBlockClassNames as h, type TxErrorBlockProps as i, TxErrorBlock as j, type TxInfoBlockCustomization as k, type TxInfoBlockProps as l, TxInfoBlock as m, type StepStatus as n, type StepClassNames as o, type StepProps as p, type TxProgressIndicatorProps as q, TxProgressIndicator as r, type TxStatusVisualClassNames as s, type TxStatusVisualProps as t, TxStatusVisual as u, type TransactionHistoryItemCustomization as v, type TransactionHistoryItemProps as w, TransactionHistoryItem as x, type TransactionKeyProps as y, TransactionKey as z };
|