53 lines · 2.0 KB
/**
 * `accent` is the brand color (primary actions, focus, selection), not a status. Statuses use
 * success, warning (in progress, needs attention), danger, or merged (finished work: merged, applied,
 * completed).
 */
export type Tone = "neutral" | "accent" | "success" | "warning" | "danger" | "merged";

/**
 * Tinted surfaces (callouts, status rows, selected toggles). Borderless: the fill alone carries the
 * tone. Never pair a tinted fill with a contrasting border.
 */
export const TONE_SURFACE: Record<Tone, string> = {
  neutral: "bg-kumo-recessed text-kumo-default",
  accent: "bg-kumo-info-tint text-kumo-info",
  success: "bg-kumo-success-tint text-kumo-success",
  warning: "bg-kumo-warning-tint text-kumo-warning",
  danger: "bg-kumo-danger-tint text-kumo-danger",
  merged: "bg-merged-950 text-merged-200",
};

/** Solid badge fills: no border, readable text on the fill. */
export const TONE_BADGE: Record<Tone, string> = {
  neutral: "bg-kumo-fill text-kumo-default",
  accent: "bg-accent-500 text-black",
  success: "bg-kumo-badge-green text-white",
  warning: "bg-kumo-badge-orange text-black",
  danger: "bg-kumo-badge-red text-white",
  merged: "bg-kumo-badge-purple text-white",
};

/** Solid fills (dots, progress tracks). */
export const TONE_FILL: Record<Tone, string> = {
  neutral: "bg-kumo-badge-neutral",
  accent: "bg-accent-500",
  success: "bg-kumo-success",
  warning: "bg-kumo-warning",
  danger: "bg-kumo-danger",
  merged: "bg-kumo-badge-purple",
};