Add Shadcn Form components with vee-validate and zod integration

- Install Shadcn Form components (FormControl, FormDescription, FormItem, FormLabel, FormMessage)
- Add vee-validate 4.15.1 for form validation
- Add zod 3.25.76 for schema validation
- Add @vee-validate/zod 4.15.1 for integration
- Update reka-ui to 2.5.0
- Prepare foundation for proper form handling with type-safe validation
- Enables proper checkbox array handling and form accessibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
padreug 2025-09-08 15:59:08 +02:00
parent a373fa714d
commit b0a2d1a6df
10 changed files with 324 additions and 9 deletions

View file

@ -0,0 +1,25 @@
<script lang="ts" setup>
import type { LabelProps } from "reka-ui"
import type { HTMLAttributes } from "vue"
import { cn } from "@/lib/utils"
import { Label } from '@/components/ui/label'
import { useFormField } from "./useFormField"
const props = defineProps<LabelProps & { class?: HTMLAttributes["class"] }>()
const { error, formItemId } = useFormField()
</script>
<template>
<Label
data-slot="form-label"
:data-error="!!error"
:class="cn(
'data-[error=true]:text-destructive',
props.class,
)"
:for="formItemId"
>
<slot />
</Label>
</template>