import React from "react"; /** * Badge / status pill. `tone` maps to the categorical 3-step accent sets * or state colors; `variant="solid"` uses the neutral badge tokens. */ export function Badge({ tone = "gray", variant = "soft", children, style, ...rest }) { const tones = ["coral","skyblue","olive","purple","mint","magenta","teal","burgundy","green","gray","yellow"]; let colors; if (variant === "solid") { colors = { background: "hsl(var(--badge-default))", color: "hsl(var(--badge-default-foreground))" }; } else if (["success","warning","info","error"].includes(tone)) { colors = { background: `hsl(var(--state-${tone}-bg))`, color: `hsl(var(--state-${tone}-fg))` }; } else { const t = tones.includes(tone) ? tone : "gray"; colors = { background: `hsl(var(--accent-${t}-bg))`, color: `hsl(var(--accent-${t}-fg))` }; } return ( {children} ); }