{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "calendar",
  "title": "Calendar",
  "description": "Calendar from the Get IT Done design system.",
  "dependencies": [
    "date-fns@^2.30.0",
    "lucide-react@^0.379.0",
    "react-day-picker@^8.9.1"
  ],
  "registryDependencies": [
    "https://zero-design.itdone.de/r/button.json",
    "https://zero-design.itdone.de/r/labels-context.json",
    "https://zero-design.itdone.de/r/utils.json",
    "https://zero-design.itdone.de/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/ui/calendar.tsx",
      "content": "'use client';\n\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport * as React from 'react';\nimport { DayPicker } from 'react-day-picker';\n\nimport { cn } from '@/lib/utils';\nimport { buttonVariants } from '@/components/ui/button';\n// explicit file path; date-fns 2 has no exports map, so directory imports break Node ESM consumers (vitest, SSR)\nimport de from 'date-fns/locale/de/index.js';\nimport { useLocale } from '@/components/ui/labels-context';\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {\n  const locale = useLocale();\n  return (\n    <DayPicker\n      locale={locale === 'de' ? de : undefined}\n      weekStartsOn={locale === 'de' ? 1 : undefined}\n      showOutsideDays={showOutsideDays}\n      className={cn('p-3', className)}\n      classNames={{\n        months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',\n        month: 'space-y-4',\n        caption: 'flex justify-center pt-1 relative items-center',\n        caption_label: 'text-sm font-medium',\n        nav: 'space-x-1 flex items-center',\n        nav_button: cn(\n          buttonVariants({ variant: 'outline' }),\n          'h-7 w-7 bg-transparent p-0 opacity-disabled hover:opacity-100',\n        ),\n        nav_button_previous: 'absolute left-1',\n        nav_button_next: 'absolute right-1',\n        table: 'w-full border-collapse space-y-1',\n        head_row: 'flex',\n        head_cell: 'text-muted-foreground rounded-default w-9 font-normal text-[0.8rem]',\n        row: 'flex w-full mt-2',\n        cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-default [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-default last:[&:has([aria-selected])]:rounded-r-default focus-within:relative focus-within:z-20',\n        day: cn(buttonVariants({ variant: 'ghost' }), 'h-9 w-9 p-0 font-normal aria-selected:opacity-100'),\n        day_range_end: 'day-range-end',\n        day_selected:\n          // aria-selected variants win over day_today when the selected day is also today (accent fill with the primary foreground was 1.04:1).\n          'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground aria-selected:bg-primary aria-selected:text-primary-foreground',\n        day_today: 'bg-accent text-accent-foreground',\n        day_outside:\n          // Outside days keep the subtle text role at full opacity (an opacity wash dropped them to 2.3:1).\n          'day-outside text-text-subtle aria-selected:bg-accent/50 aria-selected:text-text-subtle-on-muted',\n        day_disabled: 'text-muted-foreground opacity-disabled',\n        day_range_middle: 'aria-selected:bg-accent aria-selected:text-accent-foreground',\n        day_hidden: 'invisible',\n        ...classNames,\n      }}\n      components={{\n        IconLeft: ({ ...props }) => <ChevronLeft className=\"h-4 w-4\" />,\n        IconRight: ({ ...props }) => <ChevronRight className=\"h-4 w-4\" />,\n      }}\n      {...props}\n    />\n  );\n}\nCalendar.displayName = 'Calendar';\n\nexport { Calendar };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}