@deframe-sdk/components 0.1.0 → 0.1.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.
package/dist/index.d.mts CHANGED
@@ -100,6 +100,10 @@ interface WalletOption {
100
100
  interface ConnectWalletListProps {
101
101
  /** List of wallet options */
102
102
  wallets: WalletOption[];
103
+ /** Title text for the wallet connect screen */
104
+ title?: string;
105
+ /** Subtitle text for the wallet connect screen */
106
+ subtitle?: string;
103
107
  /** Additional CSS class names */
104
108
  className?: string;
105
109
  }
@@ -366,12 +370,18 @@ interface BannerNotificationProps extends React$1.HTMLAttributes<HTMLDivElement>
366
370
  show?: boolean;
367
371
  /** Callback when notification is closed */
368
372
  onClose?: () => void;
373
+ /** Whether to show the icon (default: true) */
374
+ showIcon?: boolean;
375
+ /** Custom icon to display */
376
+ icon?: React$1.ReactNode;
369
377
  }
370
378
  declare const BannerNotification: React$1.FC<BannerNotificationProps>;
371
379
 
372
380
  interface AddressDisplayProps {
373
381
  /** The full address to display */
374
382
  address: string;
383
+ /** Optional truncated display text shown instead of the full address */
384
+ displayText?: string;
375
385
  /** Callback when copy button is clicked */
376
386
  onCopy?: (address: string) => void;
377
387
  /** Custom className for the container */
@@ -411,17 +421,25 @@ interface SummaryDetailsProps {
411
421
  }
412
422
  declare const SummaryDetails: React$1.FC<SummaryDetailsProps>;
413
423
 
424
+ interface ActionSheetItem {
425
+ id: string;
426
+ label: string;
427
+ icon?: React$1.ReactNode;
428
+ variant?: 'default' | 'destructive' | 'success';
429
+ disabled?: boolean;
430
+ onClick?: () => void;
431
+ }
414
432
  interface ActionSheetProps {
415
433
  /** Unique identifier for this action sheet */
416
434
  id: string;
417
435
  /** Current action sheet ID from state */
418
- currentActionSheetId: string | null;
436
+ currentActionSheetId?: string | null;
419
437
  /** Whether the action sheet is open */
420
- isOpen: boolean;
438
+ isOpen?: boolean;
421
439
  /** Function to close the action sheet */
422
- onClose: () => void;
440
+ onClose?: () => void;
423
441
  /** Custom content to render */
424
- children: React$1.ReactNode;
442
+ children?: React$1.ReactNode;
425
443
  /** Custom className for the container */
426
444
  className?: string;
427
445
  /** Custom className for the content area */
@@ -432,6 +450,14 @@ interface ActionSheetProps {
432
450
  height?: 'auto' | 'full' | 'half';
433
451
  /** Whether clicking the backdrop should close the sheet (default: true) */
434
452
  closeOnBackdropClick?: boolean;
453
+ /** Title displayed in the header */
454
+ title?: string;
455
+ /** Description displayed below the title */
456
+ description?: string;
457
+ /** List of action items to render */
458
+ items?: ActionSheetItem[];
459
+ /** Whether to show a cancel button (default: true) */
460
+ showCancel?: boolean;
435
461
  }
436
462
  /**
437
463
  * ActionSheet - A flexible bottom sheet / modal component
package/dist/index.d.ts CHANGED
@@ -100,6 +100,10 @@ interface WalletOption {
100
100
  interface ConnectWalletListProps {
101
101
  /** List of wallet options */
102
102
  wallets: WalletOption[];
103
+ /** Title text for the wallet connect screen */
104
+ title?: string;
105
+ /** Subtitle text for the wallet connect screen */
106
+ subtitle?: string;
103
107
  /** Additional CSS class names */
104
108
  className?: string;
105
109
  }
@@ -366,12 +370,18 @@ interface BannerNotificationProps extends React$1.HTMLAttributes<HTMLDivElement>
366
370
  show?: boolean;
367
371
  /** Callback when notification is closed */
368
372
  onClose?: () => void;
373
+ /** Whether to show the icon (default: true) */
374
+ showIcon?: boolean;
375
+ /** Custom icon to display */
376
+ icon?: React$1.ReactNode;
369
377
  }
370
378
  declare const BannerNotification: React$1.FC<BannerNotificationProps>;
371
379
 
372
380
  interface AddressDisplayProps {
373
381
  /** The full address to display */
374
382
  address: string;
383
+ /** Optional truncated display text shown instead of the full address */
384
+ displayText?: string;
375
385
  /** Callback when copy button is clicked */
376
386
  onCopy?: (address: string) => void;
377
387
  /** Custom className for the container */
@@ -411,17 +421,25 @@ interface SummaryDetailsProps {
411
421
  }
412
422
  declare const SummaryDetails: React$1.FC<SummaryDetailsProps>;
413
423
 
424
+ interface ActionSheetItem {
425
+ id: string;
426
+ label: string;
427
+ icon?: React$1.ReactNode;
428
+ variant?: 'default' | 'destructive' | 'success';
429
+ disabled?: boolean;
430
+ onClick?: () => void;
431
+ }
414
432
  interface ActionSheetProps {
415
433
  /** Unique identifier for this action sheet */
416
434
  id: string;
417
435
  /** Current action sheet ID from state */
418
- currentActionSheetId: string | null;
436
+ currentActionSheetId?: string | null;
419
437
  /** Whether the action sheet is open */
420
- isOpen: boolean;
438
+ isOpen?: boolean;
421
439
  /** Function to close the action sheet */
422
- onClose: () => void;
440
+ onClose?: () => void;
423
441
  /** Custom content to render */
424
- children: React$1.ReactNode;
442
+ children?: React$1.ReactNode;
425
443
  /** Custom className for the container */
426
444
  className?: string;
427
445
  /** Custom className for the content area */
@@ -432,6 +450,14 @@ interface ActionSheetProps {
432
450
  height?: 'auto' | 'full' | 'half';
433
451
  /** Whether clicking the backdrop should close the sheet (default: true) */
434
452
  closeOnBackdropClick?: boolean;
453
+ /** Title displayed in the header */
454
+ title?: string;
455
+ /** Description displayed below the title */
456
+ description?: string;
457
+ /** List of action items to render */
458
+ items?: ActionSheetItem[];
459
+ /** Whether to show a cancel button (default: true) */
460
+ showCancel?: boolean;
435
461
  }
436
462
  /**
437
463
  * ActionSheet - A flexible bottom sheet / modal component
package/dist/index.js CHANGED
@@ -1381,7 +1381,11 @@ var ActionSheet = ({
1381
1381
  contentClassName = "",
1382
1382
  position = "bottom",
1383
1383
  height = "auto",
1384
- closeOnBackdropClick = true
1384
+ closeOnBackdropClick = true,
1385
+ title,
1386
+ description,
1387
+ items,
1388
+ showCancel = true
1385
1389
  }) => {
1386
1390
  const isThisSheetActive = isOpen && currentActionSheetId === id;
1387
1391
  React6__namespace.useEffect(() => {
@@ -1398,7 +1402,7 @@ var ActionSheet = ({
1398
1402
  if (!isThisSheetActive) return;
1399
1403
  const handleEscape = (e) => {
1400
1404
  if (e.key === "Escape") {
1401
- onClose();
1405
+ onClose == null ? void 0 : onClose();
1402
1406
  }
1403
1407
  };
1404
1408
  document.addEventListener("keydown", handleEscape);
@@ -1406,7 +1410,7 @@ var ActionSheet = ({
1406
1410
  }, [isThisSheetActive, onClose]);
1407
1411
  const handleBackdropClick = (e) => {
1408
1412
  if (closeOnBackdropClick && e.target === e.currentTarget) {
1409
- onClose();
1413
+ onClose == null ? void 0 : onClose();
1410
1414
  }
1411
1415
  };
1412
1416
  const backdropVariants = {