File tree 5 files changed +514
-419
lines changed
5 files changed +514
-419
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ THX to [antfu / Vitesse Nuxt3](https://github.com/antfu/vitesse-nuxt3) for start
25
25
## Nuxt Modules (included in formkit-prinevue-nuxt)
26
26
27
27
- [ FormKit-PrimeVue-Nuxt] ( https://github.com/sfxcode/formkit-primevue-nuxt ) - FormKit PrimeVue Nuxt Module
28
- - [ PrimeVue-Nuxt] ( https://primevue.org/nuxt/ ) PrimeVue Nuxt Module
29
- - [ FormKit] ( https://formkit.com/ ) - Validation
30
- - [ I18n] ( https://v8.i18n.nuxtjs.org ) - Integration with [ Vue I18n] ( https://vue-i18n.intlify.dev/ )
28
+ - [ PrimeVue-Nuxt] ( https://primevue.org/nuxt/ ) PrimeVue UI Framework
29
+ - [ FormKit-Nuxt ] ( https://formkit.com/ ) - Form Handling
30
+ - [ I18n-Nuxt ] ( https://v8.i18n.nuxtjs.org ) - Integration with [ Vue I18n] ( https://vue-i18n.intlify.dev/ )
31
31
32
32
## Nuxt Modules (additional)
33
33
@@ -43,14 +43,15 @@ THX to [antfu / Vitesse Nuxt3](https://github.com/antfu/vitesse-nuxt3) for start
43
43
44
44
### FormKit PrimeVue Nuxt
45
45
46
+ Module options for FormKit PrimeVue Nuxt.
47
+ Below are the default values, if they fit your needs, you don't need to add them to your nuxt.config.ts.
48
+
46
49
``` typescript
47
- formkitPrimevue : {
48
- includePrimeIcons : true ,
50
+ formkitPrimevue : {
51
+ includePrimeIcons : true ,
49
52
includeStyles : true ,
50
- formkitAutoConfig : true ,
51
- formkitLocale : ' en' ,
52
- formkitPluginAnimate : true ,
53
- formkitPluginAsterisk : true ,
53
+ installFormKit : true ,
54
+ installI18N : true ,
54
55
},
55
56
```
56
57
Original file line number Diff line number Diff line change
1
+ // formkit.config.ts
2
+ import type { DefaultConfigOptions } from '@formkit/vue'
3
+ import { createAutoAnimatePlugin } from '@formkit/addons'
4
+ import { de , en } from '@formkit/i18n'
5
+ import { primeInputs , primeOutputs } from '@sfxcode/formkit-primevue'
6
+ import { addPrimeAsteriskPlugin } from '@sfxcode/formkit-primevue/plugins'
7
+
8
+ const config : DefaultConfigOptions = {
9
+ locales : { en, de } ,
10
+ // Define the active locale
11
+ locale : 'en' ,
12
+ inputs : { ...primeInputs , ...primeOutputs } ,
13
+
14
+ plugins : [
15
+ createAutoAnimatePlugin (
16
+ {
17
+ /* optional AutoAnimate config */
18
+ // default:
19
+ duration : 250 ,
20
+ easing : 'ease-in-out' ,
21
+ } ,
22
+ {
23
+ /* optional animation targets object */
24
+ // default:
25
+ global : [ 'outer' , 'inner' ] ,
26
+ form : [ 'form' ] ,
27
+ repeater : [ 'items' ] ,
28
+ } ,
29
+ ) ,
30
+ addPrimeAsteriskPlugin ,
31
+ ] ,
32
+ }
33
+
34
+ export default config
Original file line number Diff line number Diff line change @@ -20,18 +20,15 @@ export default defineNuxtConfig({
20
20
} ,
21
21
22
22
modules : [
23
- '@unocss/nuxt' ,
24
23
'@pinia/nuxt' ,
25
24
'@nuxt/content' ,
26
25
'@vueuse/nuxt' ,
27
26
'@nuxt/test-utils/module' ,
28
27
'@nuxt/image' ,
29
28
'@nuxt/fonts' ,
30
29
'@sfxcode/formkit-primevue-nuxt' ,
30
+ '@unocss/nuxt' ,
31
31
] ,
32
- formkit : {
33
- autoImport : true ,
34
- } ,
35
32
content : {
36
33
highlight : {
37
34
theme : 'one-dark-pro' ,
@@ -54,10 +51,8 @@ export default defineNuxtConfig({
54
51
formkitPrimevue : {
55
52
includePrimeIcons : true ,
56
53
includeStyles : true ,
57
- formkitAutoConfig : true ,
58
- formkitLocale : 'en' ,
59
- formkitPluginAnimate : true ,
60
- formkitPluginAsterisk : true ,
54
+ installFormKit : true ,
55
+ installI18N : true ,
61
56
} ,
62
57
primevue : {
63
58
autoImport : true ,
Original file line number Diff line number Diff line change 33
33
"@nuxt/test-utils" : " ^3.14.4" ,
34
34
"@pinia/nuxt" : " ^0.7.0" ,
35
35
"@primevue/themes" : " ^4.2.2" ,
36
- "@sfxcode/formkit-primevue-nuxt" : " ^1.1.7 " ,
36
+ "@sfxcode/formkit-primevue-nuxt" : " ^1.2.2 " ,
37
37
"@tiptap/extension-highlight" : " ^2.9.1" ,
38
38
"@tiptap/extension-text-align" : " ^2.9.1" ,
39
39
"@tiptap/extension-text-style" : " ^2.9.1" ,
55
55
"unstorage" : " ^1.13.1" ,
56
56
"vitest" : " ^2.1.5" ,
57
57
"vue-sidebar-menu" : " ^5.4.2"
58
+
58
59
},
59
60
"packageManager" : " pnpm@9.13.2+sha256.ccce81bf7498c5f0f80e31749c1f8f03baba99d168f64590fc7e13fad3ea1938"
60
61
}
You can’t perform that action at this time.
0 commit comments