@sfxcode/nuxt-ui-formkit 1.2.4 → 1.2.5
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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/FUAutoForm.d.vue.ts +7 -8
- package/dist/runtime/components/FUAutoForm.vue +1 -1
- package/dist/runtime/components/FUAutoForm.vue.d.ts +7 -8
- package/dist/runtime/components/FUAutoFormOverlay.d.vue.ts +1 -1
- package/dist/runtime/components/FUAutoFormOverlay.vue.d.ts +1 -1
- package/dist/runtime/components/FUDataEdit.d.vue.ts +7 -7
- package/dist/runtime/components/FUDataEdit.vue +1 -1
- package/dist/runtime/components/FUDataEdit.vue.d.ts +7 -7
- package/dist/runtime/components/FUDataView.d.vue.ts +7 -7
- package/dist/runtime/components/FUDataView.vue +1 -1
- package/dist/runtime/components/FUDataView.vue.d.ts +7 -7
- package/dist/runtime/components/inputs/FUCalendar.vue +2 -2
- package/dist/runtime/components/inputs/FUCheckbox.vue +2 -2
- package/dist/runtime/components/inputs/FUCheckboxGroup.vue +2 -1
- package/dist/runtime/components/inputs/FUColorPicker.vue +2 -2
- package/dist/runtime/components/inputs/FUEditor.vue +2 -2
- package/dist/runtime/components/inputs/FUFileUpload.vue +2 -2
- package/dist/runtime/components/inputs/FUInput.vue +2 -2
- package/dist/runtime/components/inputs/FUInputDate.vue +2 -2
- package/dist/runtime/components/inputs/FUInputMenu.vue +2 -2
- package/dist/runtime/components/inputs/FUInputNumber.vue +2 -2
- package/dist/runtime/components/inputs/FUInputTags.vue +2 -2
- package/dist/runtime/components/inputs/FUInputTime.vue +2 -2
- package/dist/runtime/components/inputs/FUListbox.vue +7 -6
- package/dist/runtime/components/inputs/FUPinInput.vue +2 -2
- package/dist/runtime/components/inputs/FURadioGroup.vue +2 -2
- package/dist/runtime/components/inputs/FUSelect.vue +2 -2
- package/dist/runtime/components/inputs/FUSelectMenu.vue +2 -2
- package/dist/runtime/components/inputs/FUSlider.vue +2 -2
- package/dist/runtime/components/inputs/FUSwitch.vue +2 -2
- package/dist/runtime/components/inputs/FUTextarea.vue +2 -2
- package/dist/runtime/components/output/FUOutputBoolean.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputBoolean.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputDate.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputDate.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputLink.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputLink.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputList.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputList.vue +2 -1
- package/dist/runtime/components/output/FUOutputList.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputNumber.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputNumber.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputText.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputText.vue.d.ts +2 -0
- package/dist/runtime/composables/useFormKitRepeater.js +5 -5
- package/dist/runtime/composables/useFormKitSchema.d.ts +7 -24
- package/dist/runtime/formkit/definitions/output.js +6 -6
- package/dist/runtime/formkit/definitions/output.mjs +6 -6
- package/dist/runtime/formkit/definitions/repeater.js +4 -0
- package/dist/runtime/formkit/definitions/repeater.mjs +4 -0
- package/dist/runtime/formkit/index.d.ts +6 -1
- package/dist/runtime/utils/useFormKitInput.d.ts +1 -0
- package/dist/runtime/utils/useFormKitInput.js +10 -2
- package/dist/runtime/utils/useFormKitOutput.d.ts +25 -0
- package/dist/runtime/utils/useFormKitOutput.js +21 -5
- package/package.json +6 -6
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
1
|
+
import { computed, onBeforeUnmount, ref } from "vue";
|
|
2
2
|
export function useFormKitOutput(context) {
|
|
3
|
+
const ui = ref(context?.node?.props?.ui);
|
|
4
|
+
const uiReceipt = context?.node?.on?.("prop:ui", ({ payload }) => {
|
|
5
|
+
ui.value = payload;
|
|
6
|
+
});
|
|
7
|
+
onBeforeUnmount(() => {
|
|
8
|
+
if (uiReceipt !== void 0)
|
|
9
|
+
context?.node?.off?.(uiReceipt);
|
|
10
|
+
});
|
|
3
11
|
const colorClass = computed(() => {
|
|
4
12
|
const color = context.color ?? "neutral";
|
|
5
13
|
const colorMap = {
|
|
@@ -41,6 +49,7 @@ export function useFormKitOutput(context) {
|
|
|
41
49
|
colorClass.value,
|
|
42
50
|
sizeClass.value,
|
|
43
51
|
variantClass.value,
|
|
52
|
+
ui.value?.root,
|
|
44
53
|
context?.attrs?.class
|
|
45
54
|
].filter(Boolean).join(" ");
|
|
46
55
|
});
|
|
@@ -53,13 +62,19 @@ export function useFormKitOutput(context) {
|
|
|
53
62
|
lg: "h-6 w-6",
|
|
54
63
|
xl: "h-7 w-7"
|
|
55
64
|
};
|
|
56
|
-
return iconSizeMap[size] || iconSizeMap.md;
|
|
65
|
+
return [iconSizeMap[size] || iconSizeMap.md, ui.value?.icon].filter(Boolean).join(" ");
|
|
57
66
|
});
|
|
58
67
|
const leadingIconName = computed(() => {
|
|
59
|
-
|
|
68
|
+
const leadingIcon = context.leadingIcon;
|
|
69
|
+
const leading = context.leading;
|
|
70
|
+
const icon = context.icon;
|
|
71
|
+
return leadingIcon || leading && icon || null;
|
|
60
72
|
});
|
|
61
73
|
const trailingIconName = computed(() => {
|
|
62
|
-
|
|
74
|
+
const trailingIcon = context.trailingIcon;
|
|
75
|
+
const trailing = context.trailing;
|
|
76
|
+
const icon = context.icon;
|
|
77
|
+
return trailingIcon || trailing && icon || null;
|
|
63
78
|
});
|
|
64
79
|
return {
|
|
65
80
|
colorClass,
|
|
@@ -68,6 +83,7 @@ export function useFormKitOutput(context) {
|
|
|
68
83
|
containerClass,
|
|
69
84
|
iconClass,
|
|
70
85
|
leadingIconName,
|
|
71
|
-
trailingIconName
|
|
86
|
+
trailingIconName,
|
|
87
|
+
ui
|
|
72
88
|
};
|
|
73
89
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfxcode/nuxt-ui-formkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "FormKit integration for Nuxt UI - Seamlessly connect FormKit form handling with Nuxt UI components",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Tom",
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@codemirror/lang-json": "^6.0.2",
|
|
100
|
-
"@codemirror/state": "^6.7.
|
|
100
|
+
"@codemirror/state": "^6.7.1",
|
|
101
101
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
102
|
-
"@codemirror/view": "^6.43.
|
|
102
|
+
"@codemirror/view": "^6.43.6",
|
|
103
103
|
"@iconify-json/heroicons": "^1.2.3",
|
|
104
104
|
"@iconify-json/lucide": "^1.2.116",
|
|
105
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
105
|
+
"@iconify-json/simple-icons": "^1.2.89",
|
|
106
106
|
"@nuxt/devtools": "4.0.0-alpha.7",
|
|
107
107
|
"@nuxt/eslint-config": "^1.16.0",
|
|
108
108
|
"@nuxt/module-builder": "^1.0.2",
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
"unbuild": "^3.6.1",
|
|
123
123
|
"valibot": "^1.4.2",
|
|
124
124
|
"vitepress": "2.0.0-alpha.17",
|
|
125
|
-
"vitest": "^4.1.
|
|
125
|
+
"vitest": "^4.1.10",
|
|
126
126
|
"vue": "^3.5.39",
|
|
127
127
|
"vue-i18n": "^11.4.6",
|
|
128
|
-
"vue-tsc": "^3.3.
|
|
128
|
+
"vue-tsc": "^3.3.7",
|
|
129
129
|
"zod": "^4.4.3"
|
|
130
130
|
},
|
|
131
131
|
"packageManager": "pnpm@11.1.2+sha512.415a1cc25974731e75455c1468371be74c5aa5fb7621b50d4056d222451609f11412f23fd602e6169f1e060466641f798597e1be961a10688836a67b16569499"
|