/* ============================================================
UI KIT — shared primitives
Aleksey Lobov website. Exports to window for cross-file use.
============================================================ */
// Wide-tracked uppercase micro-label — the signature texture
function Label({ children, tone = "muted", style }) {
const color = tone === "ink" ? "var(--ink)" : tone === "faint" ? "var(--ink-4)" : "var(--ink-3)";
return (
{children}
);
}
// Fine-cross "+" glyph (AIR expand marker)
function Plus({ size = 14, color = "currentColor", weight = 1.5 }) {
return (
);
}
// Inline SVG icon set (replaces lucide's DOM-swap, which crashes React on re-render)
function Icon({ name, style }) {
const P = {
"arrow-up-right": ,
"arrow-down": ,
"arrow-left": ,
"arrow-right": ,
"x": ,
"check": ,
"send": ,
"lock": ,
"globe": ,
"chevron-down": ,
};
return (
);
}
// The signature black pill / capsule button
function Pill({ children, variant = "primary", icon, onClick, style }) {
const [hover, setHover] = React.useState(false);
const base = {
height: 44, padding: "0 22px", borderRadius: 999, border: "1px solid transparent",
display: "inline-flex", alignItems: "center", gap: 10, cursor: "pointer",
fontFamily: "var(--font-sans)", fontWeight: 600, fontSize: 11,
letterSpacing: "0.16em", textTransform: "uppercase", whiteSpace: "nowrap",
transition: "transform var(--dur-fast) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease)",
transform: hover ? "translateY(-1px)" : "none", userSelect: "none",
};
const variants = {
primary: { background: hover ? "#23231f" : "var(--ink)", color: "var(--paper-on-ink)", boxShadow: "var(--shadow-pill)" },
secondary: { background: "transparent", color: "var(--ink)", borderColor: hover ? "var(--ink)" : "var(--hairline-2)" },
ghost: { background: hover ? "var(--surface-2)" : "var(--surface)", color: "var(--ink)" },
};
return (
);
}
// Small icon-square button (chrome)
function IconButton({ icon, variant = "out", onClick, style }) {
const [hover, setHover] = React.useState(false);
const variants = {
ink: { background: "var(--ink)", color: "var(--paper-on-ink)", border: "1px solid var(--ink)" },
out: { background: hover ? "var(--surface)" : "var(--paper)", color: "var(--ink)", border: "1px solid var(--hairline-2)" },
grey: { background: "var(--surface)", color: "var(--ink)", border: "1px solid transparent" },
};
return (
);
}
// Mono stat
function Stat({ value, label, tone }) {
const color = tone === "up" ? "var(--up)" : tone === "down" ? "var(--down)" : "var(--ink)";
return (
);
}
// Greyscale high-key image placeholder (until real assets arrive)
function ImagePlaceholder({ label, variant = "a", src, alt, objectPosition = "center", style }) {
const bgs = {
a: "radial-gradient(120% 90% at 70% 22%, #ffffff 0%, #ebebe8 42%, #cfcfca 100%)",
b: "radial-gradient(80% 80% at 30% 78%, #d9d9d4 0%, #f2f2ef 60%, #ffffff 100%)",
c: "linear-gradient(135deg, #cfcfca, #f4f4f2 55%, #e2e2dd)",
};
return (
{src
?

:
}
{label &&
}
);
}
// Ambient "smoke" — single permitted soft radial, very low contrast
function Smoke({ style }) {
return
;
}
Object.assign(window, { Label, Plus, Icon, Pill, IconButton, Stat, ImagePlaceholder, Smoke });