{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-picker",
  "type": "registry:ui",
  "title": "Date Picker",
  "dependencies": [
    "@base-ui-next/react"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json",
    "https://hamur.dev/r/react/button.json",
    "https://hamur.dev/r/react/calendar.json",
    "https://hamur.dev/r/react/popover.json"
  ],
  "files": [
    {
      "path": "react/date-picker.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui date-picker@0.1.1\nimport { DatePicker as DatePickerPrimitive } from '@base-ui-next/react/date-picker'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\nimport { CalendarContent } from '@/components/ui/calendar'\n\nconst popoverContentPositionerClassName = 'isolate z-50'\n\nconst popoverContentClassName =\n  'z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95'\n\nconst datePickerControlClassName =\n  'flex h-9 w-fit min-w-0 items-center gap-0.5 rounded-md border border-input bg-transparent pr-1 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-invalid:border-destructive data-invalid:focus-within:ring-destructive/20 dark:bg-input/30 dark:data-invalid:border-destructive/50 dark:data-invalid:focus-within:ring-destructive/40'\n\nconst datePickerInputClassName = 'flex min-w-0 flex-1 items-center'\n\nconst datePickerSegmentClassName =\n  'm-0 h-6 w-[calc(2ch+4px)] min-w-0 rounded-sm border-0 bg-transparent p-0 text-center tabular-nums caret-transparent outline-hidden selection:bg-transparent placeholder:text-muted-foreground focus:bg-primary focus:text-primary-foreground focus:placeholder:text-primary-foreground data-invalid:text-destructive data-invalid:underline data-invalid:decoration-dashed data-[type=dayPeriod]:w-[calc(3ch+4px)] data-[type=literal]:w-auto data-[type=literal]:px-px data-[type=literal]:text-muted-foreground data-[type=literal]:whitespace-pre data-[type=millisecond]:w-[calc(3ch+4px)] data-[type=year]:w-[calc(4ch+4px)]'\n\nconst datePickerClearClassName = 'data-empty:invisible'\n\nconst datePickerTriggerClassName = 'shrink-0'\n\nconst datePickerPopupClassName = 'w-auto gap-0 p-0'\n\nconst datePickerPresetClassName =\n  'justify-start data-selected:bg-muted data-selected:font-medium'\n\nconst datePickerCloseClassName = 'm-3 mt-0 self-end'\n\nconst calendarClassName =\n  'group/calendar w-fit bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent in-data-[slot=date-picker-popup]:bg-transparent in-data-[slot=date-range-picker-popup]:bg-transparent'\n\n// lucide's icons, inline and hidden from assistive technology (10 · As built, BN-309).\nfunction SvgIcon({ children, ...props }: React.ComponentProps<'svg'>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      {children}\n    </svg>\n  )\n}\n\n// No shadcn item: one name per Base UI part (BN-331, question 10).\nfunction DatePicker({ ...props }: DatePickerPrimitive.Root.Props) {\n  return <DatePickerPrimitive.Root {...props} />\n}\n\nfunction DatePickerControl({ className, ...props }: DatePickerPrimitive.Control.Props) {\n  return (\n    <DatePickerPrimitive.Control\n      data-slot=\"date-picker-control\"\n      className={cn(datePickerControlClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DatePickerInput({ className, children, ...props }: DatePickerPrimitive.Input.Props) {\n  return (\n    <DatePickerPrimitive.Input\n      data-slot=\"date-picker-input\"\n      className={cn(datePickerInputClassName, className)}\n      {...props}\n    >\n      {children ??\n        (({ segments }) =>\n          segments.map((segment) => <DatePickerSegment key={segment.index} segment={segment} />))}\n    </DatePickerPrimitive.Input>\n  )\n}\n\nfunction DatePickerSegment({ className, ...props }: DatePickerPrimitive.Segment.Props) {\n  return (\n    <DatePickerPrimitive.Segment\n      data-slot=\"date-picker-segment\"\n      className={cn(datePickerSegmentClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DatePickerClear({ className, children, ...props }: DatePickerPrimitive.Clear.Props) {\n  return (\n    <DatePickerPrimitive.Clear\n      data-slot=\"date-picker-clear\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'icon-xs' }),\n        datePickerClearClassName,\n        className,\n      )}\n      {...props}\n    >\n      {children ?? (\n        <SvgIcon>\n          <path d=\"M18 6 6 18\" />\n          <path d=\"m6 6 12 12\" />\n        </SvgIcon>\n      )}\n    </DatePickerPrimitive.Clear>\n  )\n}\n\nfunction DatePickerTrigger({ className, children, ...props }: DatePickerPrimitive.Trigger.Props) {\n  return (\n    <DatePickerPrimitive.Trigger\n      data-slot=\"date-picker-trigger\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'icon-sm' }),\n        datePickerTriggerClassName,\n        className,\n      )}\n      {...props}\n    >\n      {children ?? (\n        <SvgIcon>\n          <path d=\"M8 2v4\" />\n          <path d=\"M16 2v4\" />\n          <rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\" />\n          <path d=\"M3 10h18\" />\n        </SvgIcon>\n      )}\n    </DatePickerPrimitive.Trigger>\n  )\n}\n\nfunction DatePickerPortal({ ...props }: DatePickerPrimitive.Portal.Props) {\n  return <DatePickerPrimitive.Portal {...props} />\n}\n\nfunction DatePickerPositioner({\n  className,\n  align = 'start',\n  sideOffset = 4,\n  ...props\n}: DatePickerPrimitive.Positioner.Props) {\n  return (\n    <DatePickerPrimitive.Positioner\n      data-slot=\"date-picker-positioner\"\n      align={align}\n      sideOffset={sideOffset}\n      className={cn(popoverContentPositionerClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DatePickerPopup({ className, ...props }: DatePickerPrimitive.Popup.Props) {\n  return (\n    <DatePickerPrimitive.Popup\n      data-slot=\"date-picker-popup\"\n      className={cn(popoverContentClassName, datePickerPopupClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DatePickerCalendar({\n  className,\n  children,\n  months,\n  buttonVariant,\n  showOutsideDays,\n  ...props\n}: DatePickerPrimitive.Calendar.Props & React.ComponentProps<typeof CalendarContent>) {\n  return (\n    <DatePickerPrimitive.Calendar\n      data-slot=\"date-picker-calendar\"\n      className={cn(calendarClassName, className)}\n      {...props}\n    >\n      {children ?? (\n        <CalendarContent\n          months={months}\n          buttonVariant={buttonVariant}\n          showOutsideDays={showOutsideDays}\n        />\n      )}\n    </DatePickerPrimitive.Calendar>\n  )\n}\n\nfunction DatePickerPreset({ className, ...props }: DatePickerPrimitive.Preset.Props) {\n  return (\n    <DatePickerPrimitive.Preset\n      data-slot=\"date-picker-preset\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'sm' }),\n        datePickerPresetClassName,\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction DatePickerClose({ className, ...props }: DatePickerPrimitive.Close.Props) {\n  return (\n    <DatePickerPrimitive.Close\n      data-slot=\"date-picker-close\"\n      className={cn(\n        buttonVariants({ variant: 'outline', size: 'sm' }),\n        datePickerCloseClassName,\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  DatePicker,\n  DatePickerCalendar,\n  DatePickerClear,\n  DatePickerClose,\n  DatePickerControl,\n  DatePickerInput,\n  DatePickerPopup,\n  DatePickerPortal,\n  DatePickerPositioner,\n  DatePickerPreset,\n  DatePickerSegment,\n  DatePickerTrigger,\n}\n",
      "type": "registry:ui",
      "target": "@ui/date-picker.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.1",
      "hash": "f5764fc00f2b746ed67500802a3d1def58174422c1ed5dafa07edf89a08f70bd",
      "files": {
        "@ui/date-picker.tsx": "fafb598ddfd842ec2a47f88c07f9972443ada309f11565ffcecdcd147263acdb"
      }
    }
  }
}
