jengacore.shadcn registry · Tailwind v4 · Radix and Base UI
Components
Foundation · @jengacore/status

status

One status dictionary for every product: the same word always gets the same tone.

Install

terminal
npx shadcn@latest add @jengacore/status

Without the namespace configured: npx shadcn@latest add https://ui.jengacore.com/r/<new-york-v4|base-nova>/status.json

Source

lib/jengacore/status.ts
/**
 * One status vocabulary for every jengacore product.
 * The same word always gets the same tone, in Mulisa, Msingi, the Finance Portal and Disputes.
 * A status is NEVER shown by colour alone: StatusBadge always renders the icon and the label.
 */
export type Tone = "success" | "warning" | "danger" | "info" | "neutral"

export type StatusDomain = "transfer" | "settlement" | "alert" | "dispute" | "loan"

type Entry = { label: string; tone: Tone }

export const STATUS: Record<StatusDomain, Record<string, Entry>> = {
  transfer: {
    received: { label: "Received", tone: "neutral" },
    reserved: { label: "Reserved", tone: "warning" },
    committed: { label: "Committed", tone: "success" },
    aborted: { label: "Aborted", tone: "danger" },
    rejected: { label: "Rejected", tone: "danger" },
  },
  settlement: {
    open: { label: "Open", tone: "info" },
    closed: { label: "Closed", tone: "neutral" },
    awaiting_rtgs: { label: "Awaiting RTGS", tone: "warning" },
    near_cap: { label: "Near cap", tone: "warning" },
    over_cap: { label: "At cap", tone: "danger" },
    net_credit: { label: "Net credit", tone: "info" },
    healthy: { label: "Healthy", tone: "success" },
    settled: { label: "Settled", tone: "success" },
    failed: { label: "Failed", tone: "danger" },
  },
  alert: {
    in_review: { label: "In review", tone: "info" },
    sla_risk: { label: "SLA < 1 h", tone: "warning" },
    breached: { label: "Breached", tone: "danger" },
    blocked: { label: "Blocked", tone: "danger" },
    cleared: { label: "Cleared", tone: "success" },
    resolved: { label: "Resolved", tone: "success" },
    closed: { label: "Closed", tone: "neutral" },
  },
  dispute: {
    under_investigation: { label: "Under investigation", tone: "info" },
    evidence_due: { label: "Evidence due", tone: "warning" },
    sla_breached: { label: "SLA breached", tone: "danger" },
    escalated: { label: "Escalated", tone: "danger" },
    resolved: { label: "Resolved", tone: "success" },
    withdrawn: { label: "Withdrawn", tone: "neutral" },
  },
  loan: {
    scheduled: { label: "Scheduled", tone: "neutral" },
    due_today: { label: "Due today", tone: "warning" },
    paid: { label: "Paid", tone: "success" },
    in_arrears: { label: "In arrears", tone: "danger" },
    restructured: { label: "Restructured", tone: "info" },
  },
}

export function getStatus(domain: StatusDomain, key: string): Entry {
  return STATUS[domain][key] ?? { label: key, tone: "neutral" }
}