@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,65 @@
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
+ <UInputMenu
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :readonly="context?.attrs.readonly ?? false"
20
+ :style="context?.attrs.style"
21
+ :color="color"
22
+ :highlight="!!(isInvalid || context.highlight)"
23
+ :size="context.size ?? 'md'"
24
+ :variant="context.variant ?? 'outline'"
25
+ :type="context?.inputType || 'text'"
26
+ :items="items"
27
+ :placeholder="context.placeholder"
28
+ :autofocus="context.autofocus"
29
+ :autofocus-delay="context.autofocusDelay"
30
+ :trailing-icon="context.trailingIcon"
31
+ :selected-icon="context.selectedIcon"
32
+ :delete-icon="context.deleteIcon"
33
+ :clear="context.clear"
34
+ :clear-icon="context.clearIcon"
35
+ :arrow="context.arrow"
36
+ :portal="context.portal"
37
+ :virtualize="context.virtualize"
38
+ :value-key="context.valueKey"
39
+ :label-key="context.labelKey"
40
+ :description-key="context.descriptionKey"
41
+ :multiple="context.multiple"
42
+ :fixed="context.fixed"
43
+ :create-item="context.createItem || false"
44
+ :filter-fields="context.filterFields"
45
+ :ignore-filter="context.ignoreFilter"
46
+ :default-open="context.defaultOpen"
47
+ :reset-search-term-on-blur="context.resetSearchTermOnBlur"
48
+ :reset-search-term-on-select="context.resetSearchTermOnSelect"
49
+ :reset-model-value-on-clear="context.resetModelValueOnClear"
50
+ :highlight-on-hover="context.highlightOnHover"
51
+ :open-on-click="context.openOnClick"
52
+ :open-on-focus="context.openOnFocus"
53
+ :leading="context.leading"
54
+ :leading-icon="context.leadingIcon"
55
+ :trailing="context.trailing"
56
+ :loading="context.loading"
57
+ :loading-icon="context.loadingIcon"
58
+ :list="context.list"
59
+ :autocomplete="context.autocomplete"
60
+ :search-term="context.searchTerm"
61
+ :ui="context.ui"
62
+ @change="handleChange"
63
+ @update:model-value="handleInput"
64
+ />
65
+ </template>
@@ -0,0 +1,73 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface InputMenuItem {
4
+ label?: string;
5
+ icon?: string;
6
+ avatar?: {
7
+ src?: string;
8
+ alt?: string;
9
+ };
10
+ chip?: string | number;
11
+ disabled?: boolean;
12
+ [key: string]: unknown;
13
+ }
14
+ export interface FormKitInputMenuProps {
15
+ options?: string[] | InputMenuItem[];
16
+ inputType?: 'number' | 'search' | 'image' | 'text' | 'button' | 'time' | 'color' | 'checkbox' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'month' | 'password' | 'radio' | 'range' | 'reset' | 'submit' | 'tel' | 'url' | 'week' | string & {};
17
+ placeholder?: string;
18
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
19
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
20
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
21
+ autofocus?: boolean;
22
+ autofocusDelay?: number;
23
+ trailingIcon?: string;
24
+ selectedIcon?: string;
25
+ deleteIcon?: string;
26
+ clear?: boolean;
27
+ clearIcon?: string;
28
+ arrow?: boolean;
29
+ portal?: boolean;
30
+ virtualize?: boolean;
31
+ valueKey?: string;
32
+ labelKey?: string;
33
+ descriptionKey?: string;
34
+ multiple?: boolean;
35
+ highlight?: boolean;
36
+ fixed?: boolean;
37
+ createItem?: boolean | 'always' | {
38
+ position?: 'top' | 'bottom';
39
+ when?: 'always' | 'empty' | undefined;
40
+ } | undefined;
41
+ filterFields?: string[];
42
+ ignoreFilter?: false;
43
+ defaultOpen?: false;
44
+ resetSearchTermOnBlur?: boolean;
45
+ resetSearchTermOnSelect?: boolean;
46
+ resetModelValueOnClear?: boolean;
47
+ highlightOnHover?: boolean;
48
+ openOnClick?: boolean;
49
+ openOnFocus?: boolean;
50
+ icon?: string;
51
+ leading?: boolean;
52
+ leadingIcon?: string;
53
+ trailing?: boolean;
54
+ loading?: boolean;
55
+ loadingIcon?: string;
56
+ list?: string;
57
+ autocomplete?: string & {} | 'on' | 'off';
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 & FormKitInputMenuProps>;
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 & FormKitInputMenuProps>;
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,43 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitInputNumberProps {
4
+ placeholder?: string;
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
7
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
8
+ highlight?: boolean;
9
+ fixed?: boolean;
10
+ orientation?: 'horizontal' | 'vertical';
11
+ increment?: boolean;
12
+ incrementIcon?: string;
13
+ incrementDisabled?: boolean;
14
+ decrement?: boolean;
15
+ decrementIcon?: string;
16
+ decrementDisabled?: boolean;
17
+ autofocus?: boolean;
18
+ autofocusDelay?: number;
19
+ min?: number;
20
+ max?: number;
21
+ step?: number;
22
+ stepSnapping?: boolean;
23
+ formatOptions?: Intl.NumberFormatOptions;
24
+ disableWheelChange?: boolean;
25
+ invertWheelChange?: boolean;
26
+ focusOnChange?: boolean;
27
+ list: string;
28
+ autocomplete?: string & {} | 'on' | 'off';
29
+ ui?: Record<string, unknown>;
30
+ }
31
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
32
+ context: {
33
+ type: PropType<FormKitFrameworkContext & FormKitInputNumberProps>;
34
+ required: true;
35
+ };
36
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
37
+ context: {
38
+ type: PropType<FormKitFrameworkContext & FormKitInputNumberProps>;
39
+ required: true;
40
+ };
41
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
@@ -0,0 +1,49 @@
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 } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <UInputNumber
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 ?? 'vertical'"
24
+ :highlight="isInvalid || context.highlight"
25
+ :fixed="context.fixed"
26
+ :increment="context.increment"
27
+ :increment-icon="context.incrementIcon"
28
+ :increment-disabled="context.incrementDisabled"
29
+ :decrement="context.decrement"
30
+ :decrement-icon="context.decrementIcon"
31
+ :decrement-disabled="context.decrementDisabled"
32
+ :autofocus="context.autofocus"
33
+ :autofocus-delay="context.autofocusDelay"
34
+ :min="context.min"
35
+ :max="context.max"
36
+ :step="context.step"
37
+ :step-snapping="context.stepSnapping"
38
+ :format-options="context.formatOptions"
39
+ :disable-wheel-change="context.disableWheelChange"
40
+ :invert-wheel-change="context.invertWheelChange"
41
+ :focus-on-change="context.focusOnChange"
42
+ :placeholder="context.placeholder"
43
+ :list="context.list"
44
+ :autocomplete="context.autocomplete"
45
+ :ui="context.ui"
46
+ @change="handleChange"
47
+ @update:model-value="handleInput"
48
+ />
49
+ </template>
@@ -0,0 +1,43 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitInputNumberProps {
4
+ placeholder?: string;
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
7
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
8
+ highlight?: boolean;
9
+ fixed?: boolean;
10
+ orientation?: 'horizontal' | 'vertical';
11
+ increment?: boolean;
12
+ incrementIcon?: string;
13
+ incrementDisabled?: boolean;
14
+ decrement?: boolean;
15
+ decrementIcon?: string;
16
+ decrementDisabled?: boolean;
17
+ autofocus?: boolean;
18
+ autofocusDelay?: number;
19
+ min?: number;
20
+ max?: number;
21
+ step?: number;
22
+ stepSnapping?: boolean;
23
+ formatOptions?: Intl.NumberFormatOptions;
24
+ disableWheelChange?: boolean;
25
+ invertWheelChange?: boolean;
26
+ focusOnChange?: boolean;
27
+ list: string;
28
+ autocomplete?: string & {} | 'on' | 'off';
29
+ ui?: Record<string, unknown>;
30
+ }
31
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
32
+ context: {
33
+ type: PropType<FormKitFrameworkContext & FormKitInputNumberProps>;
34
+ required: true;
35
+ };
36
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
37
+ context: {
38
+ type: PropType<FormKitFrameworkContext & FormKitInputNumberProps>;
39
+ required: true;
40
+ };
41
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
@@ -0,0 +1,47 @@
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 FormKitInputTagsProps {
5
+ placeholder?: string;
6
+ maxLength?: number;
7
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
8
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
9
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ autofocus?: boolean;
11
+ autofocusDelay?: number;
12
+ deleteIcon?: string;
13
+ highlight?: boolean;
14
+ fixed?: boolean;
15
+ addOnPaste?: boolean;
16
+ addOnTab?: boolean;
17
+ addOnBlur?: boolean;
18
+ duplicate?: boolean;
19
+ delimiters?: string | RegExp;
20
+ max: number;
21
+ convertValue?: (value: string) => string;
22
+ displayValue?: (value: string) => string;
23
+ icon?: string;
24
+ avatar?: AvatarProps;
25
+ leading?: boolean;
26
+ leadingIcon?: string;
27
+ trailing?: boolean;
28
+ trailingIcon?: string;
29
+ loading?: boolean;
30
+ loadingIcon?: boolean;
31
+ list?: string;
32
+ autocomplete?: string & {} | 'on' | 'off';
33
+ ui?: Record<string, unknown>;
34
+ }
35
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
36
+ context: {
37
+ type: PropType<FormKitFrameworkContext & FormKitInputTagsProps>;
38
+ required: true;
39
+ };
40
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
+ context: {
42
+ type: PropType<FormKitFrameworkContext & FormKitInputTagsProps>;
43
+ required: true;
44
+ };
45
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
@@ -0,0 +1,53 @@
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 } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <UInputTags
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :class="styleClass"
18
+ :disabled="!!context?.disabled"
19
+ :readonly="context?.attrs.readonly ?? false"
20
+ :style="context?.attrs.style"
21
+ :color="color"
22
+ :highlight="isInvalid || context.highlight"
23
+ :size="context.size ?? 'md'"
24
+ :variant="context.variant ?? 'outline'"
25
+ :placeholder="context.placeholder"
26
+ :max-length="context.maxLength"
27
+ :autofocus="context.autofocus"
28
+ :autofocus-delay="context.autofocusDelay ?? 0"
29
+ :delete-icon="context.deleteIcon"
30
+ :fixed="context.fixed"
31
+ :add-on-paste="context.addOnPaste"
32
+ :add-on-tab="context.addOnTab"
33
+ :add-on-blur="context.addOnBlur"
34
+ :duplicate="context.duplicate"
35
+ :delimiters="context.delimiters"
36
+ :max="context.max"
37
+ :convert-value="context.convertValue"
38
+ :display-value="context.displayValue"
39
+ :icon="context.icon"
40
+ :avatar="context.avatar"
41
+ :leading="context.leading"
42
+ :leading-icon="context.leadingIcon"
43
+ :trailing="context.trailing"
44
+ :trailing-icon="context.trailingIcon"
45
+ :loading="context.loading"
46
+ :loading-icon="context.loadingIcon"
47
+ :list="context.list"
48
+ :autocomplete="context.autocomplete || 'off'"
49
+ :ui="context.ui"
50
+ @change="handleChange"
51
+ @update:model-value="handleInput"
52
+ />
53
+ </template>
@@ -0,0 +1,47 @@
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 FormKitInputTagsProps {
5
+ placeholder?: string;
6
+ maxLength?: number;
7
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
8
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
9
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ autofocus?: boolean;
11
+ autofocusDelay?: number;
12
+ deleteIcon?: string;
13
+ highlight?: boolean;
14
+ fixed?: boolean;
15
+ addOnPaste?: boolean;
16
+ addOnTab?: boolean;
17
+ addOnBlur?: boolean;
18
+ duplicate?: boolean;
19
+ delimiters?: string | RegExp;
20
+ max: number;
21
+ convertValue?: (value: string) => string;
22
+ displayValue?: (value: string) => string;
23
+ icon?: string;
24
+ avatar?: AvatarProps;
25
+ leading?: boolean;
26
+ leadingIcon?: string;
27
+ trailing?: boolean;
28
+ trailingIcon?: string;
29
+ loading?: boolean;
30
+ loadingIcon?: boolean;
31
+ list?: string;
32
+ autocomplete?: string & {} | 'on' | 'off';
33
+ ui?: Record<string, unknown>;
34
+ }
35
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
36
+ context: {
37
+ type: PropType<FormKitFrameworkContext & FormKitInputTagsProps>;
38
+ required: true;
39
+ };
40
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
+ context: {
42
+ type: PropType<FormKitFrameworkContext & FormKitInputTagsProps>;
43
+ required: true;
44
+ };
45
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
@@ -0,0 +1,50 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { Time } from '@internationalized/date';
4
+ import type { AvatarProps } from '#ui/components/Avatar.vue';
5
+ type DateStep = {
6
+ hour?: number;
7
+ minute?: number;
8
+ second?: number;
9
+ };
10
+ export interface FormKitInputTimeProps {
11
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
12
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
13
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
14
+ highlight?: boolean;
15
+ fixed?: boolean;
16
+ autofocus?: boolean;
17
+ autofocusDelay?: number;
18
+ defaultValue: Time;
19
+ placeholder?: Time;
20
+ defaultPlaceholder?: Time;
21
+ hourCycle?: 12 | 24;
22
+ step?: DateStep;
23
+ stepSnapping?: boolean;
24
+ granularity?: 'hour' | 'minute' | 'second';
25
+ hideTimeZone?: boolean;
26
+ maxValue?: Time;
27
+ minValue?: Time;
28
+ icon?: string;
29
+ avatar?: AvatarProps;
30
+ leading?: boolean;
31
+ leadingIcon?: string;
32
+ trailing?: boolean;
33
+ trailingIcon?: string;
34
+ loading?: boolean;
35
+ loadingIcon?: string;
36
+ ui?: Record<string, unknown>;
37
+ }
38
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
39
+ context: {
40
+ type: PropType<FormKitFrameworkContext & FormKitInputTimeProps>;
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 & FormKitInputTimeProps>;
46
+ required: true;
47
+ };
48
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
@@ -0,0 +1,50 @@
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 } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <UInputTime
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :default-value="context.defaultValue"
18
+ :class="styleClass"
19
+ :disabled="!!context?.disabled"
20
+ :readonly="context?.attrs.readonly ?? false"
21
+ :style="context?.attrs.style"
22
+ :color="color"
23
+ :highlight="isInvalid || context.highlight"
24
+ :size="context.size ?? 'md'"
25
+ :variant="context.variant ?? 'outline'"
26
+ :placeholder="context.placeholder"
27
+ :default-placeholder="context.defaultPlaceholder"
28
+ :autofocus="context.autofocus"
29
+ :autofocus-delay="context.autofocusDelay"
30
+ :fixed="context.fixed"
31
+ :icon="context.icon"
32
+ :avatar="context.avatar"
33
+ :leading="context.leading"
34
+ :leading-icon="context.leadingIcon"
35
+ :trailing="context.trailing"
36
+ :trailing-icon="context.trailingIcon"
37
+ :loading="context.loading"
38
+ :loading-icon="context.loadingIcon"
39
+ :hour-cycle="context.hourCycle"
40
+ :step="context.step"
41
+ :step-snapping="context.stepSnapping"
42
+ :granularity="context.granularity"
43
+ :hide-time-zone="context.hideTimeZone"
44
+ :max-value="context.maxValue"
45
+ :min-value="context.minValue"
46
+ :ui="context.ui"
47
+ @change="handleChange"
48
+ @update:model-value="handleInput"
49
+ />
50
+ </template>
@@ -0,0 +1,50 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { Time } from '@internationalized/date';
4
+ import type { AvatarProps } from '#ui/components/Avatar.vue';
5
+ type DateStep = {
6
+ hour?: number;
7
+ minute?: number;
8
+ second?: number;
9
+ };
10
+ export interface FormKitInputTimeProps {
11
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
12
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
13
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
14
+ highlight?: boolean;
15
+ fixed?: boolean;
16
+ autofocus?: boolean;
17
+ autofocusDelay?: number;
18
+ defaultValue: Time;
19
+ placeholder?: Time;
20
+ defaultPlaceholder?: Time;
21
+ hourCycle?: 12 | 24;
22
+ step?: DateStep;
23
+ stepSnapping?: boolean;
24
+ granularity?: 'hour' | 'minute' | 'second';
25
+ hideTimeZone?: boolean;
26
+ maxValue?: Time;
27
+ minValue?: Time;
28
+ icon?: string;
29
+ avatar?: AvatarProps;
30
+ leading?: boolean;
31
+ leadingIcon?: string;
32
+ trailing?: boolean;
33
+ trailingIcon?: string;
34
+ loading?: boolean;
35
+ loadingIcon?: string;
36
+ ui?: Record<string, unknown>;
37
+ }
38
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
39
+ context: {
40
+ type: PropType<FormKitFrameworkContext & FormKitInputTimeProps>;
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 & FormKitInputTimeProps>;
46
+ required: true;
47
+ };
48
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
@@ -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
+ <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 } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <UPinInput
14
+ :id="context.id"
15
+ v-model="modelValue"
16
+ v-bind="{ ...context?.attrs }"
17
+ :default-value="context.defaultValue"
18
+ :class="styleClass"
19
+ :disabled="!!context?.disabled"
20
+ :readonly="context?.attrs.readonly ?? false"
21
+ :style="context?.attrs.style"
22
+ :color="color"
23
+ :highlight="isInvalid || context.highlight"
24
+ :size="context.size ?? 'md'"
25
+ :variant="context.variant ?? 'outline'"
26
+ :length="context.length ?? 5"
27
+ :autofocus="context.autofocus"
28
+ :autofocus-delay="context.autofocusDelay"
29
+ :fixed="context.fixed"
30
+ :mask="context.mask"
31
+ :otp="context.otp"
32
+ :placeholder="context.placeholder"
33
+ :ui="context.ui"
34
+ @change="handleChange"
35
+ @update:model-value="handleInput"
36
+ />
37
+ </template>