{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-range-picker",
  "type": "registry:ui",
  "title": "Date Range 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/date-picker.json",
    "https://hamur.dev/r/react/popover.json"
  ],
  "files": [
    {
      "path": "react/date-range-picker.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui date-range-picker@0.1.0\nimport { DateRangePicker as DateRangePickerPrimitive } from '@base-ui-next/react/date-range-picker'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\nimport { CalendarContent } from '@/components/ui/calendar'\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\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 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 dateRangePickerControlClassName = 'w-fit'\n\nconst dateRangePickerInputClassName = 'flex flex-none items-center'\n\nconst dateRangePickerSeparatorClassName = 'px-1 text-muted-foreground'\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\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 DateRangePicker({ ...props }: DateRangePickerPrimitive.Root.Props) {\n  return <DateRangePickerPrimitive.Root {...props} />\n}\n\nfunction DateRangePickerControl({ className, ...props }: DateRangePickerPrimitive.Control.Props) {\n  return (\n    <DateRangePickerPrimitive.Control\n      data-slot=\"date-range-picker-control\"\n      className={cn(datePickerControlClassName, dateRangePickerControlClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DateRangePickerInput({\n  className,\n  children,\n  ...props\n}: DateRangePickerPrimitive.Input.Props) {\n  return (\n    <DateRangePickerPrimitive.Input\n      data-slot=\"date-range-picker-input\"\n      className={cn(dateRangePickerInputClassName, className)}\n      {...props}\n    >\n      {children ??\n        (({ segments }) =>\n          segments.map((segment) => (\n            <DateRangePickerSegment key={segment.index} segment={segment} />\n          )))}\n    </DateRangePickerPrimitive.Input>\n  )\n}\n\nfunction DateRangePickerSegment({ className, ...props }: DateRangePickerPrimitive.Segment.Props) {\n  return (\n    <DateRangePickerPrimitive.Segment\n      data-slot=\"date-range-picker-segment\"\n      className={cn(datePickerSegmentClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DateRangePickerSeparator({\n  className,\n  children,\n  ...props\n}: DateRangePickerPrimitive.Separator.Props) {\n  return (\n    <DateRangePickerPrimitive.Separator\n      data-slot=\"date-range-picker-separator\"\n      className={cn(dateRangePickerSeparatorClassName, className)}\n      {...props}\n    >\n      {children ?? '–'}\n    </DateRangePickerPrimitive.Separator>\n  )\n}\n\nfunction DateRangePickerClear({\n  className,\n  children,\n  ...props\n}: DateRangePickerPrimitive.Clear.Props) {\n  return (\n    <DateRangePickerPrimitive.Clear\n      data-slot=\"date-range-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    </DateRangePickerPrimitive.Clear>\n  )\n}\n\nfunction DateRangePickerTrigger({\n  className,\n  children,\n  ...props\n}: DateRangePickerPrimitive.Trigger.Props) {\n  return (\n    <DateRangePickerPrimitive.Trigger\n      data-slot=\"date-range-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    </DateRangePickerPrimitive.Trigger>\n  )\n}\n\nfunction DateRangePickerPortal({ ...props }: DateRangePickerPrimitive.Portal.Props) {\n  return <DateRangePickerPrimitive.Portal {...props} />\n}\n\nfunction DateRangePickerPositioner({\n  className,\n  align = 'start',\n  sideOffset = 4,\n  ...props\n}: DateRangePickerPrimitive.Positioner.Props) {\n  return (\n    <DateRangePickerPrimitive.Positioner\n      data-slot=\"date-range-picker-positioner\"\n      align={align}\n      sideOffset={sideOffset}\n      className={cn(popoverContentPositionerClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DateRangePickerPopup({ className, ...props }: DateRangePickerPrimitive.Popup.Props) {\n  return (\n    <DateRangePickerPrimitive.Popup\n      data-slot=\"date-range-picker-popup\"\n      className={cn(popoverContentClassName, datePickerPopupClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction DateRangePickerCalendar({\n  className,\n  children,\n  months,\n  buttonVariant,\n  showOutsideDays,\n  ...props\n}: DateRangePickerPrimitive.Calendar.Props & React.ComponentProps<typeof CalendarContent>) {\n  return (\n    <DateRangePickerPrimitive.Calendar\n      data-slot=\"date-range-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    </DateRangePickerPrimitive.Calendar>\n  )\n}\n\nfunction DateRangePickerPreset({ className, ...props }: DateRangePickerPrimitive.Preset.Props) {\n  return (\n    <DateRangePickerPrimitive.Preset\n      data-slot=\"date-range-picker-preset\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'sm' }),\n        datePickerPresetClassName,\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction DateRangePickerClose({ className, ...props }: DateRangePickerPrimitive.Close.Props) {\n  return (\n    <DateRangePickerPrimitive.Close\n      data-slot=\"date-range-picker-close\"\n      className={cn(\n        buttonVariants({ variant: 'outline', size: 'sm' }),\n        datePickerCloseClassName,\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  DateRangePicker,\n  DateRangePickerCalendar,\n  DateRangePickerClear,\n  DateRangePickerClose,\n  DateRangePickerControl,\n  DateRangePickerInput,\n  DateRangePickerPopup,\n  DateRangePickerPortal,\n  DateRangePickerPositioner,\n  DateRangePickerPreset,\n  DateRangePickerSegment,\n  DateRangePickerSeparator,\n  DateRangePickerTrigger,\n}\n",
      "type": "registry:ui",
      "target": "@ui/date-range-picker.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.0",
      "hash": "ce0a880142a7a276a678f55921eaa174f9313c9347782a90308f91627c05f9d7",
      "files": {
        "@ui/date-range-picker.tsx": "92abd6f9467f050bc93f3b8fde2663a6b1264bbb131ac471aa4620d6ee277751"
      }
    }
  }
}
