{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "date-picker",
  "title": "date-picker",
  "description": "date-picker",
  "dependencies": [
    "@heroicons/react",
    "react-aria-components",
    "tailwindcss-react-aria-components"
  ],
  "registryDependencies": [
    "https://intentui.com/r/popover",
    "https://intentui.com/r/date-field",
    "https://intentui.com/r/field",
    "https://intentui.com/r/input",
    "https://intentui.com/r/use-mobile",
    "https://intentui.com/r/primitive",
    "https://intentui.com/r/calendar",
    "https://intentui.com/r/dialog"
  ],
  "files": [
    {
      "path": "src/components/ui/date-picker.tsx",
      "content": "\"use client\"\n\nimport { CalendarDaysIcon } from \"@heroicons/react/24/outline\"\nimport { Button as PrimitiveButton } from \"react-aria-components/Button\"\nimport {\n  DatePicker as DatePickerPrimitive,\n  type DatePickerProps as DatePickerPrimitiveProps,\n  type DateValue,\n} from \"react-aria-components/DatePicker\"\nimport { type GroupProps } from \"react-aria-components/Group\"\nimport { Popover, type PopoverProps } from \"@/components/ui/popover\"\nimport { DateInput } from \"@/components/ui/date-field\"\nimport { fieldStyles } from \"@/components/ui/field\"\nimport { InputGroup } from \"@/components/ui/input\"\nimport { useIsMobile } from \"@/hooks/use-mobile\"\nimport { cx } from \"@/lib/primitive\"\nimport { Calendar } from \"./calendar\"\nimport { Dialog } from \"./dialog\"\n\nexport interface DatePickerProps<T extends DateValue> extends DatePickerPrimitiveProps<T> {\n  popover?: Omit<PopoverProps, \"children\">\n  calendar?: React.ComponentProps<typeof Calendar>\n}\n\nexport function DatePicker<T extends DateValue>({\n  className,\n  children,\n  popover,\n  calendar,\n  ...props\n}: DatePickerProps<T>) {\n  const isMobile = useIsMobile()\n\n  return (\n    <DatePickerPrimitive\n      data-slot=\"control\"\n      className={cx(fieldStyles({ className: \"group\" }), className)}\n      {...props}\n    >\n      {(values) => (\n        <>\n          {typeof children === \"function\" ? children(values) : children}\n          {isMobile ? (\n            <Dialog aria-label=\"Date picker\" closeButton={false}>\n              <div className=\"flex justify-center p-6\">\n                <Calendar {...calendar} />\n              </div>\n            </Dialog>\n          ) : (\n            <Popover placement={popover?.placement ?? \"bottom\"} className=\"p-2\" {...popover}>\n              <Calendar {...calendar} />\n            </Popover>\n          )}\n        </>\n      )}\n    </DatePickerPrimitive>\n  )\n}\n\nexport function DatePickerTrigger({ className, ...props }: GroupProps) {\n  return (\n    <InputGroup className={cx(\"min-w-40 *:data-[slot=control]:w-full\", className)} {...props}>\n      <DateInput />\n      <PrimitiveButton\n        data-slot=\"date-picker-trigger\"\n        className=\"touch-target pressed:text-foreground text-muted-foreground hover:text-foreground focus-visible:text-foreground grid place-content-center px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] outline-hidden *:size-5 sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:*:size-4\"\n      >\n        <CalendarDaysIcon />\n      </PrimitiveButton>\n    </InputGroup>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "css": {
    "@plugin \"tailwindcss-react-aria-components\"": {}
  },
  "type": "registry:ui"
}