Consolidate clipboard copy logic into a reusable CopyButton component with
visual feedback (checkmark, tooltip, color change). Replace inline clipboard
code in AbstractCard and ShareButton with the new component. Add type guards,
memoization, and improved error handling throughout.
This commit introduces two new reusable components and significantly
improves the user experience across all RDAP cards:
New Components:
- CopyButton: Provides one-click copying functionality for handles,
addresses, and other identifiers
- StatusBadge: Displays color-coded status badges with proper type
safety
RDAP Card Enhancements:
- Replace deprecated ClipboardCopyIcon with ClipboardIcon
- Add copy buttons next to all handles, addresses, and identifiers
- Migrate status displays from PropertyList to StatusBadge components
with color coding
- Replace PropertyList with proper DataList components for roles and
public IDs
- Improve Events table layout and styling
- Wrap all copyable values in Code components for better visual
distinction
Type Safety Improvements:
- Add rdapStatusColors mapping with proper Radix UI badge color types
- Update IpNetwork and AutonomousNumber schemas to use typed
StatusEnum arrays