@sfxcode/formkit-primevue 2.0.3 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Formkit - Primevue
2
2
 
3
- Helper classes for using [Formkit](https://formkit.com/) with the [PrimeVue UI Framework](https://www.primefaces.org/primevue/#/)
3
+ PrimeVue based formkit inputs for using [FormKit](https://formkit.com/) with the [PrimeVue UI Framework](https://www.primefaces.org/primevue/#/).
4
+
5
+ Main focus of this project is to provide configuration based forms with validation.
6
+
7
+ ## PrimeVue Versions
8
+
9
+ Actual PrimeVue Version in the main branch is *4.x.*
10
+
11
+ PrimeVue 3 is in the prime3 branch.
4
12
 
5
13
  ## Docs
6
14
 
@@ -10,6 +18,11 @@ Helper classes for using [Formkit](https://formkit.com/) with the [PrimeVue UI F
10
18
 
11
19
  ## Usage
12
20
 
21
+ ### Configuration
22
+
23
+ Add *formkit.config.ts*
24
+
25
+
13
26
  ```typescript
14
27
  import { defaultConfig, plugin } from '@formkit/vue'
15
28
  import { primeInputs } from '@sfxcode/formkit-primevue'
@@ -22,6 +35,32 @@ app.use(plugin, defaultConfig({
22
35
  }))
23
36
  ```
24
37
 
38
+ ### Nuxt
39
+
40
+ Important: use *autoimport: false* if using primevue formkit validation and include or
41
+ exclude not needed components as usual.
42
+
43
+ Autoimport true prevents elements lookup correctly.
44
+
45
+ Example:
46
+ ```typescript
47
+ primevue: {
48
+ autoImport: false,
49
+ components: {
50
+ exclude: ['Chart', 'Editor'],
51
+ },
52
+ options: {
53
+ theme: {
54
+ preset: Aura,
55
+ options: {
56
+ darkModeSelector: '.dark',
57
+ },
58
+ },
59
+ ripple: true,
60
+ },
61
+ },
62
+ ```
63
+
25
64
  ## Limitations
26
65
 
27
66
  Prefixing of the PrimeVue component names is not supported.
@@ -51,10 +51,11 @@ const styleClass = computed(() => (props.context?.state.validationVisible && !pr
51
51
  :suggestions="suggestions"
52
52
  :dropdown="context?.dropdown ?? false"
53
53
  :multiple="context?.multiple ?? false"
54
- :typeahead="context?.typeahead ?? true"
54
+ :typeahead="context?.attrs.typeahead ?? true"
55
55
  :pt="context?.pt"
56
56
  :pt-options="context?.ptOptions"
57
57
  :unstyled="context?.unstyled ?? false"
58
+ @keydown.enter.prevent
58
59
  @complete="search"
59
60
  @change="handleInput"
60
61
  @blur="handleBlur"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-primevue",
3
3
  "type": "module",
4
- "version": "2.0.3",
4
+ "version": "2.0.6",
5
5
  "packageManager": "pnpm@9.4.0+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74",
6
6
  "author": {
7
7
  "name": "Tom",
@@ -68,7 +68,7 @@
68
68
  "dev:build": "vite build dev",
69
69
  "dev:preview": "vite preview dev",
70
70
  "release": "npm run lint && npm run build && changelogen --release && npm publish --access public && git push --follow-tags",
71
- "lint": "eslint .",
71
+ "lint": "eslint ./src",
72
72
  "lint:fix": "eslint . --fix",
73
73
  "prepublishOnly": "pnpm build",
74
74
  "docs:dev": "vitepress dev docs",
@@ -86,12 +86,12 @@
86
86
  "@formkit/i18n": "^1.6.5",
87
87
  "@formkit/vue": "^1.6.5",
88
88
  "primeicons": "^7.0.0",
89
- "primevue": "4.0.0-rc.3"
89
+ "primevue": "4.0.0"
90
90
  },
91
91
  "devDependencies": {
92
- "@antfu/eslint-config": "2.21.1",
92
+ "@antfu/eslint-config": "2.21.2",
93
93
  "@formkit/core": "^1.6.5",
94
- "@primevue/themes": "4.0.0-rc.2",
94
+ "@primevue/themes": "4.0.0",
95
95
  "@types/node": "^20.14.9",
96
96
  "@unocss/preset-icons": "0.61.0",
97
97
  "@unocss/preset-uno": "0.61.0",
@@ -116,13 +116,13 @@
116
116
  "quill": "^2.0.2",
117
117
  "sass": "^1.77.6",
118
118
  "tslib": "^2.6.3",
119
- "typescript": "^5.5.2",
119
+ "typescript": "^5.5.3",
120
120
  "unbuild": "2.0.0",
121
121
  "unocss": "0.61.0",
122
122
  "unplugin-auto-import": "^0.17.6",
123
123
  "unplugin-vue-components": "^0.27.2",
124
124
  "vanilla-jsoneditor": "^0.23.7",
125
- "vite": "^5.3.2",
125
+ "vite": "^5.3.3",
126
126
  "vite-plugin-dts": "^3.9.1",
127
127
  "vite-plugin-eslint": "^1.8.1",
128
128
  "vite-plugin-pages": "^0.32.3",
@@ -132,6 +132,6 @@
132
132
  "vue": "^3.4.31",
133
133
  "vue-demi": "^0.14.8",
134
134
  "vue-router": "^4.4.0",
135
- "vue-tsc": "^2.0.22"
135
+ "vue-tsc": "^2.0.26"
136
136
  }
137
137
  }