{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-input",
  "title": "Date input",
  "description": "ui-sdk's Date input: a date typed one segment at a time in the order the locale writes it, where one highlight glides between the segments and each number rolls to its new value. With a time, its segments follow the date's.",
  "dependencies": [
    "@ui-sdk/react"
  ],
  "registryDependencies": [
    "https://kinoui.com/r/dates.json",
    "https://kinoui.com/r/segmented-input.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/date-input.tsx",
      "content": "'use client'\n\nimport { useLocale } from '@/registry/lib/dates'\nimport { SegmentedBody, segmentedBoxClassName } from '@/registry/lib/segmented-input'\nimport {\n  DateInput as DateInputPrimitive,\n  DateInputSegment,\n} from '@ui-sdk/react/date-input'\nimport type { ComponentProps } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * ui-sdk's Date input: a date typed a segment at a time, in the order the\n * locale writes it. One highlight marks the segment you are in and glides\n * to the next, and each number rolls up or down to its new value, however\n * it changed. Finer than a day, the time's segments follow the date's in\n * the same field.\n */\nfunction DateInput({\n  locale,\n  className,\n  ...props\n}: Omit<ComponentProps<typeof DateInputPrimitive>, 'className' | 'children'> & {\n  className?: string\n}) {\n  const resolved = useLocale(locale)\n  const time = props.granularity !== undefined && props.granularity !== 'day'\n  return (\n    <DateInputPrimitive\n      locale={resolved}\n      className={cn(segmentedBoxClassName, className)}\n      // A group's disabled state, which ui-sdk shows only on its segments, so its label reads as inactive too.\n      render={(own: ComponentProps<'div'>, state: { disabled: boolean }) => (\n        <div {...own} aria-disabled={state.disabled || undefined} />\n      )}\n      {...props}\n    >\n      {(state) => (\n        <SegmentedBody\n          segments={state.segments}\n          value={state.value}\n          Segment={DateInputSegment}\n          locale={resolved}\n          compact={time}\n        />\n      )}\n    </DateInputPrimitive>\n  )\n}\n\nexport { DateInput }\n",
      "type": "registry:component",
      "target": "@components/kino/date-input.tsx"
    }
  ],
  "type": "registry:component"
}