@sfxcode/formkit-primevue 1.9.4 → 1.9.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 +1 -2
- package/dist/components/PrimeInputText.vue +17 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -3
- package/package.json +23 -20
package/README.md
CHANGED
|
@@ -27,7 +27,6 @@ import { primeInputs } from '@sfxcode/formkit-primevue'
|
|
|
27
27
|
|
|
28
28
|
[useFormKitSchema](https://github.com/sfxcode/formkit-primevue/blob/main/src/composables/useFormKitSchema.ts) provide functions to simplify the usage of elements, components, lists, ...
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
### Basic Styling
|
|
32
31
|
|
|
33
32
|
Basic styling is provided with the [formkit-primevue.scss](https://github.com/sfxcode/formkit-primevue/blob/main/src/sass/formkit-primevue.scss) file.
|
|
@@ -47,7 +46,7 @@ You can use it or take it as base for your own styling.
|
|
|
47
46
|
- PT and PTOptions are available ([https://primevue.org/passthrough/](https://primevue.org/passthrough/))
|
|
48
47
|
- [Styling](https://formkit-primevue.netlify.app/styling/base) and [PT](https://formkit-primevue.netlify.app/styling/passThrough) demo available
|
|
49
48
|
|
|
50
|
-
### Samples
|
|
49
|
+
### Samples
|
|
51
50
|
|
|
52
51
|
Some samples for common tasks are available
|
|
53
52
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { type PropType, computed } from 'vue'
|
|
3
3
|
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
4
4
|
import type { InputTextProps } from 'primevue/inputtext'
|
|
5
|
+
import type { IconFieldProps } from 'primevue/iconfield'
|
|
5
6
|
|
|
6
7
|
export interface FormKitPrimeInputTextProps {
|
|
7
8
|
pt?: InputTextProps['pt']
|
|
@@ -9,6 +10,7 @@ export interface FormKitPrimeInputTextProps {
|
|
|
9
10
|
unstyled?: InputTextProps['unstyled']
|
|
10
11
|
placeholder?: InputTextProps['placeholder']
|
|
11
12
|
icon?: string
|
|
13
|
+
iconPosition?: IconFieldProps['iconPosition']
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
const props = defineProps({
|
|
@@ -18,9 +20,20 @@ const props = defineProps({
|
|
|
18
20
|
},
|
|
19
21
|
})
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
const hasIcon = computed(() => {
|
|
24
|
+
if (props.context?.icon && props.context?.icon.length > 0)
|
|
25
|
+
return true
|
|
26
|
+
|
|
22
27
|
return props.context?.attrs?.icon && props.context?.attrs?.icon.length > 0
|
|
23
|
-
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const icon = computed(() => {
|
|
31
|
+
return props.context?.icon ?? props.context?.attrs?.icon
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const iconPosition = computed(() => {
|
|
35
|
+
return props.context?.attrs?.iconPosition ?? undefined
|
|
36
|
+
})
|
|
24
37
|
|
|
25
38
|
function handleBlur(e: Event) {
|
|
26
39
|
props.context?.handlers.blur(e)
|
|
@@ -35,9 +48,8 @@ const styleClass = computed(() => (props.context?.state.validationVisible && !pr
|
|
|
35
48
|
|
|
36
49
|
<template>
|
|
37
50
|
<div class="p-formkit">
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<InputIcon :class="context.attrs.icon" />
|
|
51
|
+
<IconField v-if="hasIcon" :icon-position="iconPosition">
|
|
52
|
+
<InputIcon :class="icon" />
|
|
41
53
|
<InputText
|
|
42
54
|
:id="context.id"
|
|
43
55
|
v-model="context._value"
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ const primeAutoCompleteDefinition = exports.primeAutoCompleteDefinition = (0, _v
|
|
|
51
51
|
props: ["pt", "ptOptions", "unstyled", "dropdown", "multiple"]
|
|
52
52
|
});
|
|
53
53
|
const primeInputTextDefinition = exports.primeInputTextDefinition = (0, _vue.createInput)(_PrimeInputText.default, {
|
|
54
|
-
props: ["
|
|
54
|
+
props: ["pt", "ptOptions", "unstyled", "placeholder", "icon"]
|
|
55
55
|
});
|
|
56
56
|
const primeInputNumberDefinition = exports.primeInputNumberDefinition = (0, _vue.createInput)(_PrimeInputNumber.default, {
|
|
57
57
|
props: ["useGrouping", "min", "max", "minFractionDigits", "maxFractionDigits", "locale", "mode", "currency", "prefix", "suffix", "showButtons", "buttonLayout", "step", "pt", "ptOptions", "unstyled", "placeholder"]
|
package/dist/index.mjs
CHANGED
|
@@ -38,12 +38,11 @@ export const primeAutoCompleteDefinition = createInput(PrimeAutoComplete, {
|
|
|
38
38
|
});
|
|
39
39
|
export const primeInputTextDefinition = createInput(PrimeInputText, {
|
|
40
40
|
props: [
|
|
41
|
-
"iconRight",
|
|
42
|
-
"iconLeft",
|
|
43
41
|
"pt",
|
|
44
42
|
"ptOptions",
|
|
45
43
|
"unstyled",
|
|
46
|
-
"placeholder"
|
|
44
|
+
"placeholder",
|
|
45
|
+
"icon"
|
|
47
46
|
]
|
|
48
47
|
});
|
|
49
48
|
export const primeInputNumberDefinition = createInput(PrimeInputNumber, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfxcode/formkit-primevue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.6",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Tom",
|
|
7
7
|
"email": "tom@sfxcode.com"
|
|
@@ -56,6 +56,19 @@
|
|
|
56
56
|
"components.d.ts",
|
|
57
57
|
"dist"
|
|
58
58
|
],
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "unbuild",
|
|
61
|
+
"dev": "vite serve dev",
|
|
62
|
+
"dev:build": "vite build dev",
|
|
63
|
+
"dev:preview": "vite preview dev",
|
|
64
|
+
"release": "npm run lint && npm run build && changelogen --release && npm publish --access public && git push --follow-tags",
|
|
65
|
+
"lint": "eslint .",
|
|
66
|
+
"lint:fix": "eslint . --fix",
|
|
67
|
+
"prepublishOnly": "pnpm build",
|
|
68
|
+
"docs:dev": "vitepress dev docs",
|
|
69
|
+
"docs:build": "vitepress build docs",
|
|
70
|
+
"docs:serve": "vitepress serve docs"
|
|
71
|
+
},
|
|
59
72
|
"peerDependencies": {
|
|
60
73
|
"vue": "^3.4.0"
|
|
61
74
|
},
|
|
@@ -64,34 +77,35 @@
|
|
|
64
77
|
"@formkit/i18n": "^1.6.0",
|
|
65
78
|
"@formkit/vue": "^1.6.0",
|
|
66
79
|
"primeicons": "^6.0.1",
|
|
67
|
-
"primevue": "^3.
|
|
80
|
+
"primevue": "^3.50.0"
|
|
68
81
|
},
|
|
69
82
|
"devDependencies": {
|
|
70
|
-
"@antfu/eslint-config": "2.8.
|
|
83
|
+
"@antfu/eslint-config": "2.8.3",
|
|
71
84
|
"@formkit/core": "^1.6.0",
|
|
72
|
-
"@types/node": "^20.11.
|
|
73
|
-
"@unocss/preset-icons": "^0.58.
|
|
74
|
-
"@unocss/preset-uno": "0.58.
|
|
85
|
+
"@types/node": "^20.11.28",
|
|
86
|
+
"@unocss/preset-icons": "^0.58.6",
|
|
87
|
+
"@unocss/preset-uno": "0.58.6",
|
|
75
88
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
76
89
|
"@vue/compiler-sfc": "^3.4.21",
|
|
77
90
|
"@vue/server-renderer": "^3.4.21",
|
|
78
|
-
"@vue/test-utils": "^2.4.
|
|
91
|
+
"@vue/test-utils": "^2.4.5",
|
|
79
92
|
"@vue/tsconfig": "^0.5.1",
|
|
80
93
|
"@vuedx/typecheck": "~0.7.6",
|
|
81
94
|
"@vuedx/typescript-plugin-vue": "~0.7.6",
|
|
82
95
|
"@vueuse/core": "^10.9.0",
|
|
83
96
|
"@vueuse/head": "^2.0.0",
|
|
97
|
+
"changelogen": "^0.5.5",
|
|
84
98
|
"chart.js": "^4.4.2",
|
|
85
99
|
"consola": "^3.2.3",
|
|
86
100
|
"eslint": "^8.57.0",
|
|
87
101
|
"json-editor-vue": "^0.12.0",
|
|
88
102
|
"mkdist": "^1.4.0",
|
|
89
103
|
"quill": "^1.3.7",
|
|
90
|
-
"sass": "^1.
|
|
104
|
+
"sass": "^1.72.0",
|
|
91
105
|
"tslib": "^2.6.2",
|
|
92
106
|
"typescript": "^5.4.2",
|
|
93
107
|
"unbuild": "2.0.0",
|
|
94
|
-
"unocss": "^0.58.
|
|
108
|
+
"unocss": "^0.58.6",
|
|
95
109
|
"unplugin-auto-import": "^0.17.5",
|
|
96
110
|
"unplugin-vue-components": "^0.26.0",
|
|
97
111
|
"vanilla-jsoneditor": "^0.23.0",
|
|
@@ -105,16 +119,5 @@
|
|
|
105
119
|
"vue-demi": "^0.14.7",
|
|
106
120
|
"vue-router": "^4.3.0",
|
|
107
121
|
"vue-tsc": "^2.0.6"
|
|
108
|
-
},
|
|
109
|
-
"scripts": {
|
|
110
|
-
"build": "unbuild",
|
|
111
|
-
"dev": "vite serve dev",
|
|
112
|
-
"dev:build": "vite build dev",
|
|
113
|
-
"dev:preview": "vite preview dev",
|
|
114
|
-
"lint": "eslint .",
|
|
115
|
-
"lint:fix": "eslint . --fix",
|
|
116
|
-
"docs:dev": "vitepress dev docs",
|
|
117
|
-
"docs:build": "vitepress build docs",
|
|
118
|
-
"docs:serve": "vitepress serve docs"
|
|
119
122
|
}
|
|
120
123
|
}
|