{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "field",
  "registryDependencies": [
    "@fulldev/label",
    "@fulldev/separator"
  ],
  "files": [
    {
      "path": "src/components/ui/field/field.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & VariantProps<typeof variants>\n\nconst variants = cva(\n  \"data-[invalid=true]:text-destructive group/field flex w-full gap-3\",\n  {\n    variants: {\n      orientation: {\n        vertical:\n          \"flex-col [&>.sr-only]:w-auto [&>:not([role=checkbox]):not([role=radio])]:w-full\",\n        horizontal:\n          \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n        responsive:\n          \"flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto [&>:not([role=checkbox]):not([role=radio])]:w-full @md/field-group:[&>:not([role=checkbox]):not([role=radio])]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n      },\n    },\n    defaultVariants: {\n      orientation: \"vertical\",\n    },\n  }\n)\n\nconst { class: className, orientation = \"vertical\", ...props } = Astro.props\n---\n\n<div\n  role=\"group\"\n  data-slot=\"field\"\n  data-orientation={orientation}\n  class={cn(variants({ orientation }), className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-content.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"field-content\"\n  class={cn(\n    \"group/field-content flex flex-1 flex-col gap-1 leading-snug\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-description.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"p\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<p\n  data-slot=\"field-description\"\n  class={cn(\n    \"text-muted-foreground text-left text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5\",\n    \"last:mt-0 nth-last-2:-mt-1\",\n    \"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</p>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-error.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  errors?: Array<{ message?: string } | undefined>\n}\n\nconst { class: className, errors, ...props } = Astro.props\n\nconst messages = [\n  ...new Set(\n    (errors ?? [])\n      .map((error) => error?.message?.trim())\n      .filter((message): message is string => Boolean(message))\n  ),\n]\n\nconst hasDefaultSlot = Astro.slots.has(\"default\")\nconst shouldRender = hasDefaultSlot || messages.length > 0\n---\n\n{\n  shouldRender && (\n    <div\n      role=\"alert\"\n      data-slot=\"field-error\"\n      class={cn(\"text-destructive text-sm font-normal\", className)}\n      {...props}\n    >\n      {hasDefaultSlot ? (\n        <slot />\n      ) : messages.length === 1 ? (\n        messages[0]\n      ) : (\n        <ul class=\"ml-4 flex list-disc flex-col gap-1\">\n          {messages.map((message) => (\n            <li>{message}</li>\n          ))}\n        </ul>\n      )}\n    </div>\n  )\n}\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-group.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"field-group\"\n  class={cn(\n    \"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-label.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n  data-slot=\"field-label\"\n  class={cn(\n    \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3\",\n    \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</Label>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-legend.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"legend\"> & {\n  variant?: \"legend\" | \"label\"\n}\n\nconst { class: className, variant = \"legend\", ...props } = Astro.props\n---\n\n<legend\n  data-slot=\"field-legend\"\n  data-variant={variant}\n  class={cn(\n    \"mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</legend>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-separator.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\nconst hasContent = Astro.slots.has(\"default\")\n---\n\n<div\n  data-slot=\"field-separator\"\n  data-content={hasContent}\n  class={cn(\n    \"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2\",\n    className\n  )}\n  {...props}\n>\n  <Separator class=\"absolute inset-0 top-1/2\" />\n  {\n    hasContent && (\n      <span\n        class=\"text-muted-foreground bg-background relative mx-auto block w-fit px-2\"\n        data-slot=\"field-separator-content\"\n      >\n        <slot />\n      </span>\n    )\n  }\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-set.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"fieldset\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<fieldset\n  data-slot=\"field-set\"\n  class={cn(\n    \"flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</fieldset>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/field-title.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"field-label\"\n  class={cn(\n    \"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50\",\n    className\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/field/index.ts",
      "content": "export { default as Field } from \"./field.astro\"\nexport { default as FieldContent } from \"./field-content.astro\"\nexport { default as FieldDescription } from \"./field-description.astro\"\nexport { default as FieldError } from \"./field-error.astro\"\nexport { default as FieldGroup } from \"./field-group.astro\"\nexport { default as FieldLabel } from \"./field-label.astro\"\nexport { default as FieldLegend } from \"./field-legend.astro\"\nexport { default as FieldSeparator } from \"./field-separator.astro\"\nexport { default as FieldSet } from \"./field-set.astro\"\nexport { default as FieldTitle } from \"./field-title.astro\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}