/* Powermieter — shared UI primitives. Exports to window. */ const { useState, useRef, useEffect, useId } = React; /* ---------- Brand ---------- */ function Brandmark({ size = 34 }) { return ( ); } function Logo({ size = 34, light }) { return ( PowerHouse 360 POWERHOUSE{' '} 360 ); } /* ---------- Button ---------- */ function Button({ variant = 'primary', size, block, icon, iconRight, className, children, onClick, type, disabled, style, title, id }) { const cls = ['btn', `btn-${variant}`, size && `btn-${size}`, block && 'btn-block', className].filter(Boolean).join(' '); return ( ); } /* ---------- Chip ---------- */ function Chip({ tone, icon, children }) { return {icon}{children}; } /* ---------- Process navigation (the 4-step stepper) ---------- */ const STEPS = [ { n: 1, label: 'Interesse', short: 'Interesse', icon: I.spark }, { n: 2, label: 'Registrierung', short: 'Daten', icon: I.user }, { n: 3, label: 'Vertragsabschluss',short: 'Vertrag', icon: I.signature }, { n: 4, label: 'Aktivierung', short: 'Aktiv', icon: I.checkBold }, ]; function ProcessNav({ current, maxReached = current, onJump, compact }) { return ( ); } /* ---------- Form field wrapper ---------- */ function Field({ label, required, optional, hint, error, htmlFor, tip, children }) { return (
{label && ( )} {children} {error ? {error} : hint ? {hint} : null}
); } function TextInput({ error, affix, ...rest }) { const cls = 'input' + (error ? ' input-err' : ''); if (affix) return (
{affix}
); return ; } function TextArea({ error, ...rest }) { return