{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "month-range-picker",
  "type": "registry:ui",
  "title": "Month 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/month-calendar.json",
    "https://hamur.dev/r/react/month-picker.json",
    "https://hamur.dev/r/react/popover.json"
  ],
  "files": [
    {
      "path": "react/month-range-picker.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui month-range-picker@0.1.0\nimport { MonthRangePicker as MonthRangePickerPrimitive } from '@base-ui-next/react/month-range-picker'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\nimport { MonthCalendarContent } from '@/components/ui/month-calendar'\n\nconst monthPickerControlClassName =\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 monthPickerSegmentClassName =\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=literal]:w-auto data-[type=literal]:px-px data-[type=literal]:text-muted-foreground data-[type=literal]:whitespace-pre data-[type=year]:w-[calc(4ch+4px)]'\n\nconst monthPickerClearClassName = 'data-empty:invisible'\n\nconst monthPickerTriggerClassName = 'shrink-0'\n\nconst monthPickerPopupClassName = 'w-auto gap-0 p-0'\n\nconst monthPickerPresetClassName =\n  'justify-start data-selected:bg-muted data-selected:font-medium'\n\nconst monthPickerCloseClassName = 'm-3 mt-0 self-end'\n\nconst monthRangePickerControlClassName = 'w-fit'\n\nconst monthRangePickerInputClassName = 'flex flex-none items-center'\n\nconst monthRangePickerSeparatorClassName = '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\nconst monthCalendarClassName =\n  'group/month-calendar w-fit bg-background p-3 in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent in-data-[slot=month-picker-popup]:bg-transparent in-data-[slot=month-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 (docs/design/log/month-year-picker.md).\nfunction MonthRangePicker({ ...props }: MonthRangePickerPrimitive.Root.Props) {\n  return <MonthRangePickerPrimitive.Root {...props} />\n}\n\nfunction MonthRangePickerControl({ className, ...props }: MonthRangePickerPrimitive.Control.Props) {\n  return (\n    <MonthRangePickerPrimitive.Control\n      data-slot=\"month-range-picker-control\"\n      className={cn(monthPickerControlClassName, monthRangePickerControlClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MonthRangePickerInput({\n  className,\n  children,\n  ...props\n}: MonthRangePickerPrimitive.Input.Props) {\n  return (\n    <MonthRangePickerPrimitive.Input\n      data-slot=\"month-range-picker-input\"\n      className={cn(monthRangePickerInputClassName, className)}\n      {...props}\n    >\n      {children ??\n        (({ segments }) =>\n          segments.map((segment) => (\n            <MonthRangePickerSegment key={segment.index} segment={segment} />\n          )))}\n    </MonthRangePickerPrimitive.Input>\n  )\n}\n\nfunction MonthRangePickerSegment({ className, ...props }: MonthRangePickerPrimitive.Segment.Props) {\n  return (\n    <MonthRangePickerPrimitive.Segment\n      data-slot=\"month-range-picker-segment\"\n      className={cn(monthPickerSegmentClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MonthRangePickerSeparator({\n  className,\n  children,\n  ...props\n}: MonthRangePickerPrimitive.Separator.Props) {\n  return (\n    <MonthRangePickerPrimitive.Separator\n      data-slot=\"month-range-picker-separator\"\n      className={cn(monthRangePickerSeparatorClassName, className)}\n      {...props}\n    >\n      {children ?? '–'}\n    </MonthRangePickerPrimitive.Separator>\n  )\n}\n\nfunction MonthRangePickerClear({\n  className,\n  children,\n  ...props\n}: MonthRangePickerPrimitive.Clear.Props) {\n  return (\n    <MonthRangePickerPrimitive.Clear\n      data-slot=\"month-range-picker-clear\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'icon-xs' }),\n        monthPickerClearClassName,\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    </MonthRangePickerPrimitive.Clear>\n  )\n}\n\nfunction MonthRangePickerTrigger({\n  className,\n  children,\n  ...props\n}: MonthRangePickerPrimitive.Trigger.Props) {\n  return (\n    <MonthRangePickerPrimitive.Trigger\n      data-slot=\"month-range-picker-trigger\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'icon-sm' }),\n        monthPickerTriggerClassName,\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    </MonthRangePickerPrimitive.Trigger>\n  )\n}\n\nfunction MonthRangePickerPortal({ ...props }: MonthRangePickerPrimitive.Portal.Props) {\n  return <MonthRangePickerPrimitive.Portal {...props} />\n}\n\nfunction MonthRangePickerPositioner({\n  className,\n  align = 'start',\n  sideOffset = 4,\n  ...props\n}: MonthRangePickerPrimitive.Positioner.Props) {\n  return (\n    <MonthRangePickerPrimitive.Positioner\n      data-slot=\"month-range-picker-positioner\"\n      align={align}\n      sideOffset={sideOffset}\n      className={cn(popoverContentPositionerClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MonthRangePickerPopup({ className, ...props }: MonthRangePickerPrimitive.Popup.Props) {\n  return (\n    <MonthRangePickerPrimitive.Popup\n      data-slot=\"month-range-picker-popup\"\n      className={cn(popoverContentClassName, monthPickerPopupClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MonthRangePickerCalendar({\n  className,\n  children,\n  years,\n  buttonVariant,\n  ...props\n}: MonthRangePickerPrimitive.Calendar.Props & React.ComponentProps<typeof MonthCalendarContent>) {\n  return (\n    <MonthRangePickerPrimitive.Calendar\n      data-slot=\"month-range-picker-calendar\"\n      className={cn(monthCalendarClassName, className)}\n      {...props}\n    >\n      {children ?? <MonthCalendarContent years={years} buttonVariant={buttonVariant} />}\n    </MonthRangePickerPrimitive.Calendar>\n  )\n}\n\nfunction MonthRangePickerPreset({ className, ...props }: MonthRangePickerPrimitive.Preset.Props) {\n  return (\n    <MonthRangePickerPrimitive.Preset\n      data-slot=\"month-range-picker-preset\"\n      className={cn(\n        buttonVariants({ variant: 'ghost', size: 'sm' }),\n        monthPickerPresetClassName,\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction MonthRangePickerClose({ className, ...props }: MonthRangePickerPrimitive.Close.Props) {\n  return (\n    <MonthRangePickerPrimitive.Close\n      data-slot=\"month-range-picker-close\"\n      className={cn(\n        buttonVariants({ variant: 'outline', size: 'sm' }),\n        monthPickerCloseClassName,\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  MonthRangePicker,\n  MonthRangePickerCalendar,\n  MonthRangePickerClear,\n  MonthRangePickerClose,\n  MonthRangePickerControl,\n  MonthRangePickerInput,\n  MonthRangePickerPopup,\n  MonthRangePickerPortal,\n  MonthRangePickerPositioner,\n  MonthRangePickerPreset,\n  MonthRangePickerSegment,\n  MonthRangePickerSeparator,\n  MonthRangePickerTrigger,\n}\n",
      "type": "registry:ui",
      "target": "@ui/month-range-picker.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.0",
      "hash": "cd3d4c94a9748ea43df77b106d1b09e7a8b0ecbf5c871348b87db6cdf00cc1be",
      "files": {
        "@ui/month-range-picker.tsx": "5d4ebef17222839885d1fd8e9373a12459c1ab41a75708e1371f64c29511549f"
      }
    }
  }
}
