PolyHunter

RarityBadge

P1atom

Proposed — does not exist yet. Needed for: Gamification (loot). Track it in documentation/shared/design-system-inventory.md.

What it is

Small pill expressing item rarity: common → rare → epic → legendary. Deferred with the loot-box scope; needed again if items ship with rarity.

What you need to create

A cva-based atom like StatusBadge: 4 variants from a rarity token set (border/background/foreground triplets in theme.css), optional icon, type-label-small.

Hints

  • Copy the StatusBadge structure exactly (cva + data-slot + cn + Slot.Root asChild)
  • Add --color-rarity-{common,rare,epic,legendary}-{background,border,foreground} to packages/ds/theme.css

Definition of done

// packages/ui/src/atoms/rarity-badge.tsx
// Kitchen sink page at apps/ds/kitchen-sink/app/atoms/rarity-badge/
// Register as "wip" in app/lib/routes.ts; only UX/user approval permits "ready"
// Verify: yarn workspace @npolyhunter/ui build && npx tsc --noEmit (in apps/ds/kitchen-sink)
// Then update documentation/shared/design-system-inventory.md -> Status: built