{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-tile",
  "title": "Date Tile",
  "description": "Square calendar tile showing a short month over a day of the month.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/components/date-tile.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* A calendar tile — a short month over a day of the month in a 44px square —\n   for a due date, a renewal, a run scheduled ahead.\n *\n * It renders a <time>, so `dateTime` carries the machine-readable date and the\n * two lines are only its visible reading. The caller formats both lines. That\n * keeps the tile free of locale and timezone logic, which is the part that\n * makes server and client disagree about which day a timestamp falls on.\n *\n * The tones are washes with the -ink token on top, because the fill hues fail\n * AA as text on white. A tone says how the date is handled — on autopay, due by\n * hand — so pair it with something that says the same in words or a shape; the\n * tint should never be the only cue.\n *\n * A fixed square, so a box radius is legal here. The root sets leading-none, so\n * both lines name their line-height beside their size-only type token. */\nconst dateTileVariants = cva(\n  \"flex size-11 shrink-0 flex-col items-center justify-center rounded-box-44 leading-none\",\n  {\n    variants: {\n      tone: {\n        muted: \"bg-muted text-foreground\",\n        warning: \"bg-warning/15 text-warning-ink\",\n        success: \"bg-success/10 text-success-ink\",\n        info: \"bg-info/10 text-info-ink\",\n        destructive: \"bg-destructive/10 text-destructive-ink\",\n      },\n    },\n    defaultVariants: {\n      tone: \"muted\",\n    },\n  },\n)\n\ntype DateTileTone = NonNullable<VariantProps<typeof dateTileVariants>[\"tone\"]>\n\ntype DateTileProps = Omit<React.ComponentProps<\"time\">, \"children\"> & {\n  /** The machine-readable date, e.g. \"2026-10-14\". */\n  dateTime: string\n  /** The top line, already formatted — \"OCT\". */\n  month: React.ReactNode\n  /** The bottom line, already formatted — \"14\". */\n  day: React.ReactNode\n  tone?: DateTileTone\n}\n\nfunction DateTile({\n  dateTime,\n  month,\n  day,\n  tone = \"muted\",\n  className,\n  ...props\n}: DateTileProps) {\n  return (\n    <time\n      data-slot=\"date-tile\"\n      data-tone={tone}\n      dateTime={dateTime}\n      className={cn(dateTileVariants({ tone }), className)}\n      {...props}\n    >\n      <span\n        data-slot=\"date-tile-month\"\n        className=\"text-caption-sm leading-4 font-medium\"\n      >\n        {month}\n      </span>\n      <span\n        data-slot=\"date-tile-day\"\n        className=\"mt-0.5 text-body-md leading-6 font-semibold tabular-nums\"\n      >\n        {day}\n      </span>\n    </time>\n  )\n}\n\nexport { DateTile, dateTileVariants }\nexport type { DateTileProps, DateTileTone }\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}