/* global React */ const { useState, useEffect, useRef, useMemo, createContext, useContext } = React; // ─────────── Icons (stroke-only, 18px grid) ─────────── const Icon = ({ name, size = 16, stroke = 1.6 }) => { const common = { width: size, height: size, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: stroke, strokeLinecap: 'round', strokeLinejoin: 'round' }; const paths = { arrow: <>, arrowL: <>, check: , x: <>, plus: <>, minus: , chev: , chevD: , dot: , user: <>, users: <>, lock: <>, shield: , eye: <>, mail: <>, phone: , doc: <>, docCheck: <>, upload: <>, folder: , clock: <>, calendar: <>, search: <>, filter: , bell: <>, settings: <>, globe: <>, home: <>, chat: , sparkle: <>, warn: <>, info: <>, flag: <>, send: <>, download: <>, link: <>, shieldCheck: <>, moon: , sun: <>, grid: <>, list: <>, menu: <>, more: <>, trash: <>, refresh: <>, zap: , book: <>, print: <>, brain: , server: <>, activity: , bolt: , play: , logout: <>, pin: , pen: <>, cpu: <>, gavel: <>, balance: <>, eyeOff: <>, }; return {paths[name] || paths.dot}; }; // ─────────── Small components ─────────── const Btn = ({ variant='secondary', size, block, children, ...rest }) => { const cls = ['btn', 'btn-'+variant, size === 'lg' ? 'btn-lg' : size === 'sm' ? 'btn-sm' : '', block ? 'btn-block' : ''].filter(Boolean).join(' '); return ; }; const Field = ({ label, hint, children, optional }) => (
{label &&
{label} {optional && (optional)}
} {children} {hint &&
{hint}
}
); const Badge = ({ variant, children, dot }) => ( {dot && } {children} ); const Progress = ({ value }) => (
); const StatCard = ({ label, value, delta, deltaDir, note }) => (
{label}
{value}
{delta &&
{delta} {note && {note}}
} {!delta && note &&
{note}
}
); const Explainer = ({ children }) => (
{children}
); const Modal = ({ title, onClose, children, footer, wide }) => (
e.stopPropagation()}>

{title}

{children}
{footer &&
{footer}
}
); const Stepper = ({ steps, current }) => (
Step {String(current).padStart(2,'0')} / {String(steps).padStart(2,'0')}
); Object.assign(window, { Icon, Btn, Field, Badge, Progress, StatCard, Explainer, Modal, Stepper });