import { createElement, useState, type CSSProperties } from 'react'; import { DTCard, DTStaggerContainer, DTFeatureLegend, } from '@dangerousthings/react'; import type { DTFeatureItem } from '@dangerousthings/react'; import type { DTVariant } from '@dangerousthings/tokens'; import { Section, CodeLabel } from '../components/Section'; // Feature icons from dt-shopify-storefront import { MdOutlinePhonelinkRing, MdOutlineVpnKey, MdOutlineMobileScreenShare, MdOutlineCreditCard, MdOutlineCopyAll, MdOutlineLightbulb, MdOutlineThermostat, MdOutlineSensors, MdOutlineFitbit, MdOutlineVibration, MdOutlineExplore, MdLightbulbOutline, MdOutlineVisibility, } from 'react-icons/md'; import { FaUserShield } from 'react-icons/fa'; import { LuBinary } from 'react-icons/lu'; const modes: DTVariant[] = ['normal', 'emphasis', 'warning', 'success', 'other']; // Wrap react-icons to avoid IconType/ReactNode type mismatch const ico = (C: any) => createElement(C, { style: { fontSize: '2rem' } }); // Full chip feature legend (9 features — from storefront UseCaseLegend) // detail text simulates what the storefront shows for an NExT implant const chipFeatures: DTFeatureItem[] = [ { key: 'smartphone', name: 'Smartphone', icon: ico(MdOutlinePhonelinkRing), state: 'supported', detail: 'Full NFC smartphone support' }, { key: 'access_control', name: 'Access Control', icon: ico(MdOutlineVpnKey), state: 'supported', detail: 'DESFire, MIFARE Classic, iCLASS' }, { key: 'digital_security', name: 'Digital Security', icon: ico(FaUserShield), state: 'supported', detail: 'FIDO2 / WebAuthn' }, { key: 'cryptography', name: 'Cryptography', icon: ico(LuBinary), state: 'unsupported', detail: 'Not Supported' }, { key: 'data_sharing', name: 'Data Sharing', icon: ico(MdOutlineMobileScreenShare), state: 'supported', detail: 'NDEF records, vCard, URL' }, { key: 'payment', name: 'Payment', icon: ico(MdOutlineCreditCard), state: 'disabled', detail: 'Apex required' }, { key: 'magic', name: 'Magic', icon: ico(MdOutlineCopyAll), state: 'supported', detail: 'Gen2 Magic UID' }, { key: 'Illumination', name: 'Illumination', icon: ico(MdOutlineLightbulb), state: 'unsupported', detail: 'None' }, { key: 'temperature', name: 'Sensors', icon: ico(MdOutlineThermostat), state: 'unsupported', detail: 'None' }, ]; // Full biomagnet feature legend (4 features — from storefront MagnetUseCaseLegend) const magnetFeatures: DTFeatureItem[] = [ { key: 'sensing', name: 'Sensing', icon: ico(MdOutlineSensors), state: 'supported', detail: 'Electromagnetic field detection' }, { key: 'lifting', name: 'Lifting', icon: ico(MdOutlineFitbit), state: 'supported', detail: '2.1 kg lifting force' }, { key: 'haptics', name: 'Haptics', icon: ico(MdOutlineVibration), state: 'supported', detail: 'Tactile vibration feedback' }, { key: 'polarity', name: 'Polarity Detection', icon: ico(MdOutlineExplore), state: 'unsupported', detail: 'Not Supported' }, ]; // Full aesthetic feature legend (2 features — from storefront AestheticUseCaseLegend) const aestheticFeatures: DTFeatureItem[] = [ { key: 'illumination', name: 'Illumination', icon: ico(MdLightbulbOutline), state: 'supported', detail: 'LED: Red, Green, Blue, White' }, { key: 'prominence', name: 'Prominence', icon: ico(MdOutlineVisibility), state: 'supported', detail: 'High visibility under skin' }, ]; export function CardsAdvancedPage() { const [staggerKey, setStaggerKey] = useState(0); return ( <>
Card color modes, progress bars, badge overlays, and interactive bevel buttons.