{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "calendar",
  "dependencies": [
    "lucide-react",
    "react-aria-components",
    "tailwind-variants"
  ],
  "registryDependencies": [
    "https://taki-ui.com/r/button.json",
    "https://taki-ui.com/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/calendar.tsx",
      "content": "\"use client\"\n\nimport React from \"react\"\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\nimport {\n  Calendar as AriaCalendar,\n  CalendarGridHeader as AriaCalendarGridHeader,\n  CalendarProps as AriaCalendarProps,\n  CalendarCell,\n  CalendarGrid,\n  CalendarGridBody,\n  CalendarHeaderCell,\n  DateValue,\n  Heading,\n  Text,\n  useLocale,\n} from \"react-aria-components\"\nimport { tv } from \"tailwind-variants\"\n\nimport { cn, focusRing } from \"@/lib/utils\"\nimport { Button } from \"@/registry/new-york/ui/button\"\n\nexport const cellStyles = tv({\n  extend: focusRing,\n  base: \"flex h-8 w-8 mt-1 cursor-default items-center justify-center rounded-md text-sm font-normal forced-color-adjust-none transition-[box-shadow]\",\n  variants: {\n    isSelected: {\n      false: \"hover:bg-accent hover:text-accent-foreground\",\n      true: \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n    },\n    isDisabled: {\n      true: \"text-muted-foreground opacity-50\",\n    },\n    isOutsideMonth: {\n      true: \"text-muted-foreground opacity-50\",\n    },\n    isPressed: {\n      true: \"ring-ring/50 ring-[3px] border-ring\",\n    },\n    isUnavailable: {\n      true: \"text-muted-foreground opacity-50\",\n    },\n  },\n})\n\nexport interface CalendarProps<T extends DateValue>\n  extends Omit<AriaCalendarProps<T>, \"visibleDuration\"> {\n  errorMessage?: string\n  className?: string\n}\n\nexport function Calendar<T extends DateValue>({\n  errorMessage,\n  className,\n  ...props\n}: CalendarProps<T>) {\n  return (\n    <AriaCalendar\n      className={cn(\"bg-card flex w-fit flex-col gap-3 p-3\", className)}\n      {...props}\n    >\n      <CalendarHeader />\n      <CalendarGrid className=\"mt-1 w-full border-collapse space-y-1\">\n        <CalendarGridHeader />\n        <CalendarGridBody>\n          {(date) => <CalendarCell date={date} className={cellStyles} />}\n        </CalendarGridBody>\n      </CalendarGrid>\n      {errorMessage && (\n        <Text slot=\"errorMessage\" className=\"text-destructive text-sm\">\n          {errorMessage}\n        </Text>\n      )}\n    </AriaCalendar>\n  )\n}\n\nexport function CalendarHeader() {\n  const { direction } = useLocale()\n\n  return (\n    <header className=\"flex w-full items-center justify-between\">\n      <Button variant=\"outline\" size=\"icon\" className=\"h-7 w-7\" slot=\"previous\">\n        {direction === \"rtl\" ? (\n          <ChevronRight aria-hidden className=\"h-4 w-4\" />\n        ) : (\n          <ChevronLeft aria-hidden className=\"h-4 w-4\" />\n        )}\n      </Button>\n      <Heading className=\"text-sm font-medium\" />\n      <Button variant=\"outline\" size=\"icon\" className=\"h-7 w-7\" slot=\"next\">\n        {direction === \"rtl\" ? (\n          <ChevronLeft aria-hidden className=\"h-4 w-4\" />\n        ) : (\n          <ChevronRight aria-hidden className=\"h-4 w-4\" />\n        )}\n      </Button>\n    </header>\n  )\n}\n\nexport function CalendarGridHeader() {\n  return (\n    <AriaCalendarGridHeader>\n      {(day) => (\n        <CalendarHeaderCell className=\"text-muted-foreground w-9 text-[0.8rem] font-normal\">\n          {day}\n        </CalendarHeaderCell>\n      )}\n    </AriaCalendarGridHeader>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}