{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-field",
  "type": "registry:item",
  "title": "Date Field",
  "description": "A labelled date on the native `<input type=\"date\">`: the platform's own calendar on every device, typed entry in the visitor's own date format, `min` and `max`, form submission under `name` and the browser's validation. The value is \"YYYY-MM-DD\" (or \"\" when empty). `value` is two-way.",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "input"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/date-field.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/date-field.js",
      "content": "// Generated by zubra from date-field.zb. Do not edit.\nimport { $define, $r, $t } from \"@zubra/runtime\";\nimport { id } from '@zubra/runtime';\n\nexport const tag = \"date-field\";\n\nexport default $define(tag, {\n  props: {\n    \"value\": { attribute: \"value\", default: \"\", required: false, model: true },\n    \"label\": { attribute: \"label\", default: \"Date\", required: false },\n    \"description\": { attribute: \"description\", default: \"\", required: false },\n    \"name\": { attribute: \"name\", default: \"\", required: false },\n    \"min\": { attribute: \"min\", default: \"\", required: false },\n    \"max\": { attribute: \"max\", default: \"\", required: false },\n    \"required\": { attribute: \"required\", default: false, required: false },\n    \"disabled\": { attribute: \"disabled\", default: false, required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [],\n  events: [\"valuechange\"],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (date-field) to ([data-zb-slotted=\\\"date-field\\\"]) {\\n  :scope { display: block; }\\n  .datefield { display: grid; gap: 0.4rem; }\\n  label { font-weight: 600; font-size: 0.925rem; }\\n  .datefield-help { margin: 0; font-size: 0.85rem; color: color-mix(in oklab, var(--muted-foreground, #71717a) 75%, var(--foreground, #18181b)); }\\n  input { width: 100%; box-sizing: border-box; padding: 0.5rem 0.75rem; border: 1px solid var(--input, #e4e4e7); border-radius: calc(var(--radius, 0.625rem) - 2px); background: var(--background, #fff); color: var(--foreground, #18181b); font: inherit; color-scheme: inherit; }\\n  input:focus-visible { outline: none; border-color: var(--ring, #a1a1aa); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring, #a1a1aa) 40%, transparent); }\\n  input:user-invalid { border-color: var(--destructive, #dc2626); }\\n}\\n}\\n\",\n  template: \"\\n  <div class=\\\"datefield\\\">\\n    <label></label>\\n    <!--[--><!--]-->\\n    <input type=\\\"date\\\">\\n  </div>\\n\",\n  setup($p, $emit) {\n                                     \n\n  const inputId = id()\n  const helpId = id()\n    return [\n      { path: [0, 0], attribute: \"for\", value: () => $r(inputId) },\n      { path: [0, 0], text: () => $t($p.label) },\n      { path: [0, 1], when: () => $p.description, blocks: [{ template: \"<p class=\\\"datefield-help\\\"></p>\", parts: () => [{ path: [0], attribute: \"id\", value: () => $r(helpId) }, { path: [0], text: () => $t($p.description) }] }, null] },\n      { path: [0, 2], attribute: \"id\", value: () => $r(inputId) },\n      { path: [0, 2], attribute: \"name\", value: () => ($p.name || null) },\n      { path: [0, 2], attribute: \"min\", value: () => ($p.min || null) },\n      { path: [0, 2], attribute: \"max\", value: () => ($p.max || null) },\n      { path: [0, 2], attribute: \"required\", boolean: true, value: () => $p.required },\n      { path: [0, 2], attribute: \"disabled\", boolean: true, value: () => $p.disabled },\n      { path: [0, 2], attribute: \"aria-describedby\", value: () => ($p.description ? $r(helpId) : null) },\n      { path: [0, 2], attribute: \"value\", value: () => $p.value },\n      { path: [0, 2], on: \"change\", handler: () => ((event) => ($p.value = event.target.value)) },\n    ];\n  },\n});\n"
    }
  ]
}
