@sfxcode/formkit-primevue 2.3.5 → 2.3.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.
Files changed (52) hide show
  1. package/dist/components/PrimeAutoComplete.vue +2 -3
  2. package/dist/components/PrimeCascadeSelect.vue +3 -3
  3. package/dist/components/PrimeCheckbox.vue +3 -3
  4. package/dist/components/PrimeColorPicker.vue +3 -3
  5. package/dist/components/PrimeDatePicker.vue +3 -3
  6. package/dist/components/PrimeEditor.vue +3 -3
  7. package/dist/components/PrimeInputMask.vue +5 -9
  8. package/dist/components/PrimeInputNumber.vue +3 -3
  9. package/dist/components/PrimeInputOtp.vue +3 -3
  10. package/dist/components/PrimeInputText.vue +7 -7
  11. package/dist/components/PrimeKnob.vue +3 -3
  12. package/dist/components/PrimeListbox.vue +3 -3
  13. package/dist/components/PrimeMultiSelect.vue +3 -3
  14. package/dist/components/PrimeOutputBoolean.vue +11 -6
  15. package/dist/components/PrimeOutputDate.vue +11 -6
  16. package/dist/components/PrimeOutputDuration.vue +11 -6
  17. package/dist/components/PrimeOutputLink.vue +11 -6
  18. package/dist/components/PrimeOutputList.vue +11 -6
  19. package/dist/components/PrimeOutputNumber.vue +11 -6
  20. package/dist/components/PrimeOutputText.vue +11 -6
  21. package/dist/components/PrimePassword.vue +3 -3
  22. package/dist/components/PrimeRadioButton.vue +3 -3
  23. package/dist/components/PrimeRating.vue +3 -3
  24. package/dist/components/PrimeSelect.vue +3 -3
  25. package/dist/components/PrimeSelectButton.vue +3 -3
  26. package/dist/components/PrimeSlider.vue +3 -3
  27. package/dist/components/PrimeTextarea.vue +3 -3
  28. package/dist/components/PrimeToggleButton.vue +3 -3
  29. package/dist/components/PrimeToggleSwitch.vue +3 -3
  30. package/dist/components/PrimeTreeSelect.vue +3 -3
  31. package/dist/composables/index.d.ts +2 -2
  32. package/dist/composables/index.js +5 -5
  33. package/dist/composables/index.mjs +2 -2
  34. package/dist/composables/useFormKitIcon.js +2 -3
  35. package/dist/composables/useFormKitIcon.mjs +2 -4
  36. package/dist/composables/useFormKitInput.d.ts +0 -1
  37. package/dist/composables/useFormKitInput.js +0 -4
  38. package/dist/composables/useFormKitInput.mjs +1 -4
  39. package/dist/composables/useFormKitSection.d.ts +6 -0
  40. package/dist/composables/useFormKitSection.js +27 -0
  41. package/dist/composables/useFormKitSection.mjs +16 -0
  42. package/dist/composables/useInputEditor.d.ts +1 -0
  43. package/dist/composables/useInputEditor.js +2 -0
  44. package/dist/composables/useInputEditor.mjs +2 -1
  45. package/dist/composables/useInputEditorSchema.js +25 -19
  46. package/dist/composables/useInputEditorSchema.mjs +26 -16
  47. package/dist/sass/formkit-primevue.scss +24 -21
  48. package/dist/style.css +1 -1
  49. package/package.json +1 -1
  50. package/dist/composables/useFormKitOutput.d.ts +0 -3
  51. package/dist/composables/useFormKitOutput.js +0 -15
  52. package/dist/composables/useFormKitOutput.mjs +0 -7
@@ -12,7 +12,6 @@ export interface FormKitPrimeAutoCompleteProps {
12
12
  dropdown?: AutoCompleteProps['dropdown']
13
13
  multiple?: AutoCompleteProps['multiple']
14
14
  typeahead?: AutoCompleteProps['typeahead']
15
- wrapperClass?: string
16
15
  }
17
16
 
18
17
  const props = defineProps({
@@ -22,7 +21,7 @@ const props = defineProps({
22
21
  },
23
22
  })
24
23
 
25
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
24
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
26
25
 
27
26
  const suggestions = ref([])
28
27
 
@@ -32,7 +31,7 @@ function search(event: AutoCompleteCompleteEvent) {
32
31
  </script>
33
32
 
34
33
  <template>
35
- <div :class="wrapperClass">
34
+ <div class="p-formkit">
36
35
  <AutoComplete
37
36
  :id="context.id"
38
37
  v-model="context._value"
@@ -15,7 +15,7 @@ export interface FormKitPrimeCascadeSelectProps {
15
15
  pt?: CascadeSelectProps['pt']
16
16
  ptOptions?: CascadeSelectProps['ptOptions']
17
17
  unstyled?: CascadeSelectProps['unstyled']
18
- wrapperClass?: string
18
+
19
19
  }
20
20
 
21
21
  const props = defineProps({
@@ -25,11 +25,11 @@ const props = defineProps({
25
25
  },
26
26
  })
27
27
 
28
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
28
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
29
29
  </script>
30
30
 
31
31
  <template>
32
- <div :class="wrapperClass">
32
+ <div class="p-formkit">
33
33
  <CascadeSelect
34
34
  :id="context.id"
35
35
  v-model="context._value"
@@ -16,7 +16,7 @@ export interface FormKitPrimeCheckboxProps {
16
16
  variant?: CheckboxProps['variant']
17
17
  labelLeft?: string
18
18
  labelRight?: string
19
- wrapperClass?: string
19
+
20
20
  }
21
21
 
22
22
  const props = defineProps({
@@ -26,11 +26,11 @@ const props = defineProps({
26
26
  },
27
27
  })
28
28
 
29
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
29
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
30
30
  </script>
31
31
 
32
32
  <template>
33
- <div :class="wrapperClass">
33
+ <div class="p-formkit">
34
34
  <span v-if="context.labelLeft" class="formkit-prime-left">{{ context.labelLeft }}</span>
35
35
  <Checkbox
36
36
  v-model="context._value"
@@ -12,7 +12,7 @@ export interface FormKitPrimeColorPickerProps {
12
12
  pt?: ColorPickerProps['pt']
13
13
  ptOptions?: ColorPickerProps['ptOptions']
14
14
  unstyled?: ColorPickerProps['unstyled']
15
- wrapperClass?: string
15
+
16
16
  }
17
17
 
18
18
  const props = defineProps({
@@ -22,11 +22,11 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { wrapperClass, handleChange } = useFormKitInput(props.context)
25
+ const { handleChange } = useFormKitInput(props.context)
26
26
  </script>
27
27
 
28
28
  <template>
29
- <div :class="wrapperClass">
29
+ <div class="p-formkit">
30
30
  <ColorPicker
31
31
  v-model="context._value"
32
32
  v-bind="context?.attrs"
@@ -49,7 +49,7 @@ export interface FormKitPrimeDatePickerProps {
49
49
  pt?: DatePickerProps['pt']
50
50
  ptOptions?: DatePickerProps['ptOptions']
51
51
  unstyled?: DatePickerProps['unstyled']
52
- wrapperClass?: string
52
+
53
53
  }
54
54
 
55
55
  const props = defineProps({
@@ -59,7 +59,7 @@ const props = defineProps({
59
59
  },
60
60
  })
61
61
 
62
- const { styleClass, wrapperClass, handleInput, handleSelect } = useFormKitInput(props.context)
62
+ const { styleClass, handleInput, handleSelect } = useFormKitInput(props.context)
63
63
 
64
64
  function handleBlur(e: DatePickerBlurEvent) {
65
65
  props.context?.handlers.blur(e.originalEvent)
@@ -71,7 +71,7 @@ function handleClearClick() {
71
71
  </script>
72
72
 
73
73
  <template>
74
- <div :class="wrapperClass">
74
+ <div class="p-formkit">
75
75
  <DatePicker
76
76
  v-model="context._value"
77
77
  v-bind="context?.attrs"
@@ -12,7 +12,7 @@ export interface FormKitPrimeEditorProps {
12
12
  pt?: EditorProps['pt']
13
13
  ptOptions?: EditorProps['ptOptions']
14
14
  unstyled?: EditorProps['unstyled']
15
- wrapperClass?: string
15
+
16
16
  }
17
17
 
18
18
  const props = defineProps({
@@ -22,7 +22,7 @@ const props = defineProps({
22
22
  },
23
23
  })
24
24
 
25
- const { styleClass, wrapperClass, handleInput } = useFormKitInput(props.context)
25
+ const { styleClass, handleInput } = useFormKitInput(props.context)
26
26
 
27
27
  function handleSelection(e: EditorSelectionChangeEvent) {
28
28
  if (e.range === null)
@@ -31,7 +31,7 @@ function handleSelection(e: EditorSelectionChangeEvent) {
31
31
  </script>
32
32
 
33
33
  <template>
34
- <div :class="wrapperClass">
34
+ <div class="p-formkit">
35
35
  <Editor
36
36
  :id="context.id"
37
37
  v-model="context._value"
@@ -17,7 +17,7 @@ export interface FormKitPrimeInputMaskProps {
17
17
  variant?: InputMaskProps['variant']
18
18
  iconLeft?: string
19
19
  iconRight?: string
20
- wrapperClass?: string
20
+
21
21
  }
22
22
 
23
23
  const props = defineProps({
@@ -27,7 +27,7 @@ const props = defineProps({
27
27
  },
28
28
  })
29
29
 
30
- const { styleClass, wrapperClass } = useFormKitInput(props.context)
30
+ const { styleClass } = useFormKitInput(props.context)
31
31
 
32
32
  function handleInput(e: FocusEvent) {
33
33
  props.context?.node.input(props.context?._value)
@@ -53,11 +53,9 @@ function spanClass() {
53
53
  </script>
54
54
 
55
55
  <template>
56
- <div :class="wrapperClass">
56
+ <div class="p-formkit">
57
57
  <span :class="spanClass()">
58
- <i v-if="hasLeftIcon()" :class="context.iconLeft" />
59
-
60
- <InputMask
58
+ <i v-if="hasLeftIcon()" :class="context.iconLeft" /> <InputMask
61
59
  :id="context.id"
62
60
  v-model="context._value"
63
61
  v-bind="context?.attrs"
@@ -77,9 +75,7 @@ function spanClass() {
77
75
  :pt-options="context.ptOptions"
78
76
  :unstyled="context.unstyled ?? false"
79
77
  @blur="handleInput"
80
- />
81
-
82
- <i v-if="hasRightIcon" :class="context.iconRight" />
78
+ /> <i v-if="hasRightIcon" :class="context.iconRight" />
83
79
  </span>
84
80
  </div>
85
81
  </template>
@@ -23,7 +23,7 @@ export interface FormKitPrimeInputNumberProps {
23
23
  ptOptions?: InputNumberProps['ptOptions']
24
24
  unstyled?: InputNumberProps['unstyled']
25
25
  placeholder?: InputNumberProps['placeholder']
26
- wrapperClass?: string
26
+
27
27
  }
28
28
 
29
29
  const props = defineProps({
@@ -33,7 +33,7 @@ const props = defineProps({
33
33
  },
34
34
  })
35
35
 
36
- const { styleClass, wrapperClass, handleInput } = useFormKitInput(props.context)
36
+ const { styleClass, handleInput } = useFormKitInput(props.context)
37
37
 
38
38
  function handleBlur(e: InputNumberBlurEvent) {
39
39
  props.context?.handlers.blur(e.originalEvent)
@@ -41,7 +41,7 @@ function handleBlur(e: InputNumberBlurEvent) {
41
41
  </script>
42
42
 
43
43
  <template>
44
- <div :class="wrapperClass">
44
+ <div class="p-formkit">
45
45
  <InputNumber
46
46
  v-model="context._value"
47
47
  v-bind="context?.attrs"
@@ -13,7 +13,7 @@ export interface FormKitPrimeInputOtpProps {
13
13
  variant?: InputOtpProps['variant']
14
14
  mask?: InputOtpProps['mask']
15
15
  integerOnly?: InputOtpProps['integerOnly']
16
- wrapperClass?: string
16
+
17
17
  }
18
18
 
19
19
  const props = defineProps({
@@ -23,11 +23,11 @@ const props = defineProps({
23
23
  },
24
24
  })
25
25
 
26
- const { styleClass, wrapperClass, handleBlur, handleInput } = useFormKitInput(props.context)
26
+ const { styleClass, handleBlur, handleInput } = useFormKitInput(props.context)
27
27
  </script>
28
28
 
29
29
  <template>
30
- <div :class="wrapperClass">
30
+ <div class="p-formkit">
31
31
  <InputOtp
32
32
  :id="context.id"
33
33
  v-model="context._value"
@@ -5,7 +5,7 @@ import type { FormKitFrameworkContext } from '@formkit/core'
5
5
  import IconField from 'primevue/iconfield'
6
6
  import InputIcon from 'primevue/inputicon'
7
7
  import type { InputTextProps } from 'primevue/inputtext'
8
- import { useFormKitIcon, useFormKitInput } from '../composables'
8
+ import { useFormKitInput, useFormKitSection } from '../composables'
9
9
 
10
10
  export interface FormKitPrimeInputTextProps {
11
11
  pt?: InputTextProps['pt']
@@ -13,7 +13,7 @@ export interface FormKitPrimeInputTextProps {
13
13
  unstyled?: InputTextProps['unstyled']
14
14
  placeholder?: InputTextProps['placeholder']
15
15
  icon?: string
16
- wrapperClass?: string
16
+
17
17
  }
18
18
 
19
19
  const props = defineProps({
@@ -23,14 +23,14 @@ const props = defineProps({
23
23
  },
24
24
  })
25
25
 
26
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
27
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
26
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
27
+ const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
28
28
  </script>
29
29
 
30
30
  <template>
31
- <div :class="wrapperClass">
31
+ <div class="p-formkit">
32
32
  <IconField>
33
- <InputIcon v-if="hasIcon && iconPosition === 'left'" :class="icon" />
33
+ <InputIcon v-if="hasPrefixIcon" :class="context?.prefixIcon" />
34
34
  <InputText
35
35
  :id="context.id"
36
36
  v-model="context._value"
@@ -49,7 +49,7 @@ const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
49
49
  @input="handleInput"
50
50
  @blur="handleBlur"
51
51
  />
52
- <InputIcon v-if="hasIcon && iconPosition === 'right'" :class="icon" />
52
+ <InputIcon v-if="hasSuffixIcon" :class="context?.suffixIcon" />
53
53
  </IconField>
54
54
  </div>
55
55
  </template>
@@ -19,7 +19,7 @@ export interface FormKitPrimeKnobProps {
19
19
  rangeColor?: KnobProps['rangeColor']
20
20
  textColor?: KnobProps['textColor']
21
21
  valueTemplate?: KnobProps['valueTemplate']
22
- wrapperClass?: string
22
+
23
23
  }
24
24
 
25
25
  const props = defineProps({
@@ -29,7 +29,7 @@ const props = defineProps({
29
29
  },
30
30
  })
31
31
 
32
- const { styleClass, wrapperClass } = useFormKitInput(props.context)
32
+ const { styleClass } = useFormKitInput(props.context)
33
33
 
34
34
  function handleInput(e: any) {
35
35
  props.context?.node.input(e)
@@ -42,7 +42,7 @@ function updateValue(n: number) {
42
42
  </script>
43
43
 
44
44
  <template>
45
- <div :class="wrapperClass">
45
+ <div class="p-formkit">
46
46
  <Knob
47
47
  :id="context.id"
48
48
  v-model="context._value"
@@ -20,7 +20,7 @@ export interface FormKitPrimeListboxProps {
20
20
  filterMatchMode?: ListboxProps['filterMatchMode']
21
21
  autoOptionFocus?: ListboxProps['autoOptionFocus']
22
22
  selectOnFocus?: ListboxProps['selectOnFocus']
23
- wrapperClass?: string
23
+
24
24
  }
25
25
 
26
26
  const props = defineProps({
@@ -30,11 +30,11 @@ const props = defineProps({
30
30
  },
31
31
  })
32
32
 
33
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
33
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
34
34
  </script>
35
35
 
36
36
  <template>
37
- <div :class="wrapperClass">
37
+ <div class="p-formkit">
38
38
  <Listbox
39
39
  :id="context.id"
40
40
  v-model="context._value"
@@ -41,7 +41,7 @@ export interface FormKitPrimeMultiSelectProps {
41
41
  placeholder?: MultiSelectProps['placeholder']
42
42
  ptOptions?: MultiSelectProps['ptOptions']
43
43
  unstyled?: MultiSelectProps['unstyled']
44
- wrapperClass?: string
44
+
45
45
  }
46
46
 
47
47
  const props = defineProps({
@@ -51,11 +51,11 @@ const props = defineProps({
51
51
  },
52
52
  })
53
53
 
54
- const { styleClass, wrapperClass, handleBlur, handleChange } = useFormKitInput(props.context)
54
+ const { styleClass, handleBlur, handleChange } = useFormKitInput(props.context)
55
55
  </script>
56
56
 
57
57
  <template>
58
- <div :class="wrapperClass">
58
+ <div class="p-formkit">
59
59
  <MultiSelect
60
60
  v-model="context._value"
61
61
  v-bind="context?.attrs"
@@ -1,13 +1,12 @@
1
1
  <script setup lang='ts'>
2
2
  import { useI18n } from 'vue-i18n'
3
3
  import { computed } from 'vue'
4
- import { useFormKitIcon, useFormKitOutput } from '../composables'
4
+ import { useFormKitSection } from '../composables'
5
5
 
6
6
  const props = defineProps({
7
7
  context: Object,
8
8
  })
9
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-boolean')
10
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
9
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
11
10
 
12
11
  const { t } = useI18n()
13
12
 
@@ -20,11 +19,17 @@ const translated = computed(() => {
20
19
  </script>
21
20
 
22
21
  <template>
23
- <div :class="wrapperClass">
24
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
22
+ <div class="p-formkit p-output-boolean">
23
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
24
+ <span v-if="hasPrefix" class="formkit-prefix">
25
+ {{ context?.attrs?.prefix }}
26
+ </span>
25
27
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
26
28
  {{ translated }}
27
29
  </span>
28
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
30
+ <span v-if="hasSuffix" class="formkit-suffix">
31
+ {{ context?.attrs?.suffix }}
32
+ </span>
33
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
29
34
  </div>
30
35
  </template>
@@ -1,13 +1,12 @@
1
1
  <script setup lang='ts'>
2
2
  import { useI18n } from 'vue-i18n'
3
3
  import { computed } from 'vue'
4
- import { useFormKitIcon, useFormKitOutput } from '../composables'
4
+ import { useFormKitSection } from '../composables'
5
5
 
6
6
  const props = defineProps({
7
7
  context: Object,
8
8
  })
9
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-date')
10
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
9
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
11
10
 
12
11
  const { d } = useI18n()
13
12
 
@@ -30,11 +29,17 @@ const converted = computed(() => {
30
29
  </script>
31
30
 
32
31
  <template>
33
- <div :class="wrapperClass">
34
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
32
+ <div class="p-formkit p-output-date">
33
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
34
+ <span v-if="hasPrefix" class="formkit-prefix">
35
+ {{ context?.attrs?.prefix }}
36
+ </span>
35
37
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
36
38
  {{ converted }}
37
39
  </span>
38
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
40
+ <span v-if="hasSuffix" class="formkit-suffix">
41
+ {{ context?.attrs?.suffix }}
42
+ </span>
43
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
39
44
  </div>
40
45
  </template>
@@ -1,22 +1,27 @@
1
1
  <script setup lang='ts'>
2
- import { useFormKitIcon, useFormKitOutput, useOutputDuration } from '../composables'
2
+ import { useFormKitSection, useOutputDuration } from '../composables'
3
3
 
4
4
  const props = defineProps({
5
5
  context: Object,
6
6
  })
7
7
 
8
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-duration')
9
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
8
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
10
9
 
11
10
  const { formattedDuration } = useOutputDuration()
12
11
  </script>
13
12
 
14
13
  <template>
15
- <div :class="wrapperClass">
16
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
14
+ <div class="p-formkit p-output-duration">
15
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
16
+ <span v-if="hasPrefix" class="formkit-prefix">
17
+ {{ context?.attrs?.prefix }}
18
+ </span>
17
19
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
18
20
  {{ formattedDuration(context?._value) }}
19
21
  </span>
20
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
22
+ <span v-if="hasSuffix" class="formkit-suffix">
23
+ {{ context?.attrs?.suffix }}
24
+ </span>
25
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
21
26
  </div>
22
27
  </template>
@@ -1,19 +1,21 @@
1
1
  <script setup lang='ts'>
2
2
  import { computed } from 'vue'
3
- import { useFormKitIcon, useFormKitOutput } from '../composables'
3
+ import { useFormKitSection } from '../composables'
4
4
 
5
5
  const props = defineProps({
6
6
  context: Object,
7
7
  })
8
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-link')
9
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
8
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
10
9
 
11
10
  const url = computed(() => props.context?._value.indexOf('http') > -1 ? props.context?._value : `https://${props.context?._value}`)
12
11
  </script>
13
12
 
14
13
  <template>
15
- <div :class="wrapperClass">
16
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
14
+ <div class="p-formkit p-output-link">
15
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
16
+ <span v-if="hasPrefix" class="formkit-prefix">
17
+ {{ context?.attrs?.prefix }}
18
+ </span>
17
19
  <a
18
20
  :id="context?.id"
19
21
  :style="context?.attrs?.style"
@@ -23,6 +25,9 @@ const url = computed(() => props.context?._value.indexOf('http') > -1 ? props.co
23
25
  >
24
26
  {{ context?._value }}
25
27
  </a>
26
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
28
+ <span v-if="hasSuffix" class="formkit-suffix">
29
+ {{ context?.attrs?.suffix }}
30
+ </span>
31
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
27
32
  </div>
28
33
  </template>
@@ -1,11 +1,10 @@
1
1
  <script setup lang='ts'>
2
- import { useFormKitIcon, useFormKitOutput } from '../composables'
2
+ import { useFormKitSection } from '../composables'
3
3
 
4
4
  const props = defineProps({
5
5
  context: Object,
6
6
  })
7
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-list')
8
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
7
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
9
8
 
10
9
  function listValue(index: number, value: string): string {
11
10
  const divider = props.context?.attrs?.divider || ', '
@@ -17,13 +16,19 @@ function listValue(index: number, value: string): string {
17
16
  </script>
18
17
 
19
18
  <template>
20
- <div :class="wrapperClass">
21
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
19
+ <div class="p-formkit p-output-list">
20
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
21
+ <span v-if="hasPrefix" class="formkit-prefix">
22
+ {{ context?.attrs?.prefix }}
23
+ </span>
22
24
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
23
25
  <template v-for="(value, index) of context?._value" :key="index">
24
26
  <span class="p-output-list-item">{{ listValue(index, value) }}</span>
25
27
  </template>
26
28
  </span>
27
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
29
+ <span v-if="hasSuffix" class="formkit-suffix">
30
+ {{ context?.attrs?.suffix }}
31
+ </span>
32
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
28
33
  </div>
29
34
  </template>
@@ -2,13 +2,12 @@
2
2
  import { useI18n } from 'vue-i18n'
3
3
  import { computed } from 'vue'
4
4
 
5
- import { useFormKitIcon, useFormKitOutput } from '../composables'
5
+ import { useFormKitSection } from '../composables'
6
6
 
7
7
  const props = defineProps({
8
8
  context: Object,
9
9
  })
10
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-number')
11
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
10
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
12
11
 
13
12
  const { n } = useI18n()
14
13
 
@@ -31,11 +30,17 @@ const converted = computed(() => {
31
30
  </script>
32
31
 
33
32
  <template>
34
- <div :class="wrapperClass">
35
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
33
+ <div class="p-formkit p-output-number">
34
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
35
+ <span v-if="hasPrefix" class="formkit-prefix">
36
+ {{ context?.attrs?.prefix }}
37
+ </span>
36
38
  <span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
37
39
  {{ converted }}
38
40
  </span>
39
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
41
+ <span v-if="hasSuffix" class="formkit-suffix">
42
+ {{ context?.attrs?.suffix }}
43
+ </span>
44
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
40
45
  </div>
41
46
  </template>
@@ -1,16 +1,18 @@
1
1
  <script setup lang='ts'>
2
- import { useFormKitIcon, useFormKitOutput } from '../composables'
2
+ import { useFormKitSection } from '../composables'
3
3
 
4
4
  const props = defineProps({
5
5
  context: Object,
6
6
  })
7
- const { wrapperClass } = useFormKitOutput(props.context, 'p-output-text')
8
- const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
7
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
9
8
  </script>
10
9
 
11
10
  <template>
12
- <div :class="wrapperClass">
13
- <i v-if="hasIcon && iconPosition === 'left'" :class="icon" class="p-formkit-icon-left" />
11
+ <div class="p-formkit p-output-text">
12
+ <i v-if="hasPrefixIcon" class="formkit-prefix-icon" :class="context?.prefixIcon" />
13
+ <span v-if="hasPrefix" class="formkit-prefix">
14
+ {{ context?.attrs?.prefix }}
15
+ </span>
14
16
  <span
15
17
  :id="context?.id"
16
18
  :style="context?.attrs?.style"
@@ -18,6 +20,9 @@ const { hasIcon, icon, iconPosition } = useFormKitIcon(props.context)
18
20
  >
19
21
  {{ context?._value }}
20
22
  </span>
21
- <i v-if="hasIcon && iconPosition === 'right'" :class="icon" class="p-formkit-icon-right" />
23
+ <span v-if="hasSuffix" class="formkit-suffix">
24
+ {{ context?.attrs?.suffix }}
25
+ </span>
26
+ <i v-if="hasSuffixIcon" class="formkit-suffix-icon" :class="context?.suffixIcon" />
22
27
  </div>
23
28
  </template>
@@ -20,7 +20,7 @@ export interface FormKitPrimePasswordProps {
20
20
  placeholder?: PasswordProps['placeholder']
21
21
  feedback?: PasswordProps['feedback']
22
22
  toggleMask?: PasswordProps['toggleMask']
23
- wrapperClass?: string
23
+
24
24
  }
25
25
 
26
26
  const props = defineProps({
@@ -30,11 +30,11 @@ const props = defineProps({
30
30
  },
31
31
  })
32
32
 
33
- const { styleClass, wrapperClass, handleInput, handleBlur } = useFormKitInput(props.context)
33
+ const { styleClass, handleInput, handleBlur } = useFormKitInput(props.context)
34
34
  </script>
35
35
 
36
36
  <template>
37
- <div :class="wrapperClass">
37
+ <div class="p-formkit">
38
38
  <Password
39
39
  v-model="context._value"
40
40
  v-bind="context?.attrs"