From 83225d56bc482148a6de2195f0d65ea43bb96d3c Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Fri, 1 Nov 2024 06:02:14 +0000 Subject: [PATCH] Refactor on forms package --- packages/forms/package.json | 4 +- packages/forms/src/form/Form.d.ts | 4 +- .../forms/src/formfield/BaseFormField.vue | 2 +- packages/forms/src/formfield/FormField.d.ts | 187 +++++++----------- packages/forms/src/index.d.ts | 6 + packages/forms/src/index.js | 6 + packages/forms/src/resolvers/index.d.ts | 2 +- packages/forms/src/resolvers/index.js | 2 +- packages/forms/src/useform/index.js | 27 ++- 9 files changed, 104 insertions(+), 136 deletions(-) diff --git a/packages/forms/package.json b/packages/forms/package.json index 68472ab3a..b3c2008d1 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -53,10 +53,10 @@ }, "dependencies": { "@primeuix/utils": "catalog:", - "@primeuix/form": "catalog:", + "@primeuix/forms": "catalog:", "@primevue/core": "workspace:*" }, "engines": { "node": ">=12.11.0" } -} +} \ No newline at end of file diff --git a/packages/forms/src/form/Form.d.ts b/packages/forms/src/form/Form.d.ts index c59de23f9..b36e59754 100644 --- a/packages/forms/src/form/Form.d.ts +++ b/packages/forms/src/form/Form.d.ts @@ -251,9 +251,9 @@ export interface FormSlots { export interface FormEmitsOptions { /** * Emitted when the form is submitted. - * @param {Event} event - Original DOM event. + * @param {FormSubmitEvent} event - Custom submit event. */ - submit: (event: Event) => void; + submit: (event: FormSubmitEvent) => void; } export declare type FormEmits = EmitFn; diff --git a/packages/forms/src/formfield/BaseFormField.vue b/packages/forms/src/formfield/BaseFormField.vue index 02fa17c7e..2333bf6a8 100644 --- a/packages/forms/src/formfield/BaseFormField.vue +++ b/packages/forms/src/formfield/BaseFormField.vue @@ -1,6 +1,6 @@