@sfxcode/formkit-primevue 2.4.7 → 2.4.9

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.
Files changed (54) hide show
  1. package/dist/components/FormKitDataEdit.vue +1 -1
  2. package/dist/components/FormKitDataView.vue +1 -1
  3. package/dist/components/PrimeAutoComplete.vue +5 -4
  4. package/dist/components/PrimeCascadeSelect.vue +5 -4
  5. package/dist/components/PrimeCheckbox.vue +5 -4
  6. package/dist/components/PrimeColorPicker.vue +2 -2
  7. package/dist/components/PrimeDatePicker.vue +5 -4
  8. package/dist/components/PrimeEditor.vue +5 -4
  9. package/dist/components/PrimeInputMask.vue +6 -6
  10. package/dist/components/PrimeInputNumber.vue +5 -4
  11. package/dist/components/PrimeInputOtp.vue +5 -4
  12. package/dist/components/PrimeInputText.vue +5 -4
  13. package/dist/components/PrimeKnob.vue +5 -4
  14. package/dist/components/PrimeListbox.vue +5 -4
  15. package/dist/components/PrimeMultiSelect.vue +5 -4
  16. package/dist/components/PrimeOutputBoolean.vue +2 -2
  17. package/dist/components/PrimeOutputDate.vue +2 -2
  18. package/dist/components/PrimeOutputDuration.vue +1 -1
  19. package/dist/components/PrimeOutputLink.vue +1 -1
  20. package/dist/components/PrimeOutputList.vue +1 -1
  21. package/dist/components/PrimeOutputNumber.vue +3 -3
  22. package/dist/components/PrimeOutputReference.vue +1 -1
  23. package/dist/components/PrimeOutputText.vue +1 -1
  24. package/dist/components/PrimePassword.vue +5 -4
  25. package/dist/components/PrimeRadioButton.vue +5 -4
  26. package/dist/components/PrimeRating.vue +5 -4
  27. package/dist/components/PrimeSelect.vue +6 -5
  28. package/dist/components/PrimeSelectButton.vue +5 -4
  29. package/dist/components/PrimeSlider.vue +5 -4
  30. package/dist/components/PrimeTextarea.vue +5 -4
  31. package/dist/components/PrimeToggleButton.vue +5 -4
  32. package/dist/components/PrimeToggleSwitch.vue +5 -4
  33. package/dist/components/PrimeTreeSelect.vue +5 -4
  34. package/dist/components/index.d.ts +10 -10
  35. package/dist/components/index.js +9 -9
  36. package/dist/components/index.mjs +15 -15
  37. package/dist/composables/index.d.ts +1 -1
  38. package/dist/composables/index.js +1 -1
  39. package/dist/composables/index.mjs +1 -1
  40. package/dist/composables/useFormKitInput.d.ts +1 -0
  41. package/dist/composables/useFormKitInput.js +4 -0
  42. package/dist/composables/useFormKitInput.mjs +4 -1
  43. package/dist/composables/useFormKitSection.js +1 -1
  44. package/dist/composables/useFormKitSection.mjs +1 -1
  45. package/dist/composables/useInputEditorSchema.js +1 -1
  46. package/dist/composables/useInputEditorSchema.mjs +1 -1
  47. package/dist/definitions/input.js +6 -6
  48. package/dist/definitions/input.mjs +6 -6
  49. package/dist/definitions/output.js +4 -4
  50. package/dist/definitions/output.mjs +4 -4
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.js +2 -2
  53. package/dist/index.mjs +7 -7
  54. package/package.json +26 -26
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import { ref } from 'vue'
3
2
  import { FormKit, FormKitSchema } from '@formkit/vue'
3
+ import { ref } from 'vue'
4
4
  import FormKitDebug from './FormKitDebug.vue'
5
5
 
6
6
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import { ref } from 'vue'
3
2
  import { FormKit, FormKitSchema } from '@formkit/vue'
3
+ import { ref } from 'vue'
4
4
  import FormKitDebug from './FormKitDebug.vue'
5
5
 
6
6
  const props = defineProps({
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import { type PropType, ref } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { AutoCompleteCompleteEvent, AutoCompleteProps } from 'primevue/autocomplete'
4
+
5
+ import { type PropType, ref } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeAutoCompleteProps {
@@ -21,7 +21,7 @@ const props = defineProps({
21
21
  },
22
22
  })
23
23
 
24
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
24
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
25
25
 
26
26
  const suggestions = ref([])
27
27
 
@@ -37,7 +37,8 @@ function search(event: AutoCompleteCompleteEvent) {
37
37
  v-model="context._value"
38
38
  v-bind="context?.attrs"
39
39
  :disabled="!!context?.disabled"
40
- :class="styleClass"
40
+ :class="context?.attrs?.class"
41
+ :invalid="isInvalid"
41
42
  :tabindex="context?.attrs.tabindex"
42
43
  :aria-label="context?.attrs.ariaLabel"
43
44
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { CascadeSelectProps } from 'primevue/cascadeselect'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeCascadeSelectProps {
@@ -25,7 +25,7 @@ const props = defineProps({
25
25
  },
26
26
  })
27
27
 
28
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
28
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
29
29
  </script>
30
30
 
31
31
  <template>
@@ -36,7 +36,8 @@ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
36
36
  v-bind="context?.attrs"
37
37
  :disabled="!!context?.disabled"
38
38
  :readonly="context?.attrs.readonly ?? false"
39
- :class="styleClass"
39
+ :class="context?.attrs?.class"
40
+ :invalid="isInvalid"
40
41
  :tabindex="context?.attrs.tabindex"
41
42
  :aria-label="context?.attrs.ariaLabel"
42
43
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { CheckboxProps } from 'primevue/checkbox'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput, useFormKitSection } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeCheckboxProps {
@@ -25,7 +25,7 @@ const props = defineProps({
25
25
 
26
26
  const { hasPrefix, hasSuffix, generateId } = useFormKitSection(props.context)
27
27
 
28
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
28
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
29
29
 
30
30
  const generatedId = generateId()
31
31
  </script>
@@ -42,7 +42,8 @@ const generatedId = generateId()
42
42
  :disabled="!!context?.disabled"
43
43
  :readonly="context?.attrs.readonly ?? false"
44
44
  :input-style="context?.attrs.style"
45
- :input-class="styleClass"
45
+ :input-class="context?.attrs?.class"
46
+ :invalid="isInvalid"
46
47
  :tabindex="context?.attrs.tabindex"
47
48
  :aria-label="context?.attrs.ariaLabel"
48
49
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { ColorPickerProps } from 'primevue/colorpicker'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeColorPickerProps {
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { DatePickerBlurEvent, DatePickerProps } from 'primevue/datepicker'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeDatePickerProps {
@@ -59,7 +59,7 @@ const props = defineProps({
59
59
  },
60
60
  })
61
61
 
62
- const { styleClass, handleInput, handleSelect } = useFormKitInput(props.context)
62
+ const { isInvalid, handleInput, handleSelect } = useFormKitInput(props.context)
63
63
 
64
64
  function handleBlur(e: DatePickerBlurEvent) {
65
65
  props.context?.handlers.blur(e.originalEvent)
@@ -79,7 +79,8 @@ function handleClearClick() {
79
79
  :disabled="!!context?.disabled"
80
80
  :readonly="context?.attrs.readonly ?? false"
81
81
  :input-style="context?.attrs.style"
82
- :input-class="styleClass"
82
+ :input-class="context?.attrs?.class"
83
+ :invalid="isInvalid"
83
84
  :tabindex="context?.attrs.tabindex"
84
85
  :aria-label="context?.attrs.ariaLabel"
85
86
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { EditorProps, EditorSelectionChangeEvent } from 'primevue/editor'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeEditorProps {
@@ -22,7 +22,7 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { styleClass, handleInput } = useFormKitInput(props.context)
25
+ const { isInvalid, handleInput } = useFormKitInput(props.context)
26
26
 
27
27
  function handleSelection(e: EditorSelectionChangeEvent) {
28
28
  if (e.range === null)
@@ -39,7 +39,8 @@ function handleSelection(e: EditorSelectionChangeEvent) {
39
39
  :disabled="!!context?.disabled"
40
40
  :readonly="context?.attrs.readonly ?? false"
41
41
  :editor-style="context?.attrs.style"
42
- :class="styleClass"
42
+ :class="context?.attrs?.class"
43
+ :invalid="isInvalid"
43
44
  :tabindex="context?.attrs.tabindex"
44
45
  :aria-label="context?.attrs.ariaLabel"
45
46
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,10 +1,10 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { InputMaskProps } from 'primevue/inputmask'
6
- import InputIcon from 'primevue/inputicon'
4
+
5
+ import type { PropType } from 'vue'
7
6
  import IconField from 'primevue/iconfield'
7
+ import InputIcon from 'primevue/inputicon'
8
8
  import { useFormKitInput, useFormKitSection } from '../composables'
9
9
 
10
10
  export interface FormKitPrimeInputMaskProps {
@@ -26,7 +26,7 @@ const props = defineProps({
26
26
  },
27
27
  })
28
28
 
29
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
29
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
30
30
  const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
31
31
  </script>
32
32
 
@@ -40,7 +40,8 @@ const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
40
40
  v-bind="context?.attrs"
41
41
  :disabled="!!context?.disabled"
42
42
  :readonly="context?.attrs.readonly ?? false"
43
- :class="styleClass"
43
+ :class="context?.attrs?.class"
44
+ :invalid="isInvalid"
44
45
  :tabindex="context?.attrs.tabindex"
45
46
  :aria-label="context?.attrs.ariaLabel"
46
47
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -49,7 +50,6 @@ const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
49
50
  :auto-clear="context.autoClear ?? true"
50
51
  :unmask="context.unmask ?? false"
51
52
  :pt="context.pt"
52
- :invalid="context.invalid"
53
53
  :variant="context.variant"
54
54
  :pt-options="context.ptOptions"
55
55
  :unstyled="context.unstyled ?? false"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { InputNumberBlurEvent, InputNumberProps } from 'primevue/inputnumber'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeInputNumberProps {
@@ -33,7 +33,7 @@ const props = defineProps({
33
33
  },
34
34
  })
35
35
 
36
- const { styleClass, handleInput } = useFormKitInput(props.context)
36
+ const { isInvalid, handleInput } = useFormKitInput(props.context)
37
37
 
38
38
  function handleBlur(e: InputNumberBlurEvent) {
39
39
  props.context?.handlers.blur(e.originalEvent)
@@ -49,7 +49,8 @@ function handleBlur(e: InputNumberBlurEvent) {
49
49
  :disabled="!!context?.disabled"
50
50
  :readonly="context?.attrs.readonly ?? false"
51
51
  :input-style="context?.attrs.style"
52
- :input-class="styleClass"
52
+ :input-class="context?.attrs?.class"
53
+ :invalid="isInvalid"
53
54
  :tabindex="context?.attrs.tabindex"
54
55
  :aria-label="context?.attrs.ariaLabel"
55
56
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { InputOtpProps } from 'primevue/inputotp'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeInputOtpProps {
@@ -23,7 +23,7 @@ const props = defineProps({
23
23
  },
24
24
  })
25
25
 
26
- const { styleClass, handleBlur, handleInput } = useFormKitInput(props.context)
26
+ const { isInvalid, handleBlur, handleInput } = useFormKitInput(props.context)
27
27
  </script>
28
28
 
29
29
  <template>
@@ -35,7 +35,8 @@ const { styleClass, handleBlur, handleInput } = useFormKitInput(props.context)
35
35
  :disabled="!!context?.disabled"
36
36
  :readonly="context?.attrs.readonly ?? false"
37
37
  :style="context?.attrs.style"
38
- :class="styleClass"
38
+ :class="context?.attrs?.class"
39
+ :invalid="isInvalid"
39
40
  :tabindex="context?.attrs.tabindex"
40
41
  :aria-label="context?.attrs.ariaLabel"
41
42
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,10 +1,10 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { InputTextProps } from 'primevue/inputtext'
4
4
 
5
+ import type { PropType } from 'vue'
5
6
  import IconField from 'primevue/iconfield'
6
7
  import InputIcon from 'primevue/inputicon'
7
- import type { InputTextProps } from 'primevue/inputtext'
8
8
  import { useFormKitInput, useFormKitSection } from '../composables'
9
9
 
10
10
  export interface FormKitPrimeInputTextProps {
@@ -21,7 +21,7 @@ const props = defineProps({
21
21
  },
22
22
  })
23
23
 
24
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
24
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
25
25
  const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
26
26
  </script>
27
27
 
@@ -36,7 +36,8 @@ const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
36
36
  :disabled="!!context?.disabled"
37
37
  :readonly="context?.attrs.readonly ?? false"
38
38
  :style="context?.attrs.style"
39
- :class="styleClass"
39
+ :class="context?.attrs?.class"
40
+ :invalid="isInvalid"
40
41
  :tabindex="context?.attrs.tabindex"
41
42
  :aria-label="context?.attrs.ariaLabel"
42
43
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { KnobProps } from 'primevue/knob'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeKnobProps {
@@ -29,7 +29,7 @@ const props = defineProps({
29
29
  },
30
30
  })
31
31
 
32
- const { styleClass } = useFormKitInput(props.context)
32
+ const { isInvalid } = useFormKitInput(props.context)
33
33
 
34
34
  function handleInput(e: any) {
35
35
  props.context?.node.input(e)
@@ -50,7 +50,8 @@ function updateValue(n: number) {
50
50
  :disabled="!!context?.disabled"
51
51
  :readonly="context?.attrs.readonly ?? false"
52
52
  :style="context?.attrs.style"
53
- :class="styleClass"
53
+ :class="context?.attrs?.class"
54
+ :invalid="isInvalid"
54
55
  :tabindex="context?.attrs.tabindex"
55
56
  :aria-label="context?.attrs.ariaLabel"
56
57
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { ListboxProps } from 'primevue/listbox'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeListboxProps {
@@ -30,7 +30,7 @@ const props = defineProps({
30
30
  },
31
31
  })
32
32
 
33
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
33
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
34
34
  </script>
35
35
 
36
36
  <template>
@@ -42,7 +42,8 @@ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
42
42
  :disabled="!!context?.disabled"
43
43
  :readonly="context?.attrs.readonly ?? false"
44
44
  :list-style="context?.attrs.style"
45
- :class="styleClass"
45
+ :class="context?.attrs?.class"
46
+ :invalid="isInvalid"
46
47
  :tabindex="context?.attrs.tabindex"
47
48
  :aria-label="context?.attrs.ariaLabel"
48
49
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { MultiSelectProps } from 'primevue/multiselect'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeMultiSelectProps {
@@ -51,7 +51,7 @@ const props = defineProps({
51
51
  },
52
52
  })
53
53
 
54
- const { styleClass, handleBlur, handleChange } = useFormKitInput(props.context)
54
+ const { isInvalid, handleBlur, handleChange } = useFormKitInput(props.context)
55
55
  </script>
56
56
 
57
57
  <template>
@@ -63,7 +63,8 @@ const { styleClass, handleBlur, handleChange } = useFormKitInput(props.context)
63
63
  :disabled="!!context?.disabled"
64
64
  :readonly="context?.attrs.readonly ?? false"
65
65
  :list-style="context?.attrs.style"
66
- :class="styleClass"
66
+ :class="context?.attrs?.class"
67
+ :invalid="isInvalid"
67
68
  :tabindex="context?.attrs.tabindex"
68
69
  :aria-label="context?.attrs.ariaLabel"
69
70
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,7 +1,7 @@
1
1
  <script setup lang='ts'>
2
- import { useI18n } from 'vue-i18n'
3
- import { type PropType, computed } from 'vue'
4
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import { computed, type PropType } from 'vue'
4
+ import { useI18n } from 'vue-i18n'
5
5
  import { useFormKitSection } from '../composables'
6
6
 
7
7
  const props = defineProps({
@@ -1,7 +1,7 @@
1
1
  <script setup lang='ts'>
2
- import { useI18n } from 'vue-i18n'
3
- import { type PropType, computed } from 'vue'
4
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import { computed, type PropType } from 'vue'
4
+ import { useI18n } from 'vue-i18n'
5
5
  import { useFormKitSection } from '../composables'
6
6
 
7
7
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { PropType } from 'vue'
4
4
  import { useFormKitSection, useOutputDuration } from '../composables'
5
5
 
6
6
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import { type PropType, computed } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import { computed, type PropType } from 'vue'
4
4
  import { useFormKitSection } from '../composables'
5
5
 
6
6
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { PropType } from 'vue'
4
4
  import { useFormKitSection } from '../composables'
5
5
 
6
6
  const props = defineProps({
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import { useI18n } from 'vue-i18n'
3
- import { type PropType, computed } from 'vue'
4
-
5
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import { computed, type PropType } from 'vue'
4
+
5
+ import { useI18n } from 'vue-i18n'
6
6
  import { useFormKitSection } from '../composables'
7
7
 
8
8
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import { type PropType, computed } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import { computed, type PropType } from 'vue'
4
4
  import { useFormKitSection } from '../composables'
5
5
 
6
6
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { PropType } from 'vue'
4
4
  import { useFormKitSection } from '../composables'
5
5
 
6
6
  const props = defineProps({
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { PasswordProps } from 'primevue/password'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimePasswordProps {
@@ -30,7 +30,7 @@ const props = defineProps({
30
30
  },
31
31
  })
32
32
 
33
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
33
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
34
34
  </script>
35
35
 
36
36
  <template>
@@ -42,7 +42,8 @@ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
42
42
  :disabled="!!context?.disabled"
43
43
  :readonly="context?.attrs.readonly ?? false"
44
44
  :input-style="context?.attrs.style"
45
- :input-class="styleClass"
45
+ :input-class="context?.attrs?.class"
46
+ :invalid="isInvalid"
46
47
  :tabindex="context?.attrs.tabindex"
47
48
  :aria-label="context?.attrs.ariaLabel"
48
49
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { RadioButtonProps } from 'primevue/radiobutton'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeRadioButtonProps {
@@ -21,7 +21,7 @@ const props = defineProps({
21
21
  },
22
22
  })
23
23
 
24
- const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
24
+ const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
25
25
  </script>
26
26
 
27
27
  <template>
@@ -36,7 +36,8 @@ const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
36
36
  :name="context?.attrs.name"
37
37
  :value="option.value"
38
38
  :input-style="context?.attrs.style"
39
- :input-class="styleClass"
39
+ :input-class="context?.attrs?.class"
40
+ :invalid="isInvalid"
40
41
  :pt="context.pt"
41
42
  :pt-options="context.ptOptions"
42
43
  :unstyled="context.unstyled ?? false"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { RatingProps } from 'primevue/rating'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeRatingProps {
@@ -22,7 +22,7 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
25
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
26
26
  </script>
27
27
 
28
28
  <template>
@@ -34,7 +34,8 @@ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
34
34
  :disabled="!!context?.disabled"
35
35
  :readonly="context?.attrs.readonly ?? false"
36
36
  :style="context?.attrs.style"
37
- :class="styleClass"
37
+ :class="context?.attrs?.class"
38
+ :invalid="isInvalid"
38
39
  :tabindex="context?.attrs.tabindex"
39
40
  :aria-label="context?.attrs.ariaLabel"
40
41
  :aria-labelledby="context?.attrs.ariaLabelledby"
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { SelectProps } from 'primevue/select'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeSelectProps {
@@ -47,7 +47,7 @@ const props = defineProps({
47
47
  },
48
48
  })
49
49
 
50
- const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
50
+ const { isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
51
51
  </script>
52
52
 
53
53
  <template>
@@ -59,9 +59,10 @@ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
59
59
  :disabled="!!context?.disabled"
60
60
  :readonly="context?.attrs.readonly ?? false"
61
61
  :style="context?.attrs.style"
62
- :class="styleClass"
62
+ :class="context?.attrs?.class"
63
+ :invalid="isInvalid"
63
64
  :input-style="context?.attrs.style"
64
- :input-class="styleClass"
65
+ :input-class="context?.attrs?.class"
65
66
  :input-props="context?.attrs.inputProps"
66
67
  :tabindex="context?.attrs.tabindex"
67
68
  :aria-label="context?.attrs.ariaLabel"
@@ -1,8 +1,8 @@
1
1
  <script setup lang='ts'>
2
- import type { PropType } from 'vue'
3
2
  import type { FormKitFrameworkContext } from '@formkit/core'
4
-
5
3
  import type { SelectButtonProps } from 'primevue/selectbutton'
4
+
5
+ import type { PropType } from 'vue'
6
6
  import { useFormKitInput } from '../composables'
7
7
 
8
8
  export interface FormKitPrimeSelectButtonProps {
@@ -25,7 +25,7 @@ const props = defineProps({
25
25
  },
26
26
  })
27
27
 
28
- const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
28
+ const { isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
29
29
  </script>
30
30
 
31
31
  <template>
@@ -37,7 +37,8 @@ const { styleClass, handleChange, handleBlur } = useFormKitInput(props.context)
37
37
  :disabled="!!context?.disabled"
38
38
  :readonly="context?.attrs.readonly ?? false"
39
39
  :style="context?.attrs.style"
40
- :class="styleClass"
40
+ :class="context?.attrs?.class"
41
+ :invalid="isInvalid"
41
42
  :tabindex="context?.attrs.tabindex"
42
43
  :aria-label="context?.attrs.ariaLabel"
43
44
  :aria-labelledby="context?.attrs.ariaLabelledby"