lightning-auth-and-payment
Version:
Lightning Network authentication and payment processing library for modern web applications
189 lines • 6.27 kB
TypeScript
import React from 'react';
/**
* Card size variants
*/
export type CardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
/**
* Card animation types
*/
export type CardAnimation = 'none' | 'hover' | 'pulse' | 'glow' | 'bounce' | 'scale';
/**
* Card layout options
*/
export type CardLayout = 'default' | 'compact' | 'expanded' | 'minimal';
/**
* Enhanced LightningCard props with comprehensive features
*/
export interface LightningCardProps {
/** Card variant */
variant?: 'default' | 'payment' | 'user' | 'wallet' | 'status' | 'info' | 'transaction' | 'invoice' | 'channel' | 'node';
/** Card title */
title?: string;
/** Card description */
description?: string;
/** Card content */
children?: React.ReactNode;
/** Custom className */
className?: string;
/** Show Lightning icon */
showIcon?: boolean;
/** Custom icon */
icon?: React.ReactNode;
/** Card size */
size?: CardSize;
/** Card layout */
layout?: CardLayout;
/** Interactive card */
interactive?: boolean;
/** Click handler */
onClick?: () => void;
/** Double click handler */
onDoubleClick?: () => void;
/** Status indicator */
status?: 'success' | 'error' | 'warning' | 'info' | 'pending' | 'loading' | 'disabled';
/** Status message */
statusMessage?: string;
/** Show border */
showBorder?: boolean;
/** Gradient background */
gradient?: boolean;
/** Animation type */
animation?: CardAnimation;
/** Hover effects */
hoverEffects?: boolean;
/** Glow effect */
glow?: boolean;
/** Pulse effect */
pulse?: boolean;
/** Loading state */
loading?: boolean;
/** Disabled state */
disabled?: boolean;
/** Collapsible card */
collapsible?: boolean;
/** Initially expanded (for collapsible) */
defaultExpanded?: boolean;
/** Expandable content */
expandable?: boolean;
/** Show actions */
showActions?: boolean;
/** Custom actions */
actions?: React.ReactNode;
/** Favorite state */
favorite?: boolean;
/** On favorite toggle */
onFavorite?: (favorite: boolean) => void;
/** Bookmark state */
bookmarked?: boolean;
/** On bookmark toggle */
onBookmark?: (bookmarked: boolean) => void;
/** Share functionality */
shareable?: boolean;
/** On share */
onShare?: () => void;
/** Copy functionality */
copyable?: boolean;
/** On copy */
onCopy?: () => void;
/** Private/secure content */
private?: boolean;
/** Show private toggle */
showPrivateToggle?: boolean;
/** On private toggle */
onPrivateToggle?: (isPrivate: boolean) => void;
/** Card metadata */
metadata?: {
timestamp?: Date;
author?: string;
tags?: string[];
category?: string;
};
/** Custom header */
header?: React.ReactNode;
/** Custom footer */
footer?: React.ReactNode;
/** Loading text */
loadingText?: string;
/** Error text */
errorText?: string;
/** Empty state */
empty?: boolean;
/** Empty state text */
emptyText?: string;
/** Empty state icon */
emptyIcon?: React.ReactNode;
/** Card theme */
theme?: 'light' | 'dark' | 'auto';
/** Custom colors */
colors?: {
background?: string;
border?: string;
text?: string;
icon?: string;
};
/** Accessibility */
ariaLabel?: string;
ariaDescription?: string;
/** Keyboard navigation */
tabIndex?: number;
/** Focus handler */
onFocus?: () => void;
/** Blur handler */
onBlur?: () => void;
/** Key down handler */
onKeyDown?: (event: React.KeyboardEvent) => void;
}
export interface LightningPaymentCardProps {
/** Payment amount in satoshis */
amount: number;
/** Payment description */
description: string;
/** Payment status */
status: 'pending' | 'completed' | 'failed' | 'expired';
/** Payment ID */
paymentId?: string;
/** Timestamp */
timestamp?: Date;
/** On copy handler */
onCopy?: () => void;
/** On download handler */
onDownload?: () => void;
/** Custom className */
className?: string;
}
export interface LightningUserCardProps {
/** User public key */
pubkey: string;
/** User alias/name */
alias?: string;
/** Connection status */
connected: boolean;
/** Last seen */
lastSeen?: Date;
/** On copy handler */
onCopy?: () => void;
/** Custom className */
className?: string;
}
export interface LightningWalletCardProps {
/** Wallet name */
name: string;
/** Wallet balance */
balance?: number;
/** Wallet status */
status: 'connected' | 'disconnected' | 'error';
/** Wallet URL */
url?: string;
/** On connect handler */
onConnect?: () => void;
/** Custom className */
className?: string;
}
/**
* Enhanced LightningCard component with comprehensive features
*/
export declare function LightningCard({ variant, title, description, children, className, showIcon, icon, size, layout, interactive, onClick, onDoubleClick, status, statusMessage, showBorder, gradient, animation, hoverEffects, glow, pulse, loading, disabled, collapsible, defaultExpanded, expandable, showActions, actions, favorite, onFavorite, bookmarked, onBookmark, shareable, onShare, copyable, onCopy, private: isPrivate, showPrivateToggle, onPrivateToggle, metadata, header, footer, loadingText, errorText, empty, emptyText, emptyIcon, theme, colors, ariaLabel, ariaDescription, tabIndex, onFocus, onBlur, onKeyDown, }: LightningCardProps): import("react/jsx-runtime").JSX.Element;
export declare function LightningPaymentCard({ amount, description, status, paymentId, timestamp, onCopy, onDownload, className, }: LightningPaymentCardProps): import("react/jsx-runtime").JSX.Element;
export declare function LightningUserCard({ pubkey, alias, connected, lastSeen, onCopy, className, }: LightningUserCardProps): import("react/jsx-runtime").JSX.Element;
export declare function LightningWalletCard({ name, balance, status, url, onConnect, className, }: LightningWalletCardProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=LightningCard.d.ts.map