@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,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,44 @@
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 FormKitTextareaProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
8
+ placeholder?: string;
9
+ autofocus?: boolean;
10
+ autofocusDelay?: number;
11
+ autoresize?: boolean;
12
+ autoresizeDelay?: number;
13
+ rows?: number;
14
+ maxrows?: number;
15
+ highlight?: boolean;
16
+ fixed?: boolean;
17
+ icon?: string;
18
+ avatar?: AvatarProps;
19
+ leading?: boolean;
20
+ leadingIcon?: string;
21
+ trailing?: boolean;
22
+ trailingIcon?: string;
23
+ loading?: boolean;
24
+ loadingIcon?: boolean;
25
+ cols?: number | string;
26
+ dirname?: string;
27
+ maxlength?: number | string;
28
+ minlength?: number | string;
29
+ wrap?: string;
30
+ ui?: Record<string, unknown>;
31
+ }
32
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
33
+ context: {
34
+ type: PropType<FormKitFrameworkContext & FormKitTextareaProps>;
35
+ required: true;
36
+ };
37
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
+ context: {
39
+ type: PropType<FormKitFrameworkContext & FormKitTextareaProps>;
40
+ required: true;
41
+ };
42
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
43
+ declare const _default: typeof __VLS_export;
44
+ 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, styleClass, color, isInvalid, modelValue } = useFormKitInput(props.context);
10
+ </script>
11
+
12
+ <template>
13
+ <UTextarea
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
+ :autofocus="context.autofocus"
27
+ :autofocus-delay="context.autofocusDelay"
28
+ :autoresize="context.autoresize"
29
+ :autoresize-delay="context.autoresizeDelay"
30
+ :rows="context.rows"
31
+ :maxrows="context.maxrows"
32
+ :fixed="context.fixed"
33
+ :icon="context.icon"
34
+ :avatar="context.avatar"
35
+ :leading="context.leading"
36
+ :leading-icon="context.leadingIcon"
37
+ :trailing="context.trailing"
38
+ :trailing-icon="context.trailingIcon"
39
+ :loading="context.loading"
40
+ :loading-icon="context.loadingIcon"
41
+ :cols="context.cols"
42
+ :dirname="context.dirname"
43
+ :maxlength="context.maxlength"
44
+ :minlength="context.minlength"
45
+ :wrap="context.wrap"
46
+ :ui="context.ui"
47
+ @change="handleChange"
48
+ @update:model-value="handleInput"
49
+ />
50
+ </template>
@@ -0,0 +1,44 @@
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 FormKitTextareaProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
8
+ placeholder?: string;
9
+ autofocus?: boolean;
10
+ autofocusDelay?: number;
11
+ autoresize?: boolean;
12
+ autoresizeDelay?: number;
13
+ rows?: number;
14
+ maxrows?: number;
15
+ highlight?: boolean;
16
+ fixed?: boolean;
17
+ icon?: string;
18
+ avatar?: AvatarProps;
19
+ leading?: boolean;
20
+ leadingIcon?: string;
21
+ trailing?: boolean;
22
+ trailingIcon?: string;
23
+ loading?: boolean;
24
+ loadingIcon?: boolean;
25
+ cols?: number | string;
26
+ dirname?: string;
27
+ maxlength?: number | string;
28
+ minlength?: number | string;
29
+ wrap?: string;
30
+ ui?: Record<string, unknown>;
31
+ }
32
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
33
+ context: {
34
+ type: PropType<FormKitFrameworkContext & FormKitTextareaProps>;
35
+ required: true;
36
+ };
37
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
+ context: {
39
+ type: PropType<FormKitFrameworkContext & FormKitTextareaProps>;
40
+ required: true;
41
+ };
42
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
43
+ declare const _default: typeof __VLS_export;
44
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import type { PropType } from 'vue';
2
+ export interface FormKitIconProps {
3
+ onIconClicked?: () => void;
4
+ onLeadingIconClicked?: () => void;
5
+ onTrailingIconClicked?: () => void;
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ name: {
9
+ type: PropType<string>;
10
+ required: true;
11
+ };
12
+ onClick: {
13
+ type: PropType<() => void>;
14
+ default: undefined;
15
+ };
16
+ iconClass: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ name: {
22
+ type: PropType<string>;
23
+ required: true;
24
+ };
25
+ onClick: {
26
+ type: PropType<() => void>;
27
+ default: undefined;
28
+ };
29
+ iconClass: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ }>> & Readonly<{}>, {
34
+ onClick: () => void;
35
+ iconClass: string;
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
@@ -0,0 +1,21 @@
1
+ <script setup>
2
+ defineProps({
3
+ name: {
4
+ type: String,
5
+ required: true
6
+ },
7
+ onClick: { type: Function, default: void 0 },
8
+ iconClass: {
9
+ type: String,
10
+ default: ""
11
+ }
12
+ });
13
+ </script>
14
+
15
+ <template>
16
+ <UIcon
17
+ :name="name"
18
+ :class="iconClass"
19
+ @click="onClick"
20
+ />
21
+ </template>
@@ -0,0 +1,38 @@
1
+ import type { PropType } from 'vue';
2
+ export interface FormKitIconProps {
3
+ onIconClicked?: () => void;
4
+ onLeadingIconClicked?: () => void;
5
+ onTrailingIconClicked?: () => void;
6
+ }
7
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ name: {
9
+ type: PropType<string>;
10
+ required: true;
11
+ };
12
+ onClick: {
13
+ type: PropType<() => void>;
14
+ default: undefined;
15
+ };
16
+ iconClass: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ name: {
22
+ type: PropType<string>;
23
+ required: true;
24
+ };
25
+ onClick: {
26
+ type: PropType<() => void>;
27
+ default: undefined;
28
+ };
29
+ iconClass: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ }>> & Readonly<{}>, {
34
+ onClick: () => void;
35
+ iconClass: string;
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputBooleanProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ falseIcon?: string;
7
+ falseValue?: string;
8
+ icon?: string;
9
+ leading?: boolean;
10
+ leadingIcon?: string;
11
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ trailing?: boolean;
13
+ trailingIcon?: string;
14
+ trueIcon?: string;
15
+ trueValue?: string;
16
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
17
+ }
18
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
+ context: {
20
+ type: PropType<FormKitFrameworkContext & FormKitOutputBooleanProps & FormKitIconProps>;
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 & FormKitOutputBooleanProps & FormKitIconProps>;
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,56 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { useFormKitOutput } from "../../utils/useFormKitOutput";
4
+ import FUIcon from "./FUIcon.vue";
5
+ const props = defineProps({
6
+ context: {
7
+ type: Object,
8
+ required: true
9
+ }
10
+ });
11
+ const booleanValue = computed(() => Boolean(props.context._value));
12
+ const displayValue = computed(() => {
13
+ if (booleanValue.value) {
14
+ return props.context.trueValue ?? "Yes";
15
+ }
16
+ return props.context.falseValue ?? "No";
17
+ });
18
+ const booleanIcon = computed(() => {
19
+ if (booleanValue.value && props.context.trueIcon) {
20
+ return props.context.trueIcon;
21
+ }
22
+ if (!booleanValue.value && props.context.falseIcon) {
23
+ return props.context.falseIcon;
24
+ }
25
+ return void 0;
26
+ });
27
+ const { containerClass, iconClass, leadingIconName, trailingIconName } = useFormKitOutput(props.context);
28
+ </script>
29
+
30
+ <template>
31
+ <div
32
+ :id="context.id"
33
+ :class="containerClass"
34
+ :style="context?.attrs?.style"
35
+ >
36
+ <FUIcon
37
+ v-if="leadingIconName"
38
+ :name="leadingIconName"
39
+ :icon-class="iconClass"
40
+ :on-click="context?.onLeadingIconClicked"
41
+ />
42
+ <FUIcon
43
+ v-if="booleanIcon"
44
+ :name="booleanIcon"
45
+ :icon-class="iconClass"
46
+ :on-click="context?.onIconClicked"
47
+ />
48
+ <span>{{ displayValue }}</span>
49
+ <FUIcon
50
+ v-if="trailingIconName"
51
+ :name="trailingIconName"
52
+ :icon-class="iconClass"
53
+ :on-click="context?.onTrailingIconClicked"
54
+ />
55
+ </div>
56
+ </template>
@@ -0,0 +1,30 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputBooleanProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ falseIcon?: string;
7
+ falseValue?: string;
8
+ icon?: string;
9
+ leading?: boolean;
10
+ leadingIcon?: string;
11
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ trailing?: boolean;
13
+ trailingIcon?: string;
14
+ trueIcon?: string;
15
+ trueValue?: string;
16
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
17
+ }
18
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
+ context: {
20
+ type: PropType<FormKitFrameworkContext & FormKitOutputBooleanProps & FormKitIconProps>;
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 & FormKitOutputBooleanProps & FormKitIconProps>;
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,30 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputDateProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ dateStyle?: 'short' | 'medium' | 'long' | 'full';
7
+ icon?: string;
8
+ leading?: boolean;
9
+ leadingIcon?: string;
10
+ locale?: string;
11
+ relative?: boolean;
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ timeStyle?: 'short' | 'medium' | 'long';
14
+ trailing?: boolean;
15
+ trailingIcon?: string;
16
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
17
+ }
18
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
+ context: {
20
+ type: PropType<FormKitFrameworkContext & FormKitOutputDateProps & FormKitIconProps>;
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 & FormKitOutputDateProps & FormKitIconProps>;
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,52 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { useFormKitOutput } from "../../utils/useFormKitOutput";
4
+ import FUIcon from "./FUIcon.vue";
5
+ const props = defineProps({
6
+ context: {
7
+ type: Object,
8
+ required: true
9
+ }
10
+ });
11
+ const dateValue = computed(() => {
12
+ const value = props.context._value;
13
+ if (!value) return void 0;
14
+ try {
15
+ const date = value instanceof Date ? value : new Date(value);
16
+ return Number.isNaN(date.getTime()) ? void 0 : date;
17
+ } catch {
18
+ return void 0;
19
+ }
20
+ });
21
+ const { containerClass, iconClass, leadingIconName, trailingIconName } = useFormKitOutput(props.context);
22
+ </script>
23
+
24
+ <template>
25
+ <div
26
+ :id="context.id"
27
+ :class="containerClass"
28
+ :style="context?.attrs?.style"
29
+ >
30
+ <FUIcon
31
+ v-if="leadingIconName"
32
+ :name="leadingIconName"
33
+ :icon-class="iconClass"
34
+ :on-click="context?.onLeadingIconClicked"
35
+ />
36
+ <NuxtTime
37
+ v-if="dateValue"
38
+ :datetime="dateValue"
39
+ :date-style="context.dateStyle ?? 'medium'"
40
+ :time-style="context.timeStyle"
41
+ :locale="context.locale"
42
+ :relative="context.relative"
43
+ />
44
+ <span v-else>{{ context._value }}</span>
45
+ <FUIcon
46
+ v-if="trailingIconName"
47
+ :name="trailingIconName"
48
+ :icon-class="iconClass"
49
+ :on-click="context?.onTrailingIconClicked"
50
+ />
51
+ </div>
52
+ </template>
@@ -0,0 +1,30 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputDateProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ dateStyle?: 'short' | 'medium' | 'long' | 'full';
7
+ icon?: string;
8
+ leading?: boolean;
9
+ leadingIcon?: string;
10
+ locale?: string;
11
+ relative?: boolean;
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ timeStyle?: 'short' | 'medium' | 'long';
14
+ trailing?: boolean;
15
+ trailingIcon?: string;
16
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
17
+ }
18
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
+ context: {
20
+ type: PropType<FormKitFrameworkContext & FormKitOutputDateProps & FormKitIconProps>;
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 & FormKitOutputDateProps & FormKitIconProps>;
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,28 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputLinkProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ icon?: string;
7
+ leading?: boolean;
8
+ leadingIcon?: string;
9
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ trailing?: boolean;
11
+ trailingIcon?: string;
12
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
13
+ target?: '_blank' | '_self' | '_parent' | '_top';
14
+ rel?: string;
15
+ }
16
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
+ context: {
18
+ type: PropType<FormKitFrameworkContext & FormKitOutputLinkProps & FormKitIconProps>;
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 & FormKitOutputLinkProps & FormKitIconProps>;
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,78 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { useFormKitOutput } from "../../utils/useFormKitOutput";
4
+ import FUIcon from "./FUIcon.vue";
5
+ const props = defineProps({
6
+ context: {
7
+ type: Object,
8
+ required: true
9
+ }
10
+ });
11
+ const linkUrl = computed(() => props.context._value ?? "");
12
+ const isExternal = computed(() => {
13
+ const url = linkUrl.value;
14
+ if (!url)
15
+ return false;
16
+ return url.startsWith("http://") || url.startsWith("https://") || url.startsWith("//");
17
+ });
18
+ const linkTarget = computed(() => {
19
+ return props.context.target ?? (isExternal.value ? "_blank" : void 0);
20
+ });
21
+ const linkRel = computed(() => {
22
+ if (props.context.rel)
23
+ return props.context.rel;
24
+ if (isExternal.value && linkTarget.value === "_blank")
25
+ return "noopener noreferrer";
26
+ return void 0;
27
+ });
28
+ const displayValue = computed(() => {
29
+ return linkUrl;
30
+ });
31
+ const { containerClass, iconClass, leadingIconName, trailingIconName } = useFormKitOutput(props.context);
32
+ const linkClass = computed(() => {
33
+ const classes = [
34
+ containerClass.value
35
+ ];
36
+ return classes.filter(Boolean).join(" ");
37
+ });
38
+ </script>
39
+
40
+ <template>
41
+ <div
42
+ :id="context.id"
43
+ :class="containerClass"
44
+ :style="context?.attrs?.style"
45
+ >
46
+ <FUIcon
47
+ v-if="leadingIconName"
48
+ :name="leadingIconName"
49
+ :icon-class="iconClass"
50
+ :on-click="context?.onLeadingIconClicked"
51
+ />
52
+ <ULink
53
+ v-if="isExternal"
54
+ :href="isExternal ? linkUrl : void 0"
55
+ :target="linkTarget"
56
+ :rel="linkRel"
57
+ :class="linkClass"
58
+ :style="context?.attrs?.style"
59
+ >
60
+ <span>{{ displayValue }}</span>
61
+ </ULink>
62
+ <NuxtLink
63
+ v-else
64
+ :to="linkUrl"
65
+ :class="linkClass"
66
+ :style="context?.attrs?.style"
67
+ >
68
+ <span>{{ displayValue }}</span>
69
+ </NuxtLink>
70
+
71
+ <FUIcon
72
+ v-if="trailingIconName"
73
+ :name="trailingIconName"
74
+ :icon-class="iconClass"
75
+ :on-click="context?.onTrailingIconClicked"
76
+ />
77
+ </div>
78
+ </template>
@@ -0,0 +1,28 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputLinkProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ icon?: string;
7
+ leading?: boolean;
8
+ leadingIcon?: string;
9
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ trailing?: boolean;
11
+ trailingIcon?: string;
12
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
13
+ target?: '_blank' | '_self' | '_parent' | '_top';
14
+ rel?: string;
15
+ }
16
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
+ context: {
18
+ type: PropType<FormKitFrameworkContext & FormKitOutputLinkProps & FormKitIconProps>;
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 & FormKitOutputLinkProps & FormKitIconProps>;
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,29 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ import type { FormKitIconProps } from './FUIcon.vue.js';
4
+ export interface FormKitOutputListProps {
5
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
6
+ icon?: string;
7
+ itemClass?: string;
8
+ leading?: boolean;
9
+ leadingIcon?: string;
10
+ listType?: 'span' | 'div' | 'ul' | 'ol' | 'comma' | 'semicolon' | 'pipe' | 'dash' | 'space' | 'badge';
11
+ separator?: string;
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ trailing?: boolean;
14
+ trailingIcon?: string;
15
+ variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
16
+ }
17
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
+ context: {
19
+ type: PropType<FormKitFrameworkContext & FormKitOutputListProps & FormKitIconProps>;
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 & FormKitOutputListProps & FormKitIconProps>;
25
+ required: true;
26
+ };
27
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;