{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-field",
  "title": "Date Field",
  "description": "Native date input styled to match the design system.",
  "dependencies": [
    "@vllnt/ui@^0.2.1"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/date-field/date-field.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { CalendarDays } from \"lucide-react\";\n\nimport { cn } from \"@vllnt/ui\";\n\n/** Native date input styled to match the design system. */\nexport type DateFieldProps = Omit<\n  React.ComponentPropsWithoutRef<\"input\">,\n  \"defaultValue\" | \"onChange\" | \"type\" | \"value\"\n> & {\n  defaultValue?: string;\n  onValueChange?: (value: string) => void;\n  value?: string;\n};\n\nconst DateField = ({\n  className,\n  defaultValue = \"\",\n  onValueChange,\n  ref,\n  value,\n  ...props\n}: DateFieldProps & { ref?: React.Ref<HTMLInputElement> }) => {\n  const [internalValue, setInternalValue] = React.useState(defaultValue);\n  const currentValue = value ?? internalValue;\n\n  return (\n    <div className=\"relative w-full\">\n      <CalendarDays className=\"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n      <input\n        {...props}\n        className={cn(\n          \"flex h-10 w-full rounded-md border border-input bg-background py-2 pl-9 pr-3 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&::-webkit-calendar-picker-indicator]:opacity-60\",\n          className,\n        )}\n        onChange={(event) => {\n          if (value === undefined) {\n            setInternalValue(event.target.value);\n          }\n\n          onValueChange?.(event.target.value);\n        }}\n        ref={ref}\n        type=\"date\"\n        value={currentValue}\n      />\n    </div>\n  );\n};\nDateField.displayName = \"DateField\";\n\nexport { DateField };\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component",
  "version": "0.2.1",
  "stability": "stable"
}
