@sfxcode/formkit-primevue 2.4.9 → 2.4.11
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 +6 -0
- package/dist/components/PrimeAutoComplete.vue +2 -2
- package/dist/components/PrimeCascadeSelect.vue +2 -2
- package/dist/components/PrimeCheckbox.vue +2 -2
- package/dist/components/PrimeColorPicker.vue +2 -2
- package/dist/components/PrimeDatePicker.vue +2 -2
- package/dist/components/PrimeEditor.vue +2 -2
- package/dist/components/PrimeInputMask.vue +2 -2
- package/dist/components/PrimeInputNumber.vue +2 -2
- package/dist/components/PrimeInputOtp.vue +2 -2
- package/dist/components/PrimeInputText.vue +2 -2
- package/dist/components/PrimeKnob.vue +2 -2
- package/dist/components/PrimeListbox.vue +2 -2
- package/dist/components/PrimeMultiSelect.vue +2 -2
- package/dist/components/PrimePassword.vue +2 -2
- package/dist/components/PrimeRadioButton.vue +2 -2
- package/dist/components/PrimeRating.vue +2 -2
- package/dist/components/PrimeSelect.vue +2 -2
- package/dist/components/PrimeSelectButton.vue +2 -2
- package/dist/components/PrimeSlider.vue +2 -2
- package/dist/components/PrimeTextarea.vue +2 -2
- package/dist/components/PrimeToggleButton.vue +2 -2
- package/dist/components/PrimeToggleSwitch.vue +2 -2
- package/dist/components/PrimeTreeSelect.vue +2 -2
- package/dist/composables/useFormKitInput.d.ts +1 -0
- package/dist/composables/useFormKitInput.js +13 -0
- package/dist/composables/useFormKitInput.mjs +14 -1
- package/package.json +21 -21
package/README.md
CHANGED
|
@@ -12,6 +12,12 @@ Actual PrimeVue Version of the main branch is *4.x.*
|
|
|
12
12
|
|
|
13
13
|
PrimeVue 3 is in the prime3 branch, but future development will only focus on PrimeVue 4
|
|
14
14
|
|
|
15
|
+
## Build
|
|
16
|
+
|
|
17
|
+
[](https://github.com/sfxcode/formkit-primevue/actions/workflows/deploy.yml)
|
|
18
|
+
|
|
19
|
+
[](https://app.netlify.com/sites/formkit-primevue/deploys)
|
|
20
|
+
|
|
15
21
|
## Docs
|
|
16
22
|
|
|
17
23
|
[Docs](https://sfxcode.github.io/formkit-primevue/)
|
|
@@ -21,7 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
},
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
24
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
25
25
|
|
|
26
26
|
const suggestions = ref([])
|
|
27
27
|
|
|
@@ -48,7 +48,7 @@ function search(event: AutoCompleteCompleteEvent) {
|
|
|
48
48
|
:typeahead="context?.typeahead ?? true"
|
|
49
49
|
:pt="context?.pt"
|
|
50
50
|
:pt-options="context?.ptOptions"
|
|
51
|
-
:unstyled="
|
|
51
|
+
:unstyled="unstyled"
|
|
52
52
|
@keydown.enter.prevent
|
|
53
53
|
@complete="search"
|
|
54
54
|
@change="handleInput"
|
|
@@ -25,7 +25,7 @@ const props = defineProps({
|
|
|
25
25
|
},
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
28
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
<template>
|
|
@@ -49,7 +49,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
49
49
|
:placeholder="context.placeholder"
|
|
50
50
|
:pt="context.pt"
|
|
51
51
|
:pt-options="context.ptOptions"
|
|
52
|
-
:unstyled="
|
|
52
|
+
:unstyled="unstyled"
|
|
53
53
|
@change="handleInput"
|
|
54
54
|
@blur="handleBlur"
|
|
55
55
|
/>
|
|
@@ -25,7 +25,7 @@ const props = defineProps({
|
|
|
25
25
|
|
|
26
26
|
const { hasPrefix, hasSuffix, generateId } = useFormKitSection(props.context)
|
|
27
27
|
|
|
28
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
28
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
29
29
|
|
|
30
30
|
const generatedId = generateId()
|
|
31
31
|
</script>
|
|
@@ -54,7 +54,7 @@ const generatedId = generateId()
|
|
|
54
54
|
:false-value="context.falseValue ?? undefined"
|
|
55
55
|
:pt="context.pt"
|
|
56
56
|
:pt-options="context.ptOptions"
|
|
57
|
-
:unstyled="
|
|
57
|
+
:unstyled="unstyled"
|
|
58
58
|
@change="handleInput"
|
|
59
59
|
@blur="handleBlur"
|
|
60
60
|
/>
|
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
},
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const { handleChange } = useFormKitInput(props.context)
|
|
25
|
+
const { unstyled, handleChange } = useFormKitInput(props.context)
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
@@ -42,7 +42,7 @@ const { handleChange } = useFormKitInput(props.context)
|
|
|
42
42
|
:format="context.format"
|
|
43
43
|
:pt="context.pt"
|
|
44
44
|
:pt-options="context.ptOptions"
|
|
45
|
-
:unstyled="
|
|
45
|
+
:unstyled="unstyled"
|
|
46
46
|
@change="handleChange"
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
@@ -59,7 +59,7 @@ const props = defineProps({
|
|
|
59
59
|
},
|
|
60
60
|
})
|
|
61
61
|
|
|
62
|
-
const { isInvalid, handleInput, handleSelect } = useFormKitInput(props.context)
|
|
62
|
+
const { unstyled, isInvalid, handleInput, handleSelect } = useFormKitInput(props.context)
|
|
63
63
|
|
|
64
64
|
function handleBlur(e: DatePickerBlurEvent) {
|
|
65
65
|
props.context?.handlers.blur(e.originalEvent)
|
|
@@ -127,7 +127,7 @@ function handleClearClick() {
|
|
|
127
127
|
:panel-class="context?.panelClass"
|
|
128
128
|
:pt="context?.pt"
|
|
129
129
|
:pt-options="context?.ptOptions"
|
|
130
|
-
:unstyled="
|
|
130
|
+
:unstyled="unstyled"
|
|
131
131
|
@date-select="handleSelect"
|
|
132
132
|
@input="handleInput"
|
|
133
133
|
@blur="handleBlur"
|
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
},
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const { isInvalid, handleInput } = useFormKitInput(props.context)
|
|
25
|
+
const { unstyled, isInvalid, handleInput } = useFormKitInput(props.context)
|
|
26
26
|
|
|
27
27
|
function handleSelection(e: EditorSelectionChangeEvent) {
|
|
28
28
|
if (e.range === null)
|
|
@@ -49,7 +49,7 @@ function handleSelection(e: EditorSelectionChangeEvent) {
|
|
|
49
49
|
:modules="context.modules"
|
|
50
50
|
:pt="context.pt"
|
|
51
51
|
:pt-options="context.ptOptions"
|
|
52
|
-
:unstyled="
|
|
52
|
+
:unstyled="unstyled"
|
|
53
53
|
@text-change="handleInput"
|
|
54
54
|
@selection-change="handleSelection"
|
|
55
55
|
/>
|
|
@@ -26,7 +26,7 @@ const props = defineProps({
|
|
|
26
26
|
},
|
|
27
27
|
})
|
|
28
28
|
|
|
29
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
29
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
30
30
|
const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
|
|
31
31
|
</script>
|
|
32
32
|
|
|
@@ -52,7 +52,7 @@ const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
|
|
|
52
52
|
:pt="context.pt"
|
|
53
53
|
:variant="context.variant"
|
|
54
54
|
:pt-options="context.ptOptions"
|
|
55
|
-
:unstyled="
|
|
55
|
+
:unstyled="unstyled"
|
|
56
56
|
@input="handleInput"
|
|
57
57
|
@blur="handleBlur"
|
|
58
58
|
/>
|
|
@@ -33,7 +33,7 @@ const props = defineProps({
|
|
|
33
33
|
},
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
const { isInvalid, handleInput } = useFormKitInput(props.context)
|
|
36
|
+
const { unstyled, isInvalid, handleInput } = useFormKitInput(props.context)
|
|
37
37
|
|
|
38
38
|
function handleBlur(e: InputNumberBlurEvent) {
|
|
39
39
|
props.context?.handlers.blur(e.originalEvent)
|
|
@@ -70,7 +70,7 @@ function handleBlur(e: InputNumberBlurEvent) {
|
|
|
70
70
|
:step="context.step ?? undefined"
|
|
71
71
|
:pt="context.pt"
|
|
72
72
|
:pt-options="context.ptOptions"
|
|
73
|
-
:unstyled="
|
|
73
|
+
:unstyled="unstyled"
|
|
74
74
|
@input="handleInput"
|
|
75
75
|
@blur="handleBlur"
|
|
76
76
|
/>
|
|
@@ -23,7 +23,7 @@ const props = defineProps({
|
|
|
23
23
|
},
|
|
24
24
|
})
|
|
25
25
|
|
|
26
|
-
const { isInvalid, handleBlur, handleInput } = useFormKitInput(props.context)
|
|
26
|
+
const { unstyled, isInvalid, handleBlur, handleInput } = useFormKitInput(props.context)
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
@@ -46,7 +46,7 @@ const { isInvalid, handleBlur, handleInput } = useFormKitInput(props.context)
|
|
|
46
46
|
:integer-only="context.integerOnly"
|
|
47
47
|
:pt="context.pt"
|
|
48
48
|
:pt-options="context.ptOptions"
|
|
49
|
-
:unstyled="
|
|
49
|
+
:unstyled="unstyled"
|
|
50
50
|
@change="handleInput"
|
|
51
51
|
@blur="handleBlur"
|
|
52
52
|
/>
|
|
@@ -21,7 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
},
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
24
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
25
25
|
const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
|
|
26
26
|
</script>
|
|
27
27
|
|
|
@@ -44,7 +44,7 @@ const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
|
|
|
44
44
|
:placeholder="context.placeholder"
|
|
45
45
|
:pt="context.pt"
|
|
46
46
|
:pt-options="context.ptOptions"
|
|
47
|
-
:unstyled="
|
|
47
|
+
:unstyled="unstyled"
|
|
48
48
|
@input="handleInput"
|
|
49
49
|
@blur="handleBlur"
|
|
50
50
|
/>
|
|
@@ -29,7 +29,7 @@ const props = defineProps({
|
|
|
29
29
|
},
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
const { isInvalid } = useFormKitInput(props.context)
|
|
32
|
+
const { unstyled, isInvalid } = useFormKitInput(props.context)
|
|
33
33
|
|
|
34
34
|
function handleInput(e: any) {
|
|
35
35
|
props.context?.node.input(e)
|
|
@@ -67,7 +67,7 @@ function updateValue(n: number) {
|
|
|
67
67
|
:value-template="context.valueTemplate ?? undefined"
|
|
68
68
|
:pt="context.pt"
|
|
69
69
|
:pt-options="context.ptOptions"
|
|
70
|
-
:unstyled="
|
|
70
|
+
:unstyled="unstyled"
|
|
71
71
|
@change="handleInput"
|
|
72
72
|
@update:model-value="updateValue"
|
|
73
73
|
/>
|
|
@@ -30,7 +30,7 @@ const props = defineProps({
|
|
|
30
30
|
},
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
33
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<template>
|
|
@@ -60,7 +60,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
60
60
|
:select-on-focus="context.selectOnFocus ?? false"
|
|
61
61
|
:pt="context.pt"
|
|
62
62
|
:pt-options="context.ptOptions"
|
|
63
|
-
:unstyled="
|
|
63
|
+
:unstyled="unstyled"
|
|
64
64
|
@change="handleInput"
|
|
65
65
|
@blur="handleBlur"
|
|
66
66
|
/>
|
|
@@ -51,7 +51,7 @@ const props = defineProps({
|
|
|
51
51
|
},
|
|
52
52
|
})
|
|
53
53
|
|
|
54
|
-
const { isInvalid, handleBlur, handleChange } = useFormKitInput(props.context)
|
|
54
|
+
const { unstyled, isInvalid, handleBlur, handleChange } = useFormKitInput(props.context)
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
57
|
<template>
|
|
@@ -102,7 +102,7 @@ const { isInvalid, handleBlur, handleChange } = useFormKitInput(props.context)
|
|
|
102
102
|
:empty-message="context.emptyMessage"
|
|
103
103
|
:pt="context.pt"
|
|
104
104
|
:pt-options="context.ptOptions"
|
|
105
|
-
:unstyled="
|
|
105
|
+
:unstyled="unstyled"
|
|
106
106
|
@change="handleChange"
|
|
107
107
|
@blur="handleBlur"
|
|
108
108
|
/>
|
|
@@ -30,7 +30,7 @@ const props = defineProps({
|
|
|
30
30
|
},
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
33
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<template>
|
|
@@ -60,7 +60,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
60
60
|
:toggle-mask="context.toggleMask ?? false"
|
|
61
61
|
:pt="context.pt"
|
|
62
62
|
:pt-options="context.ptOptions"
|
|
63
|
-
:unstyled="
|
|
63
|
+
:unstyled="unstyled"
|
|
64
64
|
@input="handleInput"
|
|
65
65
|
@blur="handleBlur"
|
|
66
66
|
/>
|
|
@@ -21,7 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
},
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
24
|
+
const { unstyled, isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
@@ -40,7 +40,7 @@ const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
|
40
40
|
:invalid="isInvalid"
|
|
41
41
|
:pt="context.pt"
|
|
42
42
|
:pt-options="context.ptOptions"
|
|
43
|
-
:unstyled="
|
|
43
|
+
:unstyled="unstyled"
|
|
44
44
|
@click="handleChange"
|
|
45
45
|
@change="handleChange"
|
|
46
46
|
@blur="handleBlur"
|
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
},
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
25
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
@@ -44,7 +44,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
44
44
|
:off-icon="context.offIcon ?? 'pi pi-star'"
|
|
45
45
|
:pt="context.pt"
|
|
46
46
|
:pt-options="context.ptOptions"
|
|
47
|
-
:unstyled="
|
|
47
|
+
:unstyled="unstyled"
|
|
48
48
|
@change="handleInput"
|
|
49
49
|
@blur="handleBlur"
|
|
50
50
|
/>
|
|
@@ -47,7 +47,7 @@ const props = defineProps({
|
|
|
47
47
|
},
|
|
48
48
|
})
|
|
49
49
|
|
|
50
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
50
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<template>
|
|
@@ -99,7 +99,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
99
99
|
:empty-message="context.emptyMessage"
|
|
100
100
|
:pt="context.pt"
|
|
101
101
|
:pt-options="context.ptOptions"
|
|
102
|
-
:unstyled="
|
|
102
|
+
:unstyled="unstyled"
|
|
103
103
|
@change="handleInput"
|
|
104
104
|
@blur="handleBlur"
|
|
105
105
|
/>
|
|
@@ -25,7 +25,7 @@ const props = defineProps({
|
|
|
25
25
|
},
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
-
const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
28
|
+
const { unstyled, isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
<template>
|
|
@@ -50,7 +50,7 @@ const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
|
50
50
|
:data-key="context.dataKey"
|
|
51
51
|
:pt="context.pt"
|
|
52
52
|
:pt-options="context.ptOptions"
|
|
53
|
-
:unstyled="
|
|
53
|
+
:unstyled="unstyled"
|
|
54
54
|
@change="handleChange"
|
|
55
55
|
@blur="handleBlur"
|
|
56
56
|
/>
|
|
@@ -24,7 +24,7 @@ const props = defineProps({
|
|
|
24
24
|
},
|
|
25
25
|
})
|
|
26
26
|
|
|
27
|
-
const { isInvalid, handleBlur } = useFormKitInput(props.context)
|
|
27
|
+
const { unstyled, isInvalid, handleBlur } = useFormKitInput(props.context)
|
|
28
28
|
|
|
29
29
|
function handleInput(e: any) {
|
|
30
30
|
props.context?.node.input(e)
|
|
@@ -53,7 +53,7 @@ function handleInput(e: any) {
|
|
|
53
53
|
:orientation="context.orientation ?? 'horizontal'"
|
|
54
54
|
:pt="context.pt"
|
|
55
55
|
:pt-options="context.ptOptions"
|
|
56
|
-
:unstyled="
|
|
56
|
+
:unstyled="unstyled"
|
|
57
57
|
@change="handleInput"
|
|
58
58
|
@blur="handleBlur"
|
|
59
59
|
/>
|
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
},
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
25
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
@@ -44,7 +44,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
44
44
|
:auto-resize="context.autoResize ?? false"
|
|
45
45
|
:pt="context.pt"
|
|
46
46
|
:pt-options="context.ptOptions"
|
|
47
|
-
:unstyled="
|
|
47
|
+
:unstyled="unstyled"
|
|
48
48
|
@input="handleInput"
|
|
49
49
|
@blur="handleBlur"
|
|
50
50
|
/>
|
|
@@ -24,7 +24,7 @@ const props = defineProps({
|
|
|
24
24
|
},
|
|
25
25
|
})
|
|
26
26
|
|
|
27
|
-
const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
27
|
+
const { unstyled, isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<template>
|
|
@@ -48,7 +48,7 @@ const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
|
48
48
|
:icon-pos="context.iconPos ?? 'left'"
|
|
49
49
|
:pt="context.pt"
|
|
50
50
|
:pt-options="context.ptOptions"
|
|
51
|
-
:unstyled="
|
|
51
|
+
:unstyled="unstyled"
|
|
52
52
|
@change="handleChange"
|
|
53
53
|
@blur="handleBlur"
|
|
54
54
|
/>
|
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
|
|
23
23
|
const { hasPrefix, hasSuffix } = useFormKitSection(props.context)
|
|
24
24
|
|
|
25
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
25
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
@@ -46,7 +46,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
46
46
|
:false-value="context.falseValue ?? undefined"
|
|
47
47
|
:pt="context.pt"
|
|
48
48
|
:pt-options="context.ptOptions"
|
|
49
|
-
:unstyled="
|
|
49
|
+
:unstyled="unstyled"
|
|
50
50
|
@change="handleInput"
|
|
51
51
|
@blur="handleBlur"
|
|
52
52
|
/>
|
|
@@ -29,7 +29,7 @@ const props = defineProps({
|
|
|
29
29
|
},
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
32
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
@@ -58,7 +58,7 @@ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
|
58
58
|
:panel-class="context.panelClass"
|
|
59
59
|
:variant="context.variant"
|
|
60
60
|
:pt-options="context.ptOptions"
|
|
61
|
-
:unstyled="
|
|
61
|
+
:unstyled="unstyled"
|
|
62
62
|
@change="handleInput"
|
|
63
63
|
@blur="handleBlur"
|
|
64
64
|
/>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function useFormKitInput(context: any): {
|
|
2
2
|
isInvalid: import("vue").ComputedRef<any>;
|
|
3
3
|
styleClass: import("vue").ComputedRef<any>;
|
|
4
|
+
unstyled: import("vue").ComputedRef<any>;
|
|
4
5
|
handleBlur: (event: Event) => void;
|
|
5
6
|
handleChange: (_: any) => void;
|
|
6
7
|
handleInput: (_: any) => void;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useFormKitInput = useFormKitInput;
|
|
7
|
+
var _config = require("primevue/config");
|
|
7
8
|
var _vue = require("vue");
|
|
8
9
|
function useFormKitInput(context) {
|
|
9
10
|
const isInvalid = (0, _vue.computed)(() => {
|
|
@@ -12,6 +13,17 @@ function useFormKitInput(context) {
|
|
|
12
13
|
const styleClass = (0, _vue.computed)(() => {
|
|
13
14
|
return context?.state.validationVisible && !context?.state.valid ? `${context?.attrs?.class} p-invalid` : context?.attrs?.class;
|
|
14
15
|
});
|
|
16
|
+
function isGlobalUnstyledMode() {
|
|
17
|
+
let result = false;
|
|
18
|
+
try {
|
|
19
|
+
const primevue = (0, _config.usePrimeVue)();
|
|
20
|
+
result = primevue?.config?.unstyled || false;
|
|
21
|
+
} catch (e) {}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
const unstyled = (0, _vue.computed)(() => {
|
|
25
|
+
return context?.unstyled ?? isGlobalUnstyledMode();
|
|
26
|
+
});
|
|
15
27
|
function handleBlur(event) {
|
|
16
28
|
context?.handlers.blur(event);
|
|
17
29
|
}
|
|
@@ -27,6 +39,7 @@ function useFormKitInput(context) {
|
|
|
27
39
|
return {
|
|
28
40
|
isInvalid,
|
|
29
41
|
styleClass,
|
|
42
|
+
unstyled,
|
|
30
43
|
handleBlur,
|
|
31
44
|
handleChange,
|
|
32
45
|
handleInput,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { usePrimeVue } from "primevue/config";
|
|
1
2
|
import { computed } from "vue";
|
|
2
3
|
export function useFormKitInput(context) {
|
|
3
4
|
const isInvalid = computed(() => {
|
|
@@ -6,6 +7,18 @@ export function useFormKitInput(context) {
|
|
|
6
7
|
const styleClass = computed(() => {
|
|
7
8
|
return context?.state.validationVisible && !context?.state.valid ? `${context?.attrs?.class} p-invalid` : context?.attrs?.class;
|
|
8
9
|
});
|
|
10
|
+
function isGlobalUnstyledMode() {
|
|
11
|
+
let result = false;
|
|
12
|
+
try {
|
|
13
|
+
const primevue = usePrimeVue();
|
|
14
|
+
result = primevue?.config?.unstyled || false;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
const unstyled = computed(() => {
|
|
20
|
+
return context?.unstyled ?? isGlobalUnstyledMode();
|
|
21
|
+
});
|
|
9
22
|
function handleBlur(event) {
|
|
10
23
|
context?.handlers.blur(event);
|
|
11
24
|
}
|
|
@@ -18,5 +31,5 @@ export function useFormKitInput(context) {
|
|
|
18
31
|
function handleSelect(e) {
|
|
19
32
|
context?.node.input(e);
|
|
20
33
|
}
|
|
21
|
-
return { isInvalid, styleClass, handleBlur, handleChange, handleInput, handleSelect };
|
|
34
|
+
return { isInvalid, styleClass, unstyled, handleBlur, handleChange, handleInput, handleSelect };
|
|
22
35
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfxcode/formkit-primevue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.11",
|
|
5
5
|
"packageManager": "pnpm@9.9.0+sha256.7a4261e50d9a44d9240baf6c9d6e10089dcf0a79d0007f2a26985a6927324177",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Tom",
|
|
@@ -87,32 +87,32 @@
|
|
|
87
87
|
"vue": "^3.4.0"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@formkit/addons": "^1.6.
|
|
90
|
+
"@formkit/addons": "^1.6.7",
|
|
91
91
|
"@formkit/drag-and-drop": "^0.1.6",
|
|
92
|
-
"@formkit/i18n": "^1.6.
|
|
93
|
-
"@formkit/vue": "^1.6.
|
|
92
|
+
"@formkit/i18n": "^1.6.7",
|
|
93
|
+
"@formkit/vue": "^1.6.7",
|
|
94
94
|
"primeicons": "^7.0.0",
|
|
95
95
|
"primevue": "4.0.7",
|
|
96
96
|
"uuid": "^10.0.0",
|
|
97
97
|
"vue-i18n": "9.14.0"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@antfu/eslint-config": "3.6.
|
|
101
|
-
"@formkit/core": "^1.6.
|
|
100
|
+
"@antfu/eslint-config": "3.6.2",
|
|
101
|
+
"@formkit/core": "^1.6.7",
|
|
102
102
|
"@primevue/themes": "4.0.7",
|
|
103
|
-
"@types/node": "^22.5.
|
|
104
|
-
"@unocss/preset-icons": "0.62.
|
|
105
|
-
"@unocss/preset-uno": "0.62.
|
|
106
|
-
"@vitejs/plugin-vue": "^5.1.
|
|
107
|
-
"@vitest/coverage-v8": "^2.1.
|
|
108
|
-
"@vitest/ui": "^2.1.
|
|
109
|
-
"@vue/compiler-sfc": "3.5.
|
|
110
|
-
"@vue/server-renderer": "^3.5.
|
|
103
|
+
"@types/node": "^22.5.5",
|
|
104
|
+
"@unocss/preset-icons": "0.62.4",
|
|
105
|
+
"@unocss/preset-uno": "0.62.4",
|
|
106
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
107
|
+
"@vitest/coverage-v8": "^2.1.1",
|
|
108
|
+
"@vitest/ui": "^2.1.1",
|
|
109
|
+
"@vue/compiler-sfc": "3.5.6",
|
|
110
|
+
"@vue/server-renderer": "^3.5.6",
|
|
111
111
|
"@vue/test-utils": "^2.4.6",
|
|
112
112
|
"@vue/tsconfig": "^0.5.1",
|
|
113
113
|
"@vuedx/typecheck": "~0.7.6",
|
|
114
114
|
"@vuedx/typescript-plugin-vue": "~0.7.6",
|
|
115
|
-
"@vueuse/core": "^11.0
|
|
115
|
+
"@vueuse/core": "^11.1.0",
|
|
116
116
|
"@vueuse/head": "^2.0.0",
|
|
117
117
|
"changelogen": "^0.5.5",
|
|
118
118
|
"chart.js": "^4.4.4",
|
|
@@ -122,24 +122,24 @@
|
|
|
122
122
|
"json-editor-vue": "^0.16.0",
|
|
123
123
|
"mkdist": "^1.5.9",
|
|
124
124
|
"quill": "^2.0.2",
|
|
125
|
-
"sass": "
|
|
125
|
+
"sass": "1.78.0",
|
|
126
126
|
"tslib": "^2.7.0",
|
|
127
127
|
"typescript": "^5.6.2",
|
|
128
128
|
"unbuild": "3.0.0-rc.7",
|
|
129
|
-
"unocss": "0.62.
|
|
129
|
+
"unocss": "0.62.4",
|
|
130
130
|
"unplugin-auto-import": "^0.18.3",
|
|
131
131
|
"unplugin-vue-components": "^0.27.4",
|
|
132
132
|
"vanilla-jsoneditor": "^0.23.8",
|
|
133
|
-
"vite": "^5.4.
|
|
133
|
+
"vite": "^5.4.6",
|
|
134
134
|
"vite-plugin-dts": "4.2.1",
|
|
135
135
|
"vite-plugin-eslint": "^1.8.1",
|
|
136
136
|
"vite-plugin-pages": "^0.32.3",
|
|
137
137
|
"vite-ssg": "^0.23.8",
|
|
138
138
|
"vitepress": "1.3.4",
|
|
139
|
-
"vitest": "^2.1.
|
|
140
|
-
"vue": "3.5.
|
|
139
|
+
"vitest": "^2.1.1",
|
|
140
|
+
"vue": "3.5.6",
|
|
141
141
|
"vue-demi": "^0.14.10",
|
|
142
|
-
"vue-router": "^4.4.
|
|
142
|
+
"vue-router": "^4.4.5",
|
|
143
143
|
"vue-tsc": "^2.1.6"
|
|
144
144
|
}
|
|
145
145
|
}
|