@sfxcode/formkit-primevue 3.3.4 → 3.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 (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +138 -13
  3. package/components.d.ts +1 -0
  4. package/dist/components/FormKitDataDebug.d.vue.ts +24 -0
  5. package/dist/components/FormKitDataDebug.vue +9 -5
  6. package/dist/components/FormKitDataDebug.vue.d.ts +24 -0
  7. package/dist/components/FormKitDataEdit.d.vue.ts +180 -0
  8. package/dist/components/FormKitDataEdit.vue +46 -53
  9. package/dist/components/FormKitDataEdit.vue.d.ts +180 -0
  10. package/dist/components/FormKitDataView.d.vue.ts +73 -0
  11. package/dist/components/FormKitDataView.vue +27 -20
  12. package/dist/components/FormKitDataView.vue.d.ts +73 -0
  13. package/dist/components/FormKitIcon.d.vue.ts +39 -0
  14. package/dist/components/FormKitIcon.vue +13 -6
  15. package/dist/components/FormKitIcon.vue.d.ts +39 -0
  16. package/dist/components/FormKitPrefix.d.vue.ts +7 -0
  17. package/dist/components/FormKitPrefix.vue +3 -3
  18. package/dist/components/FormKitPrefix.vue.d.ts +7 -0
  19. package/dist/components/FormKitSuffix.d.vue.ts +7 -0
  20. package/dist/components/FormKitSuffix.vue +3 -3
  21. package/dist/components/FormKitSuffix.vue.d.ts +7 -0
  22. package/dist/components/PrimeAutoComplete.d.vue.ts +31 -0
  23. package/dist/components/PrimeAutoComplete.vue +86 -41
  24. package/dist/components/PrimeAutoComplete.vue.d.ts +31 -0
  25. package/dist/components/PrimeCascadeSelect.d.vue.ts +28 -0
  26. package/dist/components/PrimeCascadeSelect.vue +26 -7
  27. package/dist/components/PrimeCascadeSelect.vue.d.ts +28 -0
  28. package/dist/components/PrimeCheckbox.d.vue.ts +27 -0
  29. package/dist/components/PrimeCheckbox.vue +29 -9
  30. package/dist/components/PrimeCheckbox.vue.d.ts +27 -0
  31. package/dist/components/PrimeColorPicker.d.vue.ts +24 -0
  32. package/dist/components/PrimeColorPicker.vue +22 -7
  33. package/dist/components/PrimeColorPicker.vue.d.ts +24 -0
  34. package/dist/components/PrimeDatePicker.d.vue.ts +63 -0
  35. package/dist/components/PrimeDatePicker.vue +73 -17
  36. package/dist/components/PrimeDatePicker.vue.d.ts +63 -0
  37. package/dist/components/PrimeInputMask.d.vue.ts +28 -0
  38. package/dist/components/PrimeInputMask.vue +29 -10
  39. package/dist/components/PrimeInputMask.vue.d.ts +28 -0
  40. package/dist/components/PrimeInputNumber.d.vue.ts +36 -0
  41. package/dist/components/PrimeInputNumber.vue +56 -21
  42. package/dist/components/PrimeInputNumber.vue.d.ts +36 -0
  43. package/dist/components/PrimeInputOtp.d.vue.ts +26 -0
  44. package/dist/components/PrimeInputOtp.vue +24 -7
  45. package/dist/components/PrimeInputOtp.vue.d.ts +26 -0
  46. package/dist/components/PrimeInputText.d.vue.ts +24 -0
  47. package/dist/components/PrimeInputText.vue +25 -10
  48. package/dist/components/PrimeInputText.vue.d.ts +24 -0
  49. package/dist/components/PrimeKnob.d.vue.ts +31 -0
  50. package/dist/components/PrimeKnob.vue +37 -12
  51. package/dist/components/PrimeKnob.vue.d.ts +31 -0
  52. package/dist/components/PrimeListbox.d.vue.ts +42 -0
  53. package/dist/components/PrimeListbox.vue +39 -7
  54. package/dist/components/PrimeListbox.vue.d.ts +42 -0
  55. package/dist/components/PrimeMultiSelect.d.vue.ts +53 -0
  56. package/dist/components/PrimeMultiSelect.vue +52 -7
  57. package/dist/components/PrimeMultiSelect.vue.d.ts +53 -0
  58. package/dist/components/PrimeOutputBoolean.d.vue.ts +16 -0
  59. package/dist/components/PrimeOutputBoolean.vue +27 -28
  60. package/dist/components/PrimeOutputBoolean.vue.d.ts +16 -0
  61. package/dist/components/PrimeOutputDate.d.vue.ts +16 -0
  62. package/dist/components/PrimeOutputDate.vue +33 -33
  63. package/dist/components/PrimeOutputDate.vue.d.ts +16 -0
  64. package/dist/components/PrimeOutputDuration.d.vue.ts +16 -0
  65. package/dist/components/PrimeOutputDuration.vue +19 -23
  66. package/dist/components/PrimeOutputDuration.vue.d.ts +16 -0
  67. package/dist/components/PrimeOutputLink.d.vue.ts +16 -0
  68. package/dist/components/PrimeOutputLink.vue +27 -29
  69. package/dist/components/PrimeOutputLink.vue.d.ts +16 -0
  70. package/dist/components/PrimeOutputList.d.vue.ts +19 -0
  71. package/dist/components/PrimeOutputList.vue +40 -71
  72. package/dist/components/PrimeOutputList.vue.d.ts +19 -0
  73. package/dist/components/PrimeOutputNumber.d.vue.ts +16 -0
  74. package/dist/components/PrimeOutputNumber.vue +39 -36
  75. package/dist/components/PrimeOutputNumber.vue.d.ts +16 -0
  76. package/dist/components/PrimeOutputReference.d.vue.ts +16 -0
  77. package/dist/components/PrimeOutputReference.vue +30 -32
  78. package/dist/components/PrimeOutputReference.vue.d.ts +16 -0
  79. package/dist/components/PrimeOutputText.d.vue.ts +22 -0
  80. package/dist/components/PrimeOutputText.vue +53 -53
  81. package/dist/components/PrimeOutputText.vue.d.ts +22 -0
  82. package/dist/components/PrimePassword.d.vue.ts +33 -0
  83. package/dist/components/PrimePassword.vue +32 -11
  84. package/dist/components/PrimePassword.vue.d.ts +33 -0
  85. package/dist/components/PrimeRadioButton.d.vue.ts +28 -0
  86. package/dist/components/PrimeRadioButton.vue +29 -19
  87. package/dist/components/PrimeRadioButton.vue.d.ts +28 -0
  88. package/dist/components/PrimeRating.d.vue.ts +24 -0
  89. package/dist/components/PrimeRating.vue +22 -7
  90. package/dist/components/PrimeRating.vue.d.ts +24 -0
  91. package/dist/components/PrimeSelect.d.vue.ts +50 -0
  92. package/dist/components/PrimeSelect.vue +49 -7
  93. package/dist/components/PrimeSelect.vue.d.ts +50 -0
  94. package/dist/components/PrimeSelectButton.d.vue.ts +28 -0
  95. package/dist/components/PrimeSelectButton.vue +27 -7
  96. package/dist/components/PrimeSelectButton.vue.d.ts +28 -0
  97. package/dist/components/PrimeSlider.d.vue.ts +26 -0
  98. package/dist/components/PrimeSlider.vue +28 -10
  99. package/dist/components/PrimeSlider.vue.d.ts +26 -0
  100. package/dist/components/PrimeTextarea.d.vue.ts +25 -0
  101. package/dist/components/PrimeTextarea.vue +23 -7
  102. package/dist/components/PrimeTextarea.vue.d.ts +25 -0
  103. package/dist/components/PrimeToggleButton.d.vue.ts +26 -0
  104. package/dist/components/PrimeToggleButton.vue +25 -7
  105. package/dist/components/PrimeToggleButton.vue.d.ts +26 -0
  106. package/dist/components/PrimeToggleSwitch.d.vue.ts +23 -0
  107. package/dist/components/PrimeToggleSwitch.vue +23 -8
  108. package/dist/components/PrimeToggleSwitch.vue.d.ts +23 -0
  109. package/dist/components/PrimeTreeSelect.d.vue.ts +32 -0
  110. package/dist/components/PrimeTreeSelect.vue +30 -7
  111. package/dist/components/PrimeTreeSelect.vue.d.ts +32 -0
  112. package/dist/components/index.d.ts +23 -23
  113. package/dist/composables/index.d.ts +8 -8
  114. package/dist/composables/index.js +8 -8
  115. package/dist/composables/index.mjs +8 -8
  116. package/dist/composables/useFormKitInput.js +1 -5
  117. package/dist/composables/useFormKitInput.mjs +1 -13
  118. package/dist/composables/useFormKitRepeater.js +1 -1
  119. package/dist/composables/useFormKitRepeater.mjs +17 -45
  120. package/dist/composables/useFormKitSchema.mjs +2 -10
  121. package/dist/composables/useInputEditor.js +4 -4
  122. package/dist/composables/useInputEditor.mjs +24 -52
  123. package/dist/composables/useInputEditorSchema.js +3 -3
  124. package/dist/composables/useInputEditorSchema.mjs +17 -25
  125. package/dist/composables/useOutputDuration.mjs +6 -3
  126. package/dist/definitions/index.js +2 -2
  127. package/dist/definitions/index.mjs +2 -2
  128. package/dist/definitions/input.d.ts +1 -1
  129. package/dist/definitions/input.mjs +15 -301
  130. package/dist/definitions/output.d.ts +1 -1
  131. package/dist/definitions/output.js +1 -1
  132. package/dist/definitions/output.mjs +14 -95
  133. package/dist/index.d.ts +48 -48
  134. package/dist/index.js +12 -12
  135. package/dist/index.mjs +3 -9
  136. package/dist/plugins/index.d.ts +1 -1
  137. package/dist/plugins/index.mjs +27 -31
  138. package/dist/sass/formkit-primevue.scss +101 -99
  139. package/package.json +88 -51
  140. package/dist/vue.d.ts +0 -5
@@ -1,72 +1,72 @@
1
- <script setup>
2
- import { computed } from "vue";
3
- import { useI18n } from "vue-i18n";
4
- import { useFormKitSection } from "../composables/index.ts";
5
- import FormKitIcon from "./FormKitIcon.vue";
6
- import FormKitPrefix from "./FormKitPrefix.vue";
7
- import FormKitSuffix from "./FormKitSuffix.vue";
1
+ <script setup lang='ts'>
2
+ import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { PropType } from 'vue'
4
+ import type { FormKitIconProps } from './FormKitIcon.vue'
5
+ import { computed } from 'vue'
6
+ import { useI18n } from 'vue-i18n'
7
+ import { useFormKitSection } from '../composables'
8
+ import FormKitIcon from './FormKitIcon.vue'
9
+ import FormKitPrefix from './FormKitPrefix.vue'
10
+ import FormKitSuffix from './FormKitSuffix.vue'
11
+
12
+ export interface FormKitOutputTextProps {
13
+ html?: boolean
14
+ isTranslationKey?: boolean
15
+ convertValue?: (value: string) => string
16
+ maxLength?: number
17
+ }
18
+
8
19
  const props = defineProps({
9
20
  context: {
10
- type: Object,
11
- required: true
12
- }
13
- });
21
+ type: Object as PropType<FormKitFrameworkContext> & FormKitIconProps & FormKitOutputTextProps,
22
+ required: true,
23
+ },
24
+ })
25
+
14
26
  const textValue = computed(() => {
15
- const value = props.context?._value;
16
- const { t } = useI18n();
17
- let result = "";
27
+ const value = props.context?._value
28
+ const { t } = useI18n()
29
+ let result = ''
18
30
  if (value) {
19
31
  if (props.context?.isTranslationKey) {
20
- result = t(value);
21
- } else if (typeof props.context?.convertValue === "function") {
22
- result = props.context?.convertValue(value);
23
- } else {
24
- result = value;
32
+ result = t(value)
33
+ }
34
+ else if (typeof props.context?.convertValue === 'function') {
35
+ result = props.context?.convertValue(value)
36
+ }
37
+ else {
38
+ result = value
25
39
  }
26
40
  }
27
- const maxLength = props.context?.maxLength;
41
+
42
+ // Apply maxLength truncation if specified
43
+ const maxLength = props.context?.maxLength as number | undefined
28
44
  if (result && maxLength && !props.context?.html && result.length > maxLength) {
29
- let truncated = result.substring(0, maxLength);
30
- const lastSpaceIndex = truncated.lastIndexOf(" ");
45
+ // Try to truncate at word boundary
46
+ let truncated = result.substring(0, maxLength)
47
+ const lastSpaceIndex = truncated.lastIndexOf(' ')
48
+
49
+ // Only truncate at word boundary if there's a space, and it's not too far back
50
+ // (at least 80% of maxLength to avoid cutting too much)
31
51
  if (lastSpaceIndex > maxLength * 0.8) {
32
- truncated = truncated.substring(0, lastSpaceIndex);
52
+ truncated = truncated.substring(0, lastSpaceIndex)
33
53
  }
34
- result = `${truncated}...`;
54
+ result = `${truncated}...`
35
55
  }
36
- return result;
37
- });
38
- const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
56
+
57
+ return result
58
+ })
59
+
60
+ const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
39
61
  </script>
40
62
 
41
63
  <template>
42
64
  <div class="p-formkit p-output-text">
43
- <FormKitIcon
44
- v-if="hasPrefixIcon"
45
- :icon-class="context?.iconPrefix as string"
46
- :on-click="context?.onIconPrefixClicked as () => void"
47
- position="prefix"
48
- />
65
+ <FormKitIcon v-if="hasPrefixIcon" :icon-class="context?.iconPrefix as string" :on-click="context?.onIconPrefixClicked as (() => void)" position="prefix" />
49
66
  <FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
50
- <span
51
- v-if="context?.html"
52
- :id="context?.id"
53
- :class="context?.attrs?.class"
54
- :style="context?.attrs?.style"
55
- v-html="textValue"
56
- />
57
- <span
58
- v-else
59
- :id="context?.id"
60
- :class="context?.attrs?.class"
61
- :style="context?.attrs?.style"
62
- v-text="textValue"
63
- />
67
+ <span v-if="context?.html" :id="context?.id" :class="context?.attrs?.class" :style="context?.attrs?.style" v-html="textValue" />
68
+ <span v-else :id="context?.id" :class="context?.attrs?.class" :style="context?.attrs?.style" v-text="textValue" />
64
69
  <FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
65
- <FormKitIcon
66
- v-if="hasSuffixIcon"
67
- :icon-class="context?.iconSuffix as string"
68
- :on-click="context?.onIconSuffixClicked as () => void"
69
- position="suffix"
70
- />
70
+ <FormKitIcon v-if="hasSuffixIcon" :icon-class="context?.iconSuffix as string" :on-click="context?.onIconSuffixClicked as (() => void)" position="suffix" />
71
71
  </div>
72
72
  </template>
@@ -0,0 +1,22 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FormKitIcon.vue';
4
+ export interface FormKitOutputTextProps {
5
+ html?: boolean;
6
+ isTranslationKey?: boolean;
7
+ convertValue?: (value: string) => string;
8
+ maxLength?: number;
9
+ }
10
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ context: {
12
+ type: PropType<FormKitFrameworkContext> & FormKitIconProps & FormKitOutputTextProps;
13
+ required: true;
14
+ };
15
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ context: {
17
+ type: PropType<FormKitFrameworkContext> & FormKitIconProps & FormKitOutputTextProps;
18
+ required: true;
19
+ };
20
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PasswordProps } from 'primevue/password';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimePasswordProps {
5
+ mediumRegex?: PasswordProps['mediumRegex'];
6
+ strongRegex?: PasswordProps['strongRegex'];
7
+ promptLabel?: PasswordProps['promptLabel'];
8
+ weakLabel?: PasswordProps['weakLabel'];
9
+ mediumLabel?: PasswordProps['mediumLabel'];
10
+ strongLabel?: PasswordProps['strongLabel'];
11
+ maskIcon?: PasswordProps['maskIcon'];
12
+ unmaskIcon?: PasswordProps['unmaskIcon'];
13
+ pt?: PasswordProps['pt'];
14
+ ptOptions?: PasswordProps['ptOptions'];
15
+ unstyled?: PasswordProps['unstyled'];
16
+ placeholder?: PasswordProps['placeholder'];
17
+ feedback?: PasswordProps['feedback'];
18
+ toggleMask?: PasswordProps['toggleMask'];
19
+ size?: PasswordProps['size'];
20
+ }
21
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
22
+ context: {
23
+ type: PropType<FormKitFrameworkContext & FormKitPrimePasswordProps>;
24
+ required: true;
25
+ };
26
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
+ context: {
28
+ type: PropType<FormKitFrameworkContext & FormKitPrimePasswordProps>;
29
+ required: true;
30
+ };
31
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
@@ -1,12 +1,36 @@
1
- <script setup>
2
- import { useFormKitInput } from "../composables/index.ts";
1
+ <script setup lang='ts'>
2
+ import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { PasswordProps } from 'primevue/password'
4
+
5
+ import type { PropType } from 'vue'
6
+ import { useFormKitInput } from '../composables'
7
+
8
+ export interface FormKitPrimePasswordProps {
9
+ mediumRegex?: PasswordProps['mediumRegex']
10
+ strongRegex?: PasswordProps['strongRegex']
11
+ promptLabel?: PasswordProps['promptLabel']
12
+ weakLabel?: PasswordProps['weakLabel']
13
+ mediumLabel?: PasswordProps['mediumLabel']
14
+ strongLabel?: PasswordProps['strongLabel']
15
+ maskIcon?: PasswordProps['maskIcon']
16
+ unmaskIcon?: PasswordProps['unmaskIcon']
17
+ pt?: PasswordProps['pt']
18
+ ptOptions?: PasswordProps['ptOptions']
19
+ unstyled?: PasswordProps['unstyled']
20
+ placeholder?: PasswordProps['placeholder']
21
+ feedback?: PasswordProps['feedback']
22
+ toggleMask?: PasswordProps['toggleMask']
23
+ size?: PasswordProps['size']
24
+ }
25
+
3
26
  const props = defineProps({
4
27
  context: {
5
- type: Object,
6
- required: true
7
- }
8
- });
9
- const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
28
+ type: Object as PropType<FormKitFrameworkContext & FormKitPrimePasswordProps>,
29
+ required: true,
30
+ },
31
+ })
32
+
33
+ const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
10
34
  </script>
11
35
 
12
36
  <template>
@@ -25,10 +49,7 @@ const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue
25
49
  :aria-labelledby="context?.attrs.ariaLabelledby"
26
50
  :size="context?.size ?? undefined"
27
51
  :placeholder="context.placeholder"
28
- :medium-regex="
29
- context.mediumRegex ??
30
- '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})'
31
- "
52
+ :medium-regex="context.mediumRegex ?? '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})'"
32
53
  :strong-regex="context.strongRegex ?? '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})'"
33
54
  :prompt-label="context.promptLabel"
34
55
  :weak-label="context.weakLabel"
@@ -0,0 +1,33 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PasswordProps } from 'primevue/password';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimePasswordProps {
5
+ mediumRegex?: PasswordProps['mediumRegex'];
6
+ strongRegex?: PasswordProps['strongRegex'];
7
+ promptLabel?: PasswordProps['promptLabel'];
8
+ weakLabel?: PasswordProps['weakLabel'];
9
+ mediumLabel?: PasswordProps['mediumLabel'];
10
+ strongLabel?: PasswordProps['strongLabel'];
11
+ maskIcon?: PasswordProps['maskIcon'];
12
+ unmaskIcon?: PasswordProps['unmaskIcon'];
13
+ pt?: PasswordProps['pt'];
14
+ ptOptions?: PasswordProps['ptOptions'];
15
+ unstyled?: PasswordProps['unstyled'];
16
+ placeholder?: PasswordProps['placeholder'];
17
+ feedback?: PasswordProps['feedback'];
18
+ toggleMask?: PasswordProps['toggleMask'];
19
+ size?: PasswordProps['size'];
20
+ }
21
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
22
+ context: {
23
+ type: PropType<FormKitFrameworkContext & FormKitPrimePasswordProps>;
24
+ required: true;
25
+ };
26
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
+ context: {
28
+ type: PropType<FormKitFrameworkContext & FormKitPrimePasswordProps>;
29
+ required: true;
30
+ };
31
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { RadioButtonProps } from 'primevue/radiobutton';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimeRadioButtonProps {
5
+ pt?: RadioButtonProps['pt'];
6
+ ptOptions?: RadioButtonProps['ptOptions'];
7
+ unstyled?: RadioButtonProps['unstyled'];
8
+ size?: RadioButtonProps['size'];
9
+ options?: {
10
+ label: string;
11
+ value: any;
12
+ }[];
13
+ optionsClass?: string;
14
+ optionClass?: string;
15
+ }
16
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
+ context: {
18
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRadioButtonProps>;
19
+ required: true;
20
+ };
21
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ context: {
23
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRadioButtonProps>;
24
+ required: true;
25
+ };
26
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -1,28 +1,38 @@
1
- <script setup>
2
- import { computed } from "vue";
3
- import { useFormKitInput } from "../composables/index.ts";
1
+ <script setup lang='ts'>
2
+ import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { RadioButtonProps } from 'primevue/radiobutton'
4
+
5
+ import type { PropType } from 'vue'
6
+ import { computed } from 'vue'
7
+ import { useFormKitInput } from '../composables'
8
+
9
+ export interface FormKitPrimeRadioButtonProps {
10
+ pt?: RadioButtonProps['pt']
11
+ ptOptions?: RadioButtonProps['ptOptions']
12
+ unstyled?: RadioButtonProps['unstyled']
13
+ size?: RadioButtonProps['size']
14
+ options?: { label: string, value: any }[]
15
+ optionsClass?: string
16
+ optionClass?: string
17
+ }
18
+
4
19
  const props = defineProps({
5
20
  context: {
6
- type: Object,
7
- required: true
8
- }
9
- });
10
- const { unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(
11
- props.context
12
- );
13
- const optionsClass = computed(() => props.context?.optionsClass ?? "");
14
- const optionClass = computed(() => props.context?.optionClass ?? "");
15
- const labelClass = computed(() => props.context?.labelClass ?? "");
21
+ type: Object as PropType<FormKitFrameworkContext & FormKitPrimeRadioButtonProps>,
22
+ required: true,
23
+ },
24
+ })
25
+
26
+ const { unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context)
27
+
28
+ const optionsClass = computed(() => props.context?.optionsClass ?? '')
29
+ const optionClass = computed(() => props.context?.optionClass ?? '')
30
+ const labelClass = computed(() => props.context?.labelClass ?? '')
16
31
  </script>
17
32
 
18
33
  <template>
19
34
  <div class="p-formkit p-formkit-options" :class="optionsClass">
20
- <div
21
- v-for="option in context.options"
22
- :key="option.value"
23
- class="p-formkit-option"
24
- :class="optionClass"
25
- >
35
+ <div v-for="option in context.options" :key="option.value" class="p-formkit-option" :class="optionClass">
26
36
  <RadioButton
27
37
  :id="context.id"
28
38
  v-model="modelValue"
@@ -0,0 +1,28 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { RadioButtonProps } from 'primevue/radiobutton';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimeRadioButtonProps {
5
+ pt?: RadioButtonProps['pt'];
6
+ ptOptions?: RadioButtonProps['ptOptions'];
7
+ unstyled?: RadioButtonProps['unstyled'];
8
+ size?: RadioButtonProps['size'];
9
+ options?: {
10
+ label: string;
11
+ value: any;
12
+ }[];
13
+ optionsClass?: string;
14
+ optionClass?: string;
15
+ }
16
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
+ context: {
18
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRadioButtonProps>;
19
+ required: true;
20
+ };
21
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ context: {
23
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRadioButtonProps>;
24
+ required: true;
25
+ };
26
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { RatingProps } from 'primevue/rating';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimeRatingProps {
5
+ unstyled?: RatingProps['unstyled'];
6
+ stars?: RatingProps['stars'];
7
+ onIcon?: RatingProps['onIcon'];
8
+ offIcon?: RatingProps['offIcon'];
9
+ ptOptions?: RatingProps['ptOptions'];
10
+ pt?: RatingProps['pt'];
11
+ }
12
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
+ context: {
14
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRatingProps>;
15
+ required: true;
16
+ };
17
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
+ context: {
19
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRatingProps>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -1,12 +1,27 @@
1
- <script setup>
2
- import { useFormKitInput } from "../composables/index.ts";
1
+ <script setup lang='ts'>
2
+ import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { RatingProps } from 'primevue/rating'
4
+
5
+ import type { PropType } from 'vue'
6
+ import { useFormKitInput } from '../composables'
7
+
8
+ export interface FormKitPrimeRatingProps {
9
+ unstyled?: RatingProps['unstyled']
10
+ stars?: RatingProps['stars']
11
+ onIcon?: RatingProps['onIcon']
12
+ offIcon?: RatingProps['offIcon']
13
+ ptOptions?: RatingProps['ptOptions']
14
+ pt?: RatingProps['pt']
15
+ }
16
+
3
17
  const props = defineProps({
4
18
  context: {
5
- type: Object,
6
- required: true
7
- }
8
- });
9
- const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
19
+ type: Object as PropType<FormKitFrameworkContext & FormKitPrimeRatingProps>,
20
+ required: true,
21
+ },
22
+ })
23
+
24
+ const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
10
25
  </script>
11
26
 
12
27
  <template>
@@ -0,0 +1,24 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { RatingProps } from 'primevue/rating';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimeRatingProps {
5
+ unstyled?: RatingProps['unstyled'];
6
+ stars?: RatingProps['stars'];
7
+ onIcon?: RatingProps['onIcon'];
8
+ offIcon?: RatingProps['offIcon'];
9
+ ptOptions?: RatingProps['ptOptions'];
10
+ pt?: RatingProps['pt'];
11
+ }
12
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
+ context: {
14
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRatingProps>;
15
+ required: true;
16
+ };
17
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
+ context: {
19
+ type: PropType<FormKitFrameworkContext & FormKitPrimeRatingProps>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,50 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { SelectProps } from 'primevue/select';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimeSelectProps {
5
+ options?: SelectProps['options'];
6
+ optionLabel?: SelectProps['optionLabel'];
7
+ optionValue?: SelectProps['optionValue'];
8
+ optionDisabled?: SelectProps['optionDisabled'];
9
+ optionGroupLabel?: SelectProps['optionGroupLabel'];
10
+ optionGroupChildren?: SelectProps['optionGroupChildren'];
11
+ scrollHeight?: SelectProps['scrollHeight'];
12
+ filter?: SelectProps['filter'];
13
+ filterPlaceholder?: SelectProps['filterPlaceholder'];
14
+ filterLocale?: SelectProps['filterLocale'];
15
+ filterMatchMode?: SelectProps['filterMatchMode'];
16
+ filterFields?: SelectProps['filterFields'];
17
+ editable?: SelectProps['editable'];
18
+ placeholder?: SelectProps['placeholder'];
19
+ dataKey?: SelectProps['dataKey'];
20
+ showClear?: SelectProps['showClear'];
21
+ overlayStyle?: SelectProps['overlayStyle'];
22
+ overlayClass?: SelectProps['overlayClass'];
23
+ appendTo?: SelectProps['appendTo'];
24
+ resetFilterOnHide?: SelectProps['resetFilterOnHide'];
25
+ virtualScrollerOptions?: SelectProps['virtualScrollerOptions'];
26
+ autoOptionFocus?: SelectProps['autoOptionFocus'];
27
+ selectOnFocus?: SelectProps['selectOnFocus'];
28
+ filterMessage?: SelectProps['filterMessage'];
29
+ selectionMessage?: SelectProps['selectionMessage'];
30
+ emptySelectionMessage?: SelectProps['emptySelectionMessage'];
31
+ emptyFilterMessage?: SelectProps['emptyFilterMessage'];
32
+ emptyMessage?: SelectProps['emptyMessage'];
33
+ pt?: SelectProps['pt'];
34
+ ptOptions?: SelectProps['ptOptions'];
35
+ unstyled?: SelectProps['unstyled'];
36
+ size?: SelectProps['size'];
37
+ }
38
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
39
+ context: {
40
+ type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
41
+ required: true;
42
+ };
43
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
+ context: {
45
+ type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
46
+ required: true;
47
+ };
48
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
@@ -1,12 +1,54 @@
1
- <script setup>
2
- import { useFormKitInput } from "../composables/index.ts";
1
+ <script setup lang="ts">
2
+ import type { FormKitFrameworkContext } from '@formkit/core'
3
+ import type { SelectProps } from 'primevue/select'
4
+
5
+ import type { PropType } from 'vue'
6
+ import { useFormKitInput } from '../composables'
7
+
8
+ export interface FormKitPrimeSelectProps {
9
+ options?: SelectProps['options']
10
+ optionLabel?: SelectProps['optionLabel']
11
+ optionValue?: SelectProps['optionValue']
12
+ optionDisabled?: SelectProps['optionDisabled']
13
+ optionGroupLabel?: SelectProps['optionGroupLabel']
14
+ optionGroupChildren?: SelectProps['optionGroupChildren']
15
+ scrollHeight?: SelectProps['scrollHeight']
16
+ filter?: SelectProps['filter']
17
+ filterPlaceholder?: SelectProps['filterPlaceholder']
18
+ filterLocale?: SelectProps['filterLocale']
19
+ filterMatchMode?: SelectProps['filterMatchMode']
20
+ filterFields?: SelectProps['filterFields']
21
+ editable?: SelectProps['editable']
22
+ placeholder?: SelectProps['placeholder']
23
+ dataKey?: SelectProps['dataKey']
24
+ showClear?: SelectProps['showClear']
25
+ overlayStyle?: SelectProps['overlayStyle']
26
+ overlayClass?: SelectProps['overlayClass']
27
+ appendTo?: SelectProps['appendTo']
28
+ resetFilterOnHide?: SelectProps['resetFilterOnHide']
29
+ virtualScrollerOptions?: SelectProps['virtualScrollerOptions']
30
+ autoOptionFocus?: SelectProps['autoOptionFocus']
31
+ selectOnFocus?: SelectProps['selectOnFocus']
32
+ filterMessage?: SelectProps['filterMessage']
33
+ selectionMessage?: SelectProps['selectionMessage']
34
+ emptySelectionMessage?: SelectProps['emptySelectionMessage']
35
+ emptyFilterMessage?: SelectProps['emptyFilterMessage']
36
+ emptyMessage?: SelectProps['emptyMessage']
37
+ pt?: SelectProps['pt']
38
+ ptOptions?: SelectProps['ptOptions']
39
+ unstyled?: SelectProps['unstyled']
40
+ size?: SelectProps['size']
41
+
42
+ }
43
+
3
44
  const props = defineProps({
4
45
  context: {
5
- type: Object,
6
- required: true
7
- }
8
- });
9
- const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
46
+ type: Object as PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>,
47
+ required: true,
48
+ },
49
+ })
50
+
51
+ const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
10
52
  </script>
11
53
 
12
54
  <template>
@@ -0,0 +1,50 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { SelectProps } from 'primevue/select';
3
+ import type { PropType } from 'vue';
4
+ export interface FormKitPrimeSelectProps {
5
+ options?: SelectProps['options'];
6
+ optionLabel?: SelectProps['optionLabel'];
7
+ optionValue?: SelectProps['optionValue'];
8
+ optionDisabled?: SelectProps['optionDisabled'];
9
+ optionGroupLabel?: SelectProps['optionGroupLabel'];
10
+ optionGroupChildren?: SelectProps['optionGroupChildren'];
11
+ scrollHeight?: SelectProps['scrollHeight'];
12
+ filter?: SelectProps['filter'];
13
+ filterPlaceholder?: SelectProps['filterPlaceholder'];
14
+ filterLocale?: SelectProps['filterLocale'];
15
+ filterMatchMode?: SelectProps['filterMatchMode'];
16
+ filterFields?: SelectProps['filterFields'];
17
+ editable?: SelectProps['editable'];
18
+ placeholder?: SelectProps['placeholder'];
19
+ dataKey?: SelectProps['dataKey'];
20
+ showClear?: SelectProps['showClear'];
21
+ overlayStyle?: SelectProps['overlayStyle'];
22
+ overlayClass?: SelectProps['overlayClass'];
23
+ appendTo?: SelectProps['appendTo'];
24
+ resetFilterOnHide?: SelectProps['resetFilterOnHide'];
25
+ virtualScrollerOptions?: SelectProps['virtualScrollerOptions'];
26
+ autoOptionFocus?: SelectProps['autoOptionFocus'];
27
+ selectOnFocus?: SelectProps['selectOnFocus'];
28
+ filterMessage?: SelectProps['filterMessage'];
29
+ selectionMessage?: SelectProps['selectionMessage'];
30
+ emptySelectionMessage?: SelectProps['emptySelectionMessage'];
31
+ emptyFilterMessage?: SelectProps['emptyFilterMessage'];
32
+ emptyMessage?: SelectProps['emptyMessage'];
33
+ pt?: SelectProps['pt'];
34
+ ptOptions?: SelectProps['ptOptions'];
35
+ unstyled?: SelectProps['unstyled'];
36
+ size?: SelectProps['size'];
37
+ }
38
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
39
+ context: {
40
+ type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
41
+ required: true;
42
+ };
43
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
+ context: {
45
+ type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
46
+ required: true;
47
+ };
48
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;