From d690ef895a4513ca6bd348d3c2ac29a171047ad3 Mon Sep 17 00:00:00 2001 From: Hirotaka Mizutani <52546+hirotaka@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:41:31 +0900 Subject: [PATCH] feat(registry): Add form components --- AGENTS.md | 2 +- app/components/demo/FormDemo.vue | 118 ++++++++++++++++++ app/components/demo/FormFieldDemo.vue | 32 +++++ app/components/ui/field/Field.vue | 25 ++++ app/components/ui/field/FieldContent.vue | 15 +++ app/components/ui/field/FieldDescription.vue | 15 +++ app/components/ui/field/FieldError.vue | 47 +++++++ app/components/ui/field/FieldGroup.vue | 15 +++ app/components/ui/field/FieldLabel.vue | 20 +++ app/components/ui/field/FieldLegend.vue | 21 ++++ app/components/ui/field/FieldSeparator.vue | 15 +++ app/components/ui/field/FieldSet.vue | 15 +++ app/components/ui/field/FieldTitle.vue | 15 +++ app/components/ui/field/index.ts | 10 ++ app/components/ui/select/Select.vue | 18 +++ app/components/ui/select/SelectContent.vue | 33 +++++ app/components/ui/select/SelectGroup.vue | 15 +++ app/components/ui/select/SelectItem.vue | 32 +++++ app/components/ui/select/SelectItemText.vue | 12 ++ app/components/ui/select/SelectLabel.vue | 18 +++ app/components/ui/select/SelectSeparator.vue | 16 +++ app/components/ui/select/SelectTrigger.vue | 28 +++++ app/components/ui/select/SelectValue.vue | 15 +++ app/components/ui/select/index.ts | 9 ++ app/components/ui/textarea/Textarea.vue | 31 +++++ app/components/ui/textarea/index.ts | 1 + app/composables/useNavigation.ts | 2 +- app/registry/blocks/form-field/FormField.vue | 124 +++++++++++++++++++ app/registry/blocks/form-field/index.ts | 1 + app/registry/blocks/form/Form.vue | 100 +++++++++++++++ app/registry/blocks/form/form-types.ts | 31 +++++ app/registry/blocks/form/form-utils.ts | 121 ++++++++++++++++++ app/registry/blocks/form/index.ts | 3 + content.config.ts | 2 +- content/docs/2.components/18.form.md | 120 ++++++++++++++++++ content/docs/2.components/19.form-field.md | 90 ++++++++++++++ scripts/registry-verify.ts | 8 ++ 37 files changed, 1192 insertions(+), 3 deletions(-) create mode 100644 app/components/demo/FormDemo.vue create mode 100644 app/components/demo/FormFieldDemo.vue create mode 100644 app/components/ui/field/Field.vue create mode 100644 app/components/ui/field/FieldContent.vue create mode 100644 app/components/ui/field/FieldDescription.vue create mode 100644 app/components/ui/field/FieldError.vue create mode 100644 app/components/ui/field/FieldGroup.vue create mode 100644 app/components/ui/field/FieldLabel.vue create mode 100644 app/components/ui/field/FieldLegend.vue create mode 100644 app/components/ui/field/FieldSeparator.vue create mode 100644 app/components/ui/field/FieldSet.vue create mode 100644 app/components/ui/field/FieldTitle.vue create mode 100644 app/components/ui/field/index.ts create mode 100644 app/components/ui/select/Select.vue create mode 100644 app/components/ui/select/SelectContent.vue create mode 100644 app/components/ui/select/SelectGroup.vue create mode 100644 app/components/ui/select/SelectItem.vue create mode 100644 app/components/ui/select/SelectItemText.vue create mode 100644 app/components/ui/select/SelectLabel.vue create mode 100644 app/components/ui/select/SelectSeparator.vue create mode 100644 app/components/ui/select/SelectTrigger.vue create mode 100644 app/components/ui/select/SelectValue.vue create mode 100644 app/components/ui/select/index.ts create mode 100644 app/components/ui/textarea/Textarea.vue create mode 100644 app/components/ui/textarea/index.ts create mode 100644 app/registry/blocks/form-field/FormField.vue create mode 100644 app/registry/blocks/form-field/index.ts create mode 100644 app/registry/blocks/form/Form.vue create mode 100644 app/registry/blocks/form/form-types.ts create mode 100644 app/registry/blocks/form/form-utils.ts create mode 100644 app/registry/blocks/form/index.ts create mode 100644 content/docs/2.components/18.form.md create mode 100644 content/docs/2.components/19.form-field.md diff --git a/AGENTS.md b/AGENTS.md index 67f6860..c196138 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,7 +52,7 @@ Config: `registry.config.ts` and `components.json` `registries` field. ## Content -- `content.config.ts` defines the docs collection with `category` field: `element | content | marketing | chat | overview` +- `content.config.ts` defines the docs collection with `category` field: `form | content | marketing | chat | overview` - `@nuxt/content` v3 with D1 database (`content.database.type: "d1"`) - Markdown highlight disabled; `nuxt-shiki` module handles syntax highlighting instead diff --git a/app/components/demo/FormDemo.vue b/app/components/demo/FormDemo.vue new file mode 100644 index 0000000..17f8303 --- /dev/null +++ b/app/components/demo/FormDemo.vue @@ -0,0 +1,118 @@ + + +