@sfxcode/formkit-nuxt-ui 0.7.2

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 (106) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +385 -0
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.json +12 -0
  5. package/dist/module.mjs +29 -0
  6. package/dist/runtime/components/FUDataDebug.d.vue.ts +43 -0
  7. package/dist/runtime/components/FUDataDebug.vue +30 -0
  8. package/dist/runtime/components/FUDataDebug.vue.d.ts +43 -0
  9. package/dist/runtime/components/FUDataEdit.d.vue.ts +180 -0
  10. package/dist/runtime/components/FUDataEdit.vue +141 -0
  11. package/dist/runtime/components/FUDataEdit.vue.d.ts +180 -0
  12. package/dist/runtime/components/FUDataView.d.vue.ts +73 -0
  13. package/dist/runtime/components/FUDataView.vue +49 -0
  14. package/dist/runtime/components/FUDataView.vue.d.ts +73 -0
  15. package/dist/runtime/components/inputs/FUCheckbox.d.vue.ts +27 -0
  16. package/dist/runtime/components/inputs/FUCheckbox.vue +33 -0
  17. package/dist/runtime/components/inputs/FUCheckbox.vue.d.ts +27 -0
  18. package/dist/runtime/components/inputs/FUCheckboxGroup.d.vue.ts +38 -0
  19. package/dist/runtime/components/inputs/FUCheckboxGroup.vue +34 -0
  20. package/dist/runtime/components/inputs/FUCheckboxGroup.vue.d.ts +38 -0
  21. package/dist/runtime/components/inputs/FUColorPicker.d.vue.ts +22 -0
  22. package/dist/runtime/components/inputs/FUColorPicker.vue +27 -0
  23. package/dist/runtime/components/inputs/FUColorPicker.vue.d.ts +22 -0
  24. package/dist/runtime/components/inputs/FUInput.d.vue.ts +44 -0
  25. package/dist/runtime/components/inputs/FUInput.vue +50 -0
  26. package/dist/runtime/components/inputs/FUInput.vue.d.ts +44 -0
  27. package/dist/runtime/components/inputs/FUInputDate.d.vue.ts +51 -0
  28. package/dist/runtime/components/inputs/FUInputDate.vue +52 -0
  29. package/dist/runtime/components/inputs/FUInputDate.vue.d.ts +51 -0
  30. package/dist/runtime/components/inputs/FUInputMenu.d.vue.ts +73 -0
  31. package/dist/runtime/components/inputs/FUInputMenu.vue +65 -0
  32. package/dist/runtime/components/inputs/FUInputMenu.vue.d.ts +73 -0
  33. package/dist/runtime/components/inputs/FUInputNumber.d.vue.ts +43 -0
  34. package/dist/runtime/components/inputs/FUInputNumber.vue +49 -0
  35. package/dist/runtime/components/inputs/FUInputNumber.vue.d.ts +43 -0
  36. package/dist/runtime/components/inputs/FUInputTags.d.vue.ts +47 -0
  37. package/dist/runtime/components/inputs/FUInputTags.vue +53 -0
  38. package/dist/runtime/components/inputs/FUInputTags.vue.d.ts +47 -0
  39. package/dist/runtime/components/inputs/FUInputTime.d.vue.ts +50 -0
  40. package/dist/runtime/components/inputs/FUInputTime.vue +50 -0
  41. package/dist/runtime/components/inputs/FUInputTime.vue.d.ts +50 -0
  42. package/dist/runtime/components/inputs/FUPinInput.d.vue.ts +30 -0
  43. package/dist/runtime/components/inputs/FUPinInput.vue +37 -0
  44. package/dist/runtime/components/inputs/FUPinInput.vue.d.ts +30 -0
  45. package/dist/runtime/components/inputs/FURadioGroup.d.vue.ts +37 -0
  46. package/dist/runtime/components/inputs/FURadioGroup.vue +35 -0
  47. package/dist/runtime/components/inputs/FURadioGroup.vue.d.ts +37 -0
  48. package/dist/runtime/components/inputs/FUSelect.d.vue.ts +48 -0
  49. package/dist/runtime/components/inputs/FUSelect.vue +51 -0
  50. package/dist/runtime/components/inputs/FUSelect.vue.d.ts +48 -0
  51. package/dist/runtime/components/inputs/FUSelectMenu.d.vue.ts +73 -0
  52. package/dist/runtime/components/inputs/FUSelectMenu.vue +62 -0
  53. package/dist/runtime/components/inputs/FUSelectMenu.vue.d.ts +73 -0
  54. package/dist/runtime/components/inputs/FUSlider.d.vue.ts +29 -0
  55. package/dist/runtime/components/inputs/FUSlider.vue +36 -0
  56. package/dist/runtime/components/inputs/FUSlider.vue.d.ts +29 -0
  57. package/dist/runtime/components/inputs/FUSwitch.d.vue.ts +28 -0
  58. package/dist/runtime/components/inputs/FUSwitch.vue +34 -0
  59. package/dist/runtime/components/inputs/FUSwitch.vue.d.ts +28 -0
  60. package/dist/runtime/components/inputs/FUTextarea.d.vue.ts +44 -0
  61. package/dist/runtime/components/inputs/FUTextarea.vue +50 -0
  62. package/dist/runtime/components/inputs/FUTextarea.vue.d.ts +44 -0
  63. package/dist/runtime/components/output/FUIcon.d.vue.ts +38 -0
  64. package/dist/runtime/components/output/FUIcon.vue +21 -0
  65. package/dist/runtime/components/output/FUIcon.vue.d.ts +38 -0
  66. package/dist/runtime/components/output/FUOutputBoolean.d.vue.ts +30 -0
  67. package/dist/runtime/components/output/FUOutputBoolean.vue +56 -0
  68. package/dist/runtime/components/output/FUOutputBoolean.vue.d.ts +30 -0
  69. package/dist/runtime/components/output/FUOutputDate.d.vue.ts +30 -0
  70. package/dist/runtime/components/output/FUOutputDate.vue +52 -0
  71. package/dist/runtime/components/output/FUOutputDate.vue.d.ts +30 -0
  72. package/dist/runtime/components/output/FUOutputLink.d.vue.ts +28 -0
  73. package/dist/runtime/components/output/FUOutputLink.vue +78 -0
  74. package/dist/runtime/components/output/FUOutputLink.vue.d.ts +28 -0
  75. package/dist/runtime/components/output/FUOutputList.d.vue.ts +29 -0
  76. package/dist/runtime/components/output/FUOutputList.vue +143 -0
  77. package/dist/runtime/components/output/FUOutputList.vue.d.ts +29 -0
  78. package/dist/runtime/components/output/FUOutputNumber.d.vue.ts +28 -0
  79. package/dist/runtime/components/output/FUOutputNumber.vue +52 -0
  80. package/dist/runtime/components/output/FUOutputNumber.vue.d.ts +28 -0
  81. package/dist/runtime/components/output/FUOutputText.d.vue.ts +26 -0
  82. package/dist/runtime/components/output/FUOutputText.vue +35 -0
  83. package/dist/runtime/components/output/FUOutputText.vue.d.ts +26 -0
  84. package/dist/runtime/composables/useFormKitRepeater.d.ts +5 -0
  85. package/dist/runtime/composables/useFormKitRepeater.js +54 -0
  86. package/dist/runtime/composables/useFormKitSchema.d.ts +26 -0
  87. package/dist/runtime/composables/useFormKitSchema.js +58 -0
  88. package/dist/runtime/definitions/index.d.ts +26 -0
  89. package/dist/runtime/definitions/index.js +28 -0
  90. package/dist/runtime/definitions/input.d.ts +17 -0
  91. package/dist/runtime/definitions/input.js +81 -0
  92. package/dist/runtime/definitions/output.d.ts +7 -0
  93. package/dist/runtime/definitions/output.js +31 -0
  94. package/dist/runtime/formkit.config.d.ts +3 -0
  95. package/dist/runtime/formkit.config.js +33 -0
  96. package/dist/runtime/plugin.d.ts +2 -0
  97. package/dist/runtime/plugin.js +5 -0
  98. package/dist/runtime/plugins/index.d.ts +3 -0
  99. package/dist/runtime/plugins/index.js +55 -0
  100. package/dist/runtime/server/tsconfig.json +3 -0
  101. package/dist/runtime/utils/useFormKitInput.d.ts +13 -0
  102. package/dist/runtime/utils/useFormKitInput.js +42 -0
  103. package/dist/runtime/utils/useFormKitOutput.d.ts +10 -0
  104. package/dist/runtime/utils/useFormKitOutput.js +73 -0
  105. package/dist/types.d.mts +3 -0
  106. package/package.json +91 -0
@@ -0,0 +1,30 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitPinInputProps {
4
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
5
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ length?: string | number;
8
+ autofocus?: boolean;
9
+ autofocusDelay?: number;
10
+ highlight?: boolean;
11
+ fixed?: boolean;
12
+ defaultValue?: string[] | undefined;
13
+ mask?: boolean;
14
+ otp?: boolean;
15
+ placeholder?: string;
16
+ ui?: Record<string, unknown>;
17
+ }
18
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
+ context: {
20
+ type: PropType<FormKitFrameworkContext & FormKitPinInputProps>;
21
+ required: true;
22
+ };
23
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
+ context: {
25
+ type: PropType<FormKitFrameworkContext & FormKitPinInputProps>;
26
+ required: true;
27
+ };
28
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface RadioOption {
4
+ value: string | number | boolean;
5
+ label?: string;
6
+ description?: string;
7
+ disabled?: boolean;
8
+ [key: string]: unknown;
9
+ }
10
+ export interface FormKitRadioGroupProps {
11
+ options?: RadioOption[];
12
+ legend?: string;
13
+ valueKey?: string;
14
+ labelKey?: string;
15
+ descriptionKey?: string;
16
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
+ variant?: 'table' | 'list' | 'card';
18
+ orientation?: 'horizontal' | 'vertical';
19
+ loop?: boolean;
20
+ name?: string;
21
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
22
+ indicator?: 'start' | 'end' | 'hidden';
23
+ ui?: Record<string, unknown>;
24
+ }
25
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
26
+ context: {
27
+ type: PropType<FormKitFrameworkContext & FormKitRadioGroupProps>;
28
+ required: true;
29
+ };
30
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
+ context: {
32
+ type: PropType<FormKitFrameworkContext & FormKitRadioGroupProps>;
33
+ required: true;
34
+ };
35
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
@@ -0,0 +1,35 @@
1
+ <script setup>
2
+ import { useFormKitInput } from "../../utils/useFormKitInput";
3
+ const props = defineProps({
4
+ context: {
5
+ type: Object,
6
+ required: true
7
+ }
8
+ });
9
+ const { handleInput, handleChange, styleClass, color, modelValue, items } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <URadioGroup
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :style="context?.attrs.style"
20
+ :color="color"
21
+ :size="context.size ?? 'md'"
22
+ :variant="context.variant ?? 'list'"
23
+ :orientation="context.orientation ?? 'vertical'"
24
+ :items="items"
25
+ :legend="context.legend"
26
+ :value-key="context.valueKey"
27
+ :label-key="context.labelKey"
28
+ :description-key="context.descriptionKey"
29
+ :loop="context.loop ?? false"
30
+ :name="context.name"
31
+ :ui="context.ui"
32
+ @change="handleChange"
33
+ @update:model-value="handleInput"
34
+ />
35
+ </template>
@@ -0,0 +1,37 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface RadioOption {
4
+ value: string | number | boolean;
5
+ label?: string;
6
+ description?: string;
7
+ disabled?: boolean;
8
+ [key: string]: unknown;
9
+ }
10
+ export interface FormKitRadioGroupProps {
11
+ options?: RadioOption[];
12
+ legend?: string;
13
+ valueKey?: string;
14
+ labelKey?: string;
15
+ descriptionKey?: string;
16
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
+ variant?: 'table' | 'list' | 'card';
18
+ orientation?: 'horizontal' | 'vertical';
19
+ loop?: boolean;
20
+ name?: string;
21
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
22
+ indicator?: 'start' | 'end' | 'hidden';
23
+ ui?: Record<string, unknown>;
24
+ }
25
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
26
+ context: {
27
+ type: PropType<FormKitFrameworkContext & FormKitRadioGroupProps>;
28
+ required: true;
29
+ };
30
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
+ context: {
32
+ type: PropType<FormKitFrameworkContext & FormKitRadioGroupProps>;
33
+ required: true;
34
+ };
35
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { SelectMenuItem } from '#ui/components/SelectMenu.vue';
4
+ import type { AvatarProps } from '#ui/components/Avatar.vue';
5
+ export interface FormKitSelectProps {
6
+ options?: string[] | SelectMenuItem[] | SelectMenuItem[][];
7
+ placeholder?: string;
8
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
9
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
10
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
+ selectedIcon?: string;
12
+ arrow?: boolean;
13
+ portal?: boolean;
14
+ valueKey?: string;
15
+ labelKey?: string;
16
+ descriptionKey?: string;
17
+ defaultValue?: unknown;
18
+ multiple?: boolean;
19
+ highlight?: boolean;
20
+ fixed?: boolean;
21
+ autofocus?: boolean;
22
+ autofocusDelay?: number;
23
+ open?: boolean;
24
+ defaultOpen?: boolean;
25
+ autocomplete?: string & {} | 'on' | 'off';
26
+ icon?: string;
27
+ avatar?: AvatarProps;
28
+ leading?: boolean;
29
+ leadingIcon?: string;
30
+ trailing?: boolean;
31
+ trailingIcon?: string;
32
+ loading?: boolean;
33
+ loadingIcon?: string;
34
+ ui?: Record<string, unknown>;
35
+ }
36
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
37
+ context: {
38
+ type: PropType<FormKitFrameworkContext & FormKitSelectProps>;
39
+ required: true;
40
+ };
41
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
42
+ context: {
43
+ type: PropType<FormKitFrameworkContext & FormKitSelectProps>;
44
+ required: true;
45
+ };
46
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
@@ -0,0 +1,51 @@
1
+ <script setup>
2
+ import { useFormKitInput } from "../../utils/useFormKitInput";
3
+ const props = defineProps({
4
+ context: {
5
+ type: Object,
6
+ required: true
7
+ }
8
+ });
9
+ const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, items } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <USelect
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :style="context?.attrs.style"
20
+ :color="color"
21
+ :highlight="isInvalid || context.highlight"
22
+ :size="context.size ?? 'md'"
23
+ :variant="context.variant ?? 'outline'"
24
+ :items="items"
25
+ :placeholder="context.placeholder"
26
+ :selected-icon="context.selectedIcon"
27
+ :icon="context.icon"
28
+ :avatar="context.avatar"
29
+ :leading="context.leading"
30
+ :leading-icon="context.leadingIcon"
31
+ :trailing="context.trailing"
32
+ :trailing-icon="context.trailingIcon"
33
+ :loading="context.loading"
34
+ :loading-icon="context.loadingIcon"
35
+ :arrow="context.arrow"
36
+ :portal="context.portal"
37
+ :value-key="context.valueKey"
38
+ :label-key="context.labelKey"
39
+ :description-key="context.descriptionKey"
40
+ :default-value="context.defaultValue"
41
+ :multiple="context.multiple"
42
+ :autofocus="context.autofocus"
43
+ :autofocus-delay="context.autofocusDelay"
44
+ :open="context.open"
45
+ :default-open="context.defaultOpen"
46
+ :autocomplete="context.autocomplete"
47
+ :ui="context.ui"
48
+ @change="handleChange"
49
+ @update:model-value="handleInput"
50
+ />
51
+ </template>
@@ -0,0 +1,48 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { SelectMenuItem } from '#ui/components/SelectMenu.vue';
4
+ import type { AvatarProps } from '#ui/components/Avatar.vue';
5
+ export interface FormKitSelectProps {
6
+ options?: string[] | SelectMenuItem[] | SelectMenuItem[][];
7
+ placeholder?: string;
8
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
9
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
10
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
+ selectedIcon?: string;
12
+ arrow?: boolean;
13
+ portal?: boolean;
14
+ valueKey?: string;
15
+ labelKey?: string;
16
+ descriptionKey?: string;
17
+ defaultValue?: unknown;
18
+ multiple?: boolean;
19
+ highlight?: boolean;
20
+ fixed?: boolean;
21
+ autofocus?: boolean;
22
+ autofocusDelay?: number;
23
+ open?: boolean;
24
+ defaultOpen?: boolean;
25
+ autocomplete?: string & {} | 'on' | 'off';
26
+ icon?: string;
27
+ avatar?: AvatarProps;
28
+ leading?: boolean;
29
+ leadingIcon?: string;
30
+ trailing?: boolean;
31
+ trailingIcon?: string;
32
+ loading?: boolean;
33
+ loadingIcon?: string;
34
+ ui?: Record<string, unknown>;
35
+ }
36
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
37
+ context: {
38
+ type: PropType<FormKitFrameworkContext & FormKitSelectProps>;
39
+ required: true;
40
+ };
41
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
42
+ context: {
43
+ type: PropType<FormKitFrameworkContext & FormKitSelectProps>;
44
+ required: true;
45
+ };
46
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
@@ -0,0 +1,73 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { AvatarProps } from '#ui/components/Avatar.vue';
4
+ export interface SelectMenuGroup {
5
+ label?: string;
6
+ items: SelectMenuItem[];
7
+ }
8
+ export interface SelectMenuItem {
9
+ label?: string;
10
+ value?: string | number | boolean;
11
+ icon?: string;
12
+ avatar?: {
13
+ src?: string;
14
+ alt?: string;
15
+ };
16
+ chip?: string | number;
17
+ disabled?: boolean;
18
+ [key: string]: unknown;
19
+ }
20
+ export interface FormKitSelectMenuProps {
21
+ options?: SelectMenuItem[] | SelectMenuGroup[];
22
+ placeholder?: string;
23
+ searchInput?: boolean;
24
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
25
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
26
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27
+ icon?: string;
28
+ avatar?: AvatarProps;
29
+ leading?: boolean;
30
+ leadingIcon?: string;
31
+ trailing?: boolean;
32
+ trailingIcon?: string;
33
+ loading?: boolean;
34
+ loadingIcon?: string;
35
+ selectedIcon?: string;
36
+ clear?: boolean;
37
+ arrow?: boolean;
38
+ portal?: boolean;
39
+ virtualize?: boolean;
40
+ valueKey?: string;
41
+ labelKey?: string;
42
+ descriptionKey?: string;
43
+ defaultValue?: unknown;
44
+ multiple?: boolean;
45
+ highlight?: boolean;
46
+ fixed?: boolean;
47
+ createItem?: boolean;
48
+ filterFields?: string[];
49
+ ignoreFilter?: boolean;
50
+ autofocus?: boolean;
51
+ autofocusDelay?: number;
52
+ open?: boolean;
53
+ defaultOpen?: boolean;
54
+ resetSearchTermOnBlur?: boolean;
55
+ resetSearchTermOnSelect?: boolean;
56
+ resetModelValueOnClear?: boolean;
57
+ highlightOnHover?: boolean;
58
+ searchTerm?: string;
59
+ ui?: Record<string, unknown>;
60
+ }
61
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
62
+ context: {
63
+ type: PropType<FormKitFrameworkContext & FormKitSelectMenuProps>;
64
+ required: true;
65
+ };
66
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
67
+ context: {
68
+ type: PropType<FormKitFrameworkContext & FormKitSelectMenuProps>;
69
+ required: true;
70
+ };
71
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
72
+ declare const _default: typeof __VLS_export;
73
+ export default _default;
@@ -0,0 +1,62 @@
1
+ <script setup>
2
+ import { useFormKitInput } from "../../utils/useFormKitInput";
3
+ const props = defineProps({
4
+ context: {
5
+ type: Object,
6
+ required: true
7
+ }
8
+ });
9
+ const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <USelectMenu
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :style="context?.attrs.style"
20
+ :color="color"
21
+ :highlight="isInvalid || context.highlight"
22
+ :size="context.size ?? 'md'"
23
+ :variant="context.variant ?? 'outline'"
24
+ :items="items"
25
+ :placeholder="context.placeholder"
26
+ :selected-icon="context.selectedIcon"
27
+ :icon="context.icon"
28
+ :avatar="context.avatar"
29
+ :leading="context.leading"
30
+ :leading-icon="context.leadingIcon"
31
+ :trailing="context.trailing"
32
+ :trailing-icon="context.trailingIcon"
33
+ :loading="context.loading"
34
+ :loading-icon="context.loadingIcon"
35
+ :search-input="context.searchInput"
36
+ :clear="context.clear"
37
+ :clear-icon="context.clearIcon"
38
+ :arrow="context.arrow"
39
+ :portal="context.portal"
40
+ :virtualize="context.virtualize"
41
+ :value-key="context.valueKey"
42
+ :label-key="context.labelKey"
43
+ :description-key="context.descriptionKey"
44
+ :default-value="context.defaultValue"
45
+ :multiple="context.multiple"
46
+ :create-item="context.createItem"
47
+ :filter-fields="context.filterFields"
48
+ :ignore-filter="context.ignoreFilter"
49
+ :autofocus="context.autofocus"
50
+ :autofocus-delay="context.autofocusDelay"
51
+ :open="context.open"
52
+ :default-open="context.defaultOpen"
53
+ :reset-search-term-on-blur="context.resetSearchTermOnBlur"
54
+ :reset-search-term-on-select="context.resetSearchTermOnSelect"
55
+ :reset-model-value-on-clear="context.resetModelValueOnClear"
56
+ :highlight-on-hover="context.highlightOnHover"
57
+ :search-term="context.searchTerm"
58
+ :ui="context.ui"
59
+ @change="handleChange"
60
+ @update:model-value="handleInput"
61
+ />
62
+ </template>
@@ -0,0 +1,73 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { AvatarProps } from '#ui/components/Avatar.vue';
4
+ export interface SelectMenuGroup {
5
+ label?: string;
6
+ items: SelectMenuItem[];
7
+ }
8
+ export interface SelectMenuItem {
9
+ label?: string;
10
+ value?: string | number | boolean;
11
+ icon?: string;
12
+ avatar?: {
13
+ src?: string;
14
+ alt?: string;
15
+ };
16
+ chip?: string | number;
17
+ disabled?: boolean;
18
+ [key: string]: unknown;
19
+ }
20
+ export interface FormKitSelectMenuProps {
21
+ options?: SelectMenuItem[] | SelectMenuGroup[];
22
+ placeholder?: string;
23
+ searchInput?: boolean;
24
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
25
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
26
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27
+ icon?: string;
28
+ avatar?: AvatarProps;
29
+ leading?: boolean;
30
+ leadingIcon?: string;
31
+ trailing?: boolean;
32
+ trailingIcon?: string;
33
+ loading?: boolean;
34
+ loadingIcon?: string;
35
+ selectedIcon?: string;
36
+ clear?: boolean;
37
+ arrow?: boolean;
38
+ portal?: boolean;
39
+ virtualize?: boolean;
40
+ valueKey?: string;
41
+ labelKey?: string;
42
+ descriptionKey?: string;
43
+ defaultValue?: unknown;
44
+ multiple?: boolean;
45
+ highlight?: boolean;
46
+ fixed?: boolean;
47
+ createItem?: boolean;
48
+ filterFields?: string[];
49
+ ignoreFilter?: boolean;
50
+ autofocus?: boolean;
51
+ autofocusDelay?: number;
52
+ open?: boolean;
53
+ defaultOpen?: boolean;
54
+ resetSearchTermOnBlur?: boolean;
55
+ resetSearchTermOnSelect?: boolean;
56
+ resetModelValueOnClear?: boolean;
57
+ highlightOnHover?: boolean;
58
+ searchTerm?: string;
59
+ ui?: Record<string, unknown>;
60
+ }
61
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
62
+ context: {
63
+ type: PropType<FormKitFrameworkContext & FormKitSelectMenuProps>;
64
+ required: true;
65
+ };
66
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
67
+ context: {
68
+ type: PropType<FormKitFrameworkContext & FormKitSelectMenuProps>;
69
+ required: true;
70
+ };
71
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
72
+ declare const _default: typeof __VLS_export;
73
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitSliderProps {
4
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
5
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
+ orientation?: 'horizontal' | 'vertical';
7
+ tooltip?: boolean;
8
+ defaultValue?: number | number[];
9
+ name?: string;
10
+ inverted?: boolean;
11
+ min?: number;
12
+ max?: number;
13
+ step?: number;
14
+ minStepsBetweenThumbs?: number;
15
+ ui?: Record<string, unknown>;
16
+ }
17
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
+ context: {
19
+ type: PropType<FormKitFrameworkContext & FormKitSliderProps>;
20
+ required: true;
21
+ };
22
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ context: {
24
+ type: PropType<FormKitFrameworkContext & FormKitSliderProps>;
25
+ required: true;
26
+ };
27
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -0,0 +1,36 @@
1
+ <script setup>
2
+ import { useFormKitInput } from "../../utils/useFormKitInput";
3
+ const props = defineProps({
4
+ context: {
5
+ type: Object,
6
+ required: true
7
+ }
8
+ });
9
+ const { handleInput, handleChange, styleClass, color, modelValue } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <USlider
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :style="context?.attrs.style"
20
+ :color="color"
21
+ :size="context.size ?? 'md'"
22
+ :variant="context.variant ?? 'outline'"
23
+ :orientation="context.orientation ?? 'horizontal'"
24
+ :tooltip="context.tooltip"
25
+ :default-value="context.defaultValue"
26
+ :name="context.name"
27
+ :inverted="context.inverted"
28
+ :min="context.min"
29
+ :max="context.max"
30
+ :step="context.step"
31
+ :min-steps-between-thumbs="context.minStepsBetweenThumbs"
32
+ :ui="context.ui"
33
+ @change="handleChange"
34
+ @update:model-value="handleInput"
35
+ />
36
+ </template>
@@ -0,0 +1,29 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitSliderProps {
4
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
5
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
+ orientation?: 'horizontal' | 'vertical';
7
+ tooltip?: boolean;
8
+ defaultValue?: number | number[];
9
+ name?: string;
10
+ inverted?: boolean;
11
+ min?: number;
12
+ max?: number;
13
+ step?: number;
14
+ minStepsBetweenThumbs?: number;
15
+ ui?: Record<string, unknown>;
16
+ }
17
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
+ context: {
19
+ type: PropType<FormKitFrameworkContext & FormKitSliderProps>;
20
+ required: true;
21
+ };
22
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ context: {
24
+ type: PropType<FormKitFrameworkContext & FormKitSliderProps>;
25
+ required: true;
26
+ };
27
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitSwitchProps {
4
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
5
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
+ loading?: boolean;
7
+ loadingIcon?: string;
8
+ checkedIcon?: string;
9
+ uncheckedIcon?: string;
10
+ label?: string;
11
+ description?: string;
12
+ defaultValue?: boolean;
13
+ autofocus?: false | true | 'true' | 'false';
14
+ ui?: Record<string, unknown>;
15
+ }
16
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
+ context: {
18
+ type: PropType<FormKitFrameworkContext & FormKitSwitchProps>;
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 & FormKitSwitchProps>;
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,34 @@
1
+ <script setup>
2
+ import { useFormKitInput } from "../../utils/useFormKitInput";
3
+ const props = defineProps({
4
+ context: {
5
+ type: Object,
6
+ required: true
7
+ }
8
+ });
9
+ const { handleInput, handleChange, styleClass, color, modelValue } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <USwitch
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :style="context?.attrs.style"
20
+ :color="color"
21
+ :size="context.size ?? 'md'"
22
+ :loading="context.loading"
23
+ :loading-icon="context.loadingIcon"
24
+ :checked-icon="context.checkedIcon"
25
+ :unchecked-icon="context.uncheckedIcon"
26
+ :label="context.label"
27
+ :description="context.description"
28
+ :default-value="context.defaultValue"
29
+ :autofocus="context.autofocus"
30
+ :ui="context.ui"
31
+ @change="handleChange"
32
+ @update:model-value="handleInput"
33
+ />
34
+ </template>