@sfxcode/nuxt-ui-formkit 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/FUAutoForm.d.vue.ts +7 -8
- package/dist/runtime/components/FUAutoForm.vue +7 -4
- 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.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUCheckbox.vue +3 -2
- package/dist/runtime/components/inputs/FUCheckbox.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUCheckboxGroup.vue +3 -2
- 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 +3 -3
- package/dist/runtime/components/inputs/FUInput.vue +2 -2
- package/dist/runtime/components/inputs/FUInputDate.vue +2 -2
- package/dist/runtime/components/inputs/FUInputMenu.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUInputMenu.vue +3 -2
- package/dist/runtime/components/inputs/FUInputMenu.vue.d.ts +1 -0
- 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.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUListbox.vue +10 -6
- package/dist/runtime/components/inputs/FUListbox.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUPinInput.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUPinInput.vue +3 -2
- package/dist/runtime/components/inputs/FUPinInput.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FURadioGroup.vue +3 -3
- package/dist/runtime/components/inputs/FUSelect.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUSelect.vue +3 -2
- package/dist/runtime/components/inputs/FUSelect.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUSelectMenu.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUSelectMenu.vue +3 -2
- package/dist/runtime/components/inputs/FUSelectMenu.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUSlider.vue +3 -3
- package/dist/runtime/components/inputs/FUSwitch.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUSwitch.vue +3 -2
- package/dist/runtime/components/inputs/FUSwitch.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUTextarea.vue +2 -2
- package/dist/runtime/components/inputs/FUTree.d.vue.ts +36 -0
- package/dist/runtime/components/inputs/FUTree.vue +52 -0
- package/dist/runtime/components/inputs/FUTree.vue.d.ts +36 -0
- 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/useFormKitAutoForm.d.ts +2 -0
- package/dist/runtime/composables/useFormKitAutoForm.js +86 -1
- package/dist/runtime/composables/useFormKitRepeater.js +5 -5
- package/dist/runtime/composables/useFormKitSchema.d.ts +7 -24
- package/dist/runtime/formkit/definitions/index.d.ts +1 -0
- package/dist/runtime/formkit/definitions/index.js +2 -1
- package/dist/runtime/formkit/definitions/index.mjs +2 -1
- package/dist/runtime/formkit/definitions/input.d.ts +1 -0
- package/dist/runtime/formkit/definitions/input.js +12 -7
- package/dist/runtime/formkit/definitions/input.mjs +12 -7
- package/dist/runtime/formkit/definitions/multiStep.js +8 -4
- package/dist/runtime/formkit/definitions/multiStep.mjs +8 -4
- 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 +10 -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,6 @@
|
|
|
1
1
|
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
|
|
3
4
|
import type { FormKitIconProps } from './FUIcon.vue.js';
|
|
4
5
|
export interface FormKitOutputNumberProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -12,6 +13,7 @@ export interface FormKitOutputNumberProps {
|
|
|
12
13
|
trailing?: boolean;
|
|
13
14
|
trailingIcon?: string;
|
|
14
15
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
16
|
+
ui?: FormKitOutputUi;
|
|
15
17
|
}
|
|
16
18
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
19
|
context: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
|
|
3
4
|
import type { FormKitIconProps } from './FUIcon.vue.js';
|
|
4
5
|
export interface FormKitOutputTextProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -11,6 +12,7 @@ export interface FormKitOutputTextProps {
|
|
|
11
12
|
trailingIcon?: string;
|
|
12
13
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
13
14
|
outputType?: 'text' | 'email' | 'url' | 'tel' | 'color' | 'duration' | 'i18n';
|
|
15
|
+
ui?: FormKitOutputUi;
|
|
14
16
|
}
|
|
15
17
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
16
18
|
context: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
|
+
import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
|
|
3
4
|
import type { FormKitIconProps } from './FUIcon.vue.js';
|
|
4
5
|
export interface FormKitOutputTextProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -11,6 +12,7 @@ export interface FormKitOutputTextProps {
|
|
|
11
12
|
trailingIcon?: string;
|
|
12
13
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
13
14
|
outputType?: 'text' | 'email' | 'url' | 'tel' | 'color' | 'duration' | 'i18n';
|
|
15
|
+
ui?: FormKitOutputUi;
|
|
14
16
|
}
|
|
15
17
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
16
18
|
context: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FormKitSchemaNode } from '@formkit/core';
|
|
2
2
|
export type AutoFormOverrides = Record<string, Record<string, unknown> | boolean>;
|
|
3
3
|
export declare function inferFormSchema(data: Record<string, unknown>, overrides?: AutoFormOverrides): FormKitSchemaNode[];
|
|
4
|
+
export declare function inferFormSchemaFromSamples(samples: Record<string, unknown>[], overrides?: AutoFormOverrides): FormKitSchemaNode[];
|
|
4
5
|
export interface ValibotLikePipeEntry {
|
|
5
6
|
kind: string;
|
|
6
7
|
type: string;
|
|
@@ -33,6 +34,7 @@ export interface ZodLikeSchema {
|
|
|
33
34
|
export declare function inferFormSchemaFromZod(schema: object, overrides?: AutoFormOverrides): FormKitSchemaNode[];
|
|
34
35
|
export declare function useFormKitAutoForm(): {
|
|
35
36
|
inferFormSchema: typeof inferFormSchema;
|
|
37
|
+
inferFormSchemaFromSamples: typeof inferFormSchemaFromSamples;
|
|
36
38
|
inferFormSchemaFromValibot: typeof inferFormSchemaFromValibot;
|
|
37
39
|
inferFormSchemaFromZod: typeof inferFormSchemaFromZod;
|
|
38
40
|
};
|
|
@@ -127,6 +127,91 @@ function inferNodes(data, overrides, pathPrefix = "") {
|
|
|
127
127
|
export function inferFormSchema(data, overrides) {
|
|
128
128
|
return inferNodes(data, overrides);
|
|
129
129
|
}
|
|
130
|
+
function isFilled(value) {
|
|
131
|
+
if (value === void 0 || value === null) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
if (typeof value === "string") {
|
|
135
|
+
return value !== "";
|
|
136
|
+
}
|
|
137
|
+
if (Array.isArray(value)) {
|
|
138
|
+
return value.length > 0;
|
|
139
|
+
}
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
function transposeSamples(samples) {
|
|
143
|
+
const columns = {};
|
|
144
|
+
for (const sample of samples) {
|
|
145
|
+
for (const key of Object.keys(sample)) {
|
|
146
|
+
columns[key] ??= samples.map((entry) => entry[key]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return columns;
|
|
150
|
+
}
|
|
151
|
+
function inferSampleNode(name, values, overrides, path) {
|
|
152
|
+
const presentValues = values.filter((value) => value !== void 0 && value !== null);
|
|
153
|
+
if (presentValues.length === 0) {
|
|
154
|
+
return void 0;
|
|
155
|
+
}
|
|
156
|
+
const filledValues = presentValues.filter(isFilled);
|
|
157
|
+
const required = filledValues.length === values.length;
|
|
158
|
+
const representative = filledValues[0] ?? presentValues[0];
|
|
159
|
+
const label = humanizeKey(name);
|
|
160
|
+
const validation = required && typeof representative !== "boolean" ? "required" : void 0;
|
|
161
|
+
const base = validation ? { name, label, validation } : { name, label };
|
|
162
|
+
if (typeof representative === "boolean") {
|
|
163
|
+
return { $formkit: "nuxtUISwitch", ...base };
|
|
164
|
+
}
|
|
165
|
+
if (typeof representative === "number") {
|
|
166
|
+
return { $formkit: "nuxtUIInputNumber", ...base };
|
|
167
|
+
}
|
|
168
|
+
if (representative instanceof Date) {
|
|
169
|
+
return { $formkit: "nuxtUIInputDate", ...base, valueType: "date" };
|
|
170
|
+
}
|
|
171
|
+
if (isDateValue(representative)) {
|
|
172
|
+
return { $formkit: "nuxtUIInputDate", ...base, valueType: "calendar" };
|
|
173
|
+
}
|
|
174
|
+
if (typeof representative === "string") {
|
|
175
|
+
if (isIsoDateString(representative)) {
|
|
176
|
+
return { $formkit: "nuxtUIInputDate", ...base, valueType: "iso" };
|
|
177
|
+
}
|
|
178
|
+
if (representative.includes("\n")) {
|
|
179
|
+
return { $formkit: "nuxtUITextarea", ...base };
|
|
180
|
+
}
|
|
181
|
+
return { $formkit: "nuxtUIInput", ...base };
|
|
182
|
+
}
|
|
183
|
+
if (Array.isArray(representative)) {
|
|
184
|
+
const [first] = representative;
|
|
185
|
+
if (isPlainObject(first)) {
|
|
186
|
+
const rows = presentValues.filter(Array.isArray).flat().filter(isPlainObject);
|
|
187
|
+
return {
|
|
188
|
+
$formkit: "nuxtUIRepeater",
|
|
189
|
+
...base,
|
|
190
|
+
newItem: blankItem(rows[0] ?? first),
|
|
191
|
+
children: inferSampleNodes(rows, overrides, path),
|
|
192
|
+
...REPEATER_BUTTON_DEFAULTS
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
return { $formkit: "nuxtUIInputTags", ...base };
|
|
196
|
+
}
|
|
197
|
+
if (isPlainObject(representative)) {
|
|
198
|
+
return { $formkit: "group", name, children: inferSampleNodes(presentValues.filter(isPlainObject), overrides, path) };
|
|
199
|
+
}
|
|
200
|
+
return void 0;
|
|
201
|
+
}
|
|
202
|
+
function inferSampleNodes(samples, overrides, pathPrefix = "") {
|
|
203
|
+
return buildNodes(transposeSamples(samples), (key, values, path) => inferSampleNode(key, values, overrides, path), overrides, pathPrefix);
|
|
204
|
+
}
|
|
205
|
+
export function inferFormSchemaFromSamples(samples, overrides) {
|
|
206
|
+
if (!Array.isArray(samples)) {
|
|
207
|
+
return [];
|
|
208
|
+
}
|
|
209
|
+
const records = samples.filter(isPlainObject);
|
|
210
|
+
if (records.length === 0) {
|
|
211
|
+
return [];
|
|
212
|
+
}
|
|
213
|
+
return inferSampleNodes(records, overrides);
|
|
214
|
+
}
|
|
130
215
|
const OPTIONAL_WRAPPER_TYPES = /* @__PURE__ */ new Set(["optional", "nullable", "nullish", "exact_optional"]);
|
|
131
216
|
function unwrapValibot(entry) {
|
|
132
217
|
let schema = entry;
|
|
@@ -345,5 +430,5 @@ export function inferFormSchemaFromZod(schema, overrides) {
|
|
|
345
430
|
return inferZodNodes(root.shape, overrides);
|
|
346
431
|
}
|
|
347
432
|
export function useFormKitAutoForm() {
|
|
348
|
-
return { inferFormSchema, inferFormSchemaFromValibot, inferFormSchemaFromZod };
|
|
433
|
+
return { inferFormSchema, inferFormSchemaFromSamples, inferFormSchemaFromValibot, inferFormSchemaFromZod };
|
|
349
434
|
}
|
|
@@ -40,7 +40,7 @@ export function useFormKitRepeater() {
|
|
|
40
40
|
return `formkit-item-${index}-${uuid}`;
|
|
41
41
|
};
|
|
42
42
|
node.context.insertNode = (parentNode) => () => {
|
|
43
|
-
if (parentNode && Array.isArray(parentNode.
|
|
43
|
+
if (parentNode && Array.isArray(parentNode.value)) {
|
|
44
44
|
const newArray = [{ ...newItem }, ...parentNode.value];
|
|
45
45
|
parentNode.input(newArray, false);
|
|
46
46
|
syncOuterValue(newArray);
|
|
@@ -54,7 +54,7 @@ export function useFormKitRepeater() {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
node.context.addNode = (parentNode, index) => () => {
|
|
57
|
-
if (parentNode && Array.isArray(parentNode.
|
|
57
|
+
if (parentNode && Array.isArray(parentNode.value)) {
|
|
58
58
|
const array = parentNode.value;
|
|
59
59
|
array.splice(index + 1, 0, { ...newItem });
|
|
60
60
|
parentNode.input(array, false);
|
|
@@ -62,7 +62,7 @@ export function useFormKitRepeater() {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
node.context.cloneNode = (parentNode, index) => () => {
|
|
65
|
-
if (parentNode && Array.isArray(parentNode.
|
|
65
|
+
if (parentNode && Array.isArray(parentNode.value)) {
|
|
66
66
|
const item = parentNode.value[index];
|
|
67
67
|
const array = parentNode.value;
|
|
68
68
|
array.splice(index + 1, 0, { ...item });
|
|
@@ -80,7 +80,7 @@ export function useFormKitRepeater() {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
node.context.moveNodeDown = (parentNode, index) => () => {
|
|
83
|
-
if (parentNode && Array.isArray(parentNode.
|
|
83
|
+
if (parentNode && Array.isArray(parentNode.value)) {
|
|
84
84
|
if (index < parentNode.value.length - 1) {
|
|
85
85
|
const newArray = swapElements(parentNode.value, index, index + 1);
|
|
86
86
|
parentNode.input(newArray, false);
|
|
@@ -107,7 +107,7 @@ export function useFormKitRepeater() {
|
|
|
107
107
|
};
|
|
108
108
|
node.context.dropNode = (parentNode, targetIndex) => (event) => {
|
|
109
109
|
event?.preventDefault();
|
|
110
|
-
if (!parentNode || !Array.isArray(parentNode.
|
|
110
|
+
if (!parentNode || !Array.isArray(parentNode.value)) {
|
|
111
111
|
dragOverIndex = null;
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
+
import type { FormKitSchemaAttributes, FormKitSchemaComponent, FormKitSchemaFormKit, FormKitSchemaNode } from '@formkit/core';
|
|
1
2
|
export declare function useFormKitSchema(): {
|
|
2
|
-
addComponent: (component?: string, props?:
|
|
3
|
-
addElement: (element?: string, children?:
|
|
4
|
-
addGroup: (name: string, children?:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
children: object[];
|
|
9
|
-
};
|
|
10
|
-
addList: (name: string, children?: object[], dynamic?: boolean, render?: string | boolean, formKitAttrs?: object) => {
|
|
11
|
-
$formkit: string;
|
|
12
|
-
if: string;
|
|
13
|
-
name: string;
|
|
14
|
-
dynamic: boolean;
|
|
15
|
-
children: object[];
|
|
16
|
-
};
|
|
17
|
-
addListGroup: (children?: object[], render?: string | boolean, formKitAttrs?: object) => {
|
|
18
|
-
$formkit: string;
|
|
19
|
-
if: string;
|
|
20
|
-
for: string[];
|
|
21
|
-
key: string;
|
|
22
|
-
index: string;
|
|
23
|
-
children: object[];
|
|
24
|
-
};
|
|
25
|
-
addElementsInOuterDiv: (children?: object[], innerClass?: string, outerClass?: string, label?: string, help?: string, render?: string | boolean) => object;
|
|
3
|
+
addComponent: (component?: string, props?: Record<string, unknown>, render?: string | boolean, formKitAttrs?: Record<string, unknown>) => FormKitSchemaComponent;
|
|
4
|
+
addElement: (element?: string, children?: FormKitSchemaNode[] | string, attrs?: FormKitSchemaAttributes, render?: string | boolean, formKitAttrs?: Record<string, unknown>) => FormKitSchemaNode;
|
|
5
|
+
addGroup: (name: string, children?: FormKitSchemaNode[], render?: string | boolean, formKitAttrs?: Record<string, unknown>) => FormKitSchemaFormKit;
|
|
6
|
+
addList: (name: string, children?: FormKitSchemaNode[], dynamic?: boolean, render?: string | boolean, formKitAttrs?: Record<string, unknown>) => FormKitSchemaFormKit;
|
|
7
|
+
addListGroup: (children?: FormKitSchemaNode[], render?: string | boolean, formKitAttrs?: Record<string, unknown>) => FormKitSchemaFormKit;
|
|
8
|
+
addElementsInOuterDiv: (children?: FormKitSchemaNode[], innerClass?: string, outerClass?: string, label?: string, help?: string, render?: string | boolean) => FormKitSchemaNode;
|
|
26
9
|
};
|
|
@@ -24,6 +24,7 @@ export declare const nuxtUIInputs: {
|
|
|
24
24
|
nuxtUIStep: import("@formkit/core").FormKitTypeDefinition;
|
|
25
25
|
nuxtUISwitch: import("@formkit/core").FormKitTypeDefinition;
|
|
26
26
|
nuxtUITextarea: import("@formkit/core").FormKitTypeDefinition;
|
|
27
|
+
nuxtUITree: import("@formkit/core").FormKitTypeDefinition;
|
|
27
28
|
nuxtUIRepeater: import("@formkit/core").FormKitTypeDefinition;
|
|
28
29
|
};
|
|
29
30
|
export declare const nuxtUIOutputs: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nuxtUICalendarDefinition, nuxtUICheckboxDefinition, nuxtUICheckboxGroupDefinition, nuxtUIColorPickerDefinition, nuxtUIEditorDefinition, nuxtUIFileUploadDefinition, nuxtUIInputDateDefinition, nuxtUIInputDefinition, nuxtUIInputMenuDefinition, nuxtUIInputNumberDefinition, nuxtUIInputTagsDefinition, nuxtUIInputTimeDefinition, nuxtUIListboxDefinition, nuxtUIPinInputDefinition, nuxtUIRadioGroupDefinition, nuxtUISelectDefinition, nuxtUISelectMenuDefinition, nuxtUISliderDefinition, nuxtUISwitchDefinition, nuxtUITextareaDefinition } from "./input.js";
|
|
1
|
+
import { nuxtUICalendarDefinition, nuxtUICheckboxDefinition, nuxtUICheckboxGroupDefinition, nuxtUIColorPickerDefinition, nuxtUIEditorDefinition, nuxtUIFileUploadDefinition, nuxtUIInputDateDefinition, nuxtUIInputDefinition, nuxtUIInputMenuDefinition, nuxtUIInputNumberDefinition, nuxtUIInputTagsDefinition, nuxtUIInputTimeDefinition, nuxtUIListboxDefinition, nuxtUIPinInputDefinition, nuxtUIRadioGroupDefinition, nuxtUISelectDefinition, nuxtUISelectMenuDefinition, nuxtUISliderDefinition, nuxtUISwitchDefinition, nuxtUITextareaDefinition, nuxtUITreeDefinition } from "./input.js";
|
|
2
2
|
import { nuxtUIMultiStepDefinition, nuxtUIStepDefinition } from "./multiStep.js";
|
|
3
3
|
import { nuxtUIOutputBooleanDefinition, nuxtUIOutputDateDefinition, nuxtUIOutputLinkDefinition, nuxtUIOutputListDefinition, nuxtUIOutputNumberDefinition, nuxtUIOutputTextDefinition } from "./output.js";
|
|
4
4
|
import { nuxtUIRepeaterDefinition } from "./repeater.js";
|
|
@@ -28,6 +28,7 @@ export const nuxtUIInputs = {
|
|
|
28
28
|
nuxtUIStep: nuxtUIStepDefinition,
|
|
29
29
|
nuxtUISwitch: nuxtUISwitchDefinition,
|
|
30
30
|
nuxtUITextarea: nuxtUITextareaDefinition,
|
|
31
|
+
nuxtUITree: nuxtUITreeDefinition,
|
|
31
32
|
nuxtUIRepeater: nuxtUIRepeaterDefinition
|
|
32
33
|
};
|
|
33
34
|
export const nuxtUIOutputs = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nuxtUICalendarDefinition, nuxtUICheckboxDefinition, nuxtUICheckboxGroupDefinition, nuxtUIColorPickerDefinition, nuxtUIEditorDefinition, nuxtUIFileUploadDefinition, nuxtUIInputDateDefinition, nuxtUIInputDefinition, nuxtUIInputMenuDefinition, nuxtUIInputNumberDefinition, nuxtUIInputTagsDefinition, nuxtUIInputTimeDefinition, nuxtUIListboxDefinition, nuxtUIPinInputDefinition, nuxtUIRadioGroupDefinition, nuxtUISelectDefinition, nuxtUISelectMenuDefinition, nuxtUISliderDefinition, nuxtUISwitchDefinition, nuxtUITextareaDefinition } from "./input.mjs";
|
|
1
|
+
import { nuxtUICalendarDefinition, nuxtUICheckboxDefinition, nuxtUICheckboxGroupDefinition, nuxtUIColorPickerDefinition, nuxtUIEditorDefinition, nuxtUIFileUploadDefinition, nuxtUIInputDateDefinition, nuxtUIInputDefinition, nuxtUIInputMenuDefinition, nuxtUIInputNumberDefinition, nuxtUIInputTagsDefinition, nuxtUIInputTimeDefinition, nuxtUIListboxDefinition, nuxtUIPinInputDefinition, nuxtUIRadioGroupDefinition, nuxtUISelectDefinition, nuxtUISelectMenuDefinition, nuxtUISliderDefinition, nuxtUISwitchDefinition, nuxtUITextareaDefinition, nuxtUITreeDefinition } from "./input.mjs";
|
|
2
2
|
import { nuxtUIMultiStepDefinition, nuxtUIStepDefinition } from "./multiStep.mjs";
|
|
3
3
|
import { nuxtUIOutputBooleanDefinition, nuxtUIOutputDateDefinition, nuxtUIOutputLinkDefinition, nuxtUIOutputListDefinition, nuxtUIOutputNumberDefinition, nuxtUIOutputTextDefinition } from "./output.mjs";
|
|
4
4
|
import { nuxtUIRepeaterDefinition } from "./repeater.mjs";
|
|
@@ -28,6 +28,7 @@ export const nuxtUIInputs = {
|
|
|
28
28
|
nuxtUIStep: nuxtUIStepDefinition,
|
|
29
29
|
nuxtUISwitch: nuxtUISwitchDefinition,
|
|
30
30
|
nuxtUITextarea: nuxtUITextareaDefinition,
|
|
31
|
+
nuxtUITree: nuxtUITreeDefinition,
|
|
31
32
|
nuxtUIRepeater: nuxtUIRepeaterDefinition
|
|
32
33
|
};
|
|
33
34
|
export const nuxtUIOutputs = {
|
|
@@ -19,3 +19,4 @@ export declare const nuxtUISelectMenuDefinition: FormKitTypeDefinition;
|
|
|
19
19
|
export declare const nuxtUISliderDefinition: FormKitTypeDefinition;
|
|
20
20
|
export declare const nuxtUISwitchDefinition: FormKitTypeDefinition;
|
|
21
21
|
export declare const nuxtUITextareaDefinition: FormKitTypeDefinition;
|
|
22
|
+
export declare const nuxtUITreeDefinition: FormKitTypeDefinition;
|
|
@@ -19,12 +19,13 @@ import FUSelectMenu from "../../../runtime/components/inputs/FUSelectMenu.vue";
|
|
|
19
19
|
import FUSlider from "../../../runtime/components/inputs/FUSlider.vue";
|
|
20
20
|
import FUSwitch from "../../../runtime/components/inputs/FUSwitch.vue";
|
|
21
21
|
import FUTextarea from "../../../runtime/components/inputs/FUTextarea.vue";
|
|
22
|
+
import FUTree from "../../../runtime/components/inputs/FUTree.vue";
|
|
22
23
|
export const nuxtUICalendarDefinition = createInput(FUCalendar, {
|
|
23
24
|
props: ["type", "range", "multiple", "color", "variant", "size", "weekNumbers", "monthControls", "yearControls", "viewControl", "defaultValue", "minValue", "maxValue", "isDateDisabled", "isDateUnavailable", "ui", "valueType", "timeZone"],
|
|
24
25
|
family: "NuxtUIInput"
|
|
25
26
|
});
|
|
26
27
|
export const nuxtUICheckboxDefinition = createInput(FUCheckbox, {
|
|
27
|
-
props: ["label", "description", "color", "variant", "size", "indicator", "icon", "indeterminateIcon", "trueValue", "falseValue", "autofocus", "ui"],
|
|
28
|
+
props: ["label", "description", "color", "variant", "size", "indicator", "icon", "indeterminateIcon", "trueValue", "falseValue", "autofocus", "name", "ui"],
|
|
28
29
|
family: "NuxtUIInput"
|
|
29
30
|
});
|
|
30
31
|
export const nuxtUICheckboxGroupDefinition = createInput(FUCheckboxGroup, {
|
|
@@ -52,7 +53,7 @@ export const nuxtUIInputDateDefinition = createInput(FUInputDate, {
|
|
|
52
53
|
family: "NuxtUIInput"
|
|
53
54
|
});
|
|
54
55
|
export const nuxtUIInputMenuDefinition = createInput(FUInputMenu, {
|
|
55
|
-
props: ["options", "inputType", "placeholder", "color", "variant", "size", "autofocus", "autofocusDelay", "trailingIcon", "selectedIcon", "deleteIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "mode", "by", "open", "valueKey", "labelKey", "descriptionKey", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "openOnClick", "openOnFocus", "icon", "leading", "leadingIcon", "trailing", "loading", "loadingIcon", "list", "autocomplete", "searchTerm", "ui"],
|
|
56
|
+
props: ["options", "inputType", "placeholder", "color", "variant", "size", "autofocus", "autofocusDelay", "trailingIcon", "selectedIcon", "deleteIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "mode", "by", "open", "valueKey", "labelKey", "descriptionKey", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "openOnClick", "openOnFocus", "icon", "leading", "leadingIcon", "trailing", "loading", "loadingIcon", "list", "autocomplete", "searchTerm", "name", "ui"],
|
|
56
57
|
family: "NuxtUIInput"
|
|
57
58
|
});
|
|
58
59
|
export const nuxtUIInputNumberDefinition = createInput(FUInputNumber, {
|
|
@@ -68,11 +69,11 @@ export const nuxtUIInputTimeDefinition = createInput(FUInputTime, {
|
|
|
68
69
|
family: "NuxtUIInput"
|
|
69
70
|
});
|
|
70
71
|
export const nuxtUIListboxDefinition = createInput(FUListbox, {
|
|
71
|
-
props: ["options", "as", "color", "size", "by", "orientation", "selectionBehavior", "disabled", "defaultValue", "multiple", "valueKey", "labelKey", "descriptionKey", "loading", "loadingIcon", "filter", "filterFields", "ignoreFilter", "selectedIcon", "virtualize", "highlight", "highlightOnHover", "autofocus", "autofocusDelay", "searchTerm", "ui", "displayMode", "transferLeftHeaderText", "transferRightHeaderText", "transferAll", "transferHeaderClass", "transferSortIcons", "transferItemDraggable"],
|
|
72
|
+
props: ["options", "as", "color", "size", "by", "orientation", "selectionBehavior", "disabled", "defaultValue", "multiple", "valueKey", "labelKey", "descriptionKey", "loading", "loadingIcon", "filter", "filterFields", "ignoreFilter", "selectedIcon", "virtualize", "highlight", "highlightOnHover", "autofocus", "autofocusDelay", "searchTerm", "name", "ui", "displayMode", "transferLeftHeaderText", "transferRightHeaderText", "transferAll", "transferHeaderClass", "transferSortIcons", "transferItemDraggable"],
|
|
72
73
|
family: "NuxtUIInput"
|
|
73
74
|
});
|
|
74
75
|
export const nuxtUIPinInputDefinition = createInput(FUPinInput, {
|
|
75
|
-
props: ["color", "variant", "size", "length", "autofocus", "autofocusDelay", "highlight", "fixed", "defaultValue", "mask", "otp", "separator", "type", "placeholder", "ui"],
|
|
76
|
+
props: ["color", "variant", "size", "length", "autofocus", "autofocusDelay", "highlight", "fixed", "defaultValue", "mask", "otp", "separator", "type", "placeholder", "name", "ui"],
|
|
76
77
|
family: "NuxtUIInput"
|
|
77
78
|
});
|
|
78
79
|
export const nuxtUIRadioGroupDefinition = createInput(FURadioGroup, {
|
|
@@ -80,11 +81,11 @@ export const nuxtUIRadioGroupDefinition = createInput(FURadioGroup, {
|
|
|
80
81
|
family: "NuxtUIInput"
|
|
81
82
|
});
|
|
82
83
|
export const nuxtUISelectDefinition = createInput(FUSelect, {
|
|
83
|
-
props: ["options", "placeholder", "color", "variant", "size", "selectedIcon", "arrow", "portal", "content", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "autofocus", "autofocusDelay", "open", "defaultOpen", "autocomplete", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "ui"],
|
|
84
|
+
props: ["options", "placeholder", "color", "variant", "size", "selectedIcon", "arrow", "portal", "content", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "autofocus", "autofocusDelay", "open", "defaultOpen", "autocomplete", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "name", "ui"],
|
|
84
85
|
family: "NuxtUIInput"
|
|
85
86
|
});
|
|
86
87
|
export const nuxtUISelectMenuDefinition = createInput(FUSelectMenu, {
|
|
87
|
-
props: ["options", "placeholder", "searchInput", "color", "variant", "size", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "selectedIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "by", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "autofocus", "autofocusDelay", "open", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "searchTerm", "ui"],
|
|
88
|
+
props: ["options", "placeholder", "searchInput", "color", "variant", "size", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "selectedIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "by", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "autofocus", "autofocusDelay", "open", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "searchTerm", "name", "ui"],
|
|
88
89
|
family: "NuxtUIInput"
|
|
89
90
|
});
|
|
90
91
|
export const nuxtUISliderDefinition = createInput(FUSlider, {
|
|
@@ -92,10 +93,14 @@ export const nuxtUISliderDefinition = createInput(FUSlider, {
|
|
|
92
93
|
family: "NuxtUIInput"
|
|
93
94
|
});
|
|
94
95
|
export const nuxtUISwitchDefinition = createInput(FUSwitch, {
|
|
95
|
-
props: ["color", "size", "loading", "loadingIcon", "checkedIcon", "uncheckedIcon", "label", "description", "defaultValue", "trueValue", "falseValue", "autofocus", "ui"],
|
|
96
|
+
props: ["color", "size", "loading", "loadingIcon", "checkedIcon", "uncheckedIcon", "label", "description", "defaultValue", "trueValue", "falseValue", "autofocus", "name", "ui"],
|
|
96
97
|
family: "NuxtUIInput"
|
|
97
98
|
});
|
|
98
99
|
export const nuxtUITextareaDefinition = createInput(FUTextarea, {
|
|
99
100
|
props: ["color", "size", "variant", "placeholder", "autofocus", "autofocusDelay", "autoresize", "autoresizeDelay", "rows", "maxrows", "highlight", "fixed", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "cols", "dirname", "maxlength", "minlength", "wrap", "ui"],
|
|
100
101
|
family: "NuxtUIInput"
|
|
101
102
|
});
|
|
103
|
+
export const nuxtUITreeDefinition = createInput(FUTree, {
|
|
104
|
+
props: ["color", "size", "disabled", "multiple", "nested", "virtualize", "labelKey", "trailingIcon", "expandedIcon", "collapsedIcon", "expanded", "defaultExpanded", "selectionBehavior", "propagateSelect", "bubbleSelect", "ui", "items", "options"],
|
|
105
|
+
family: "NuxtUIInput"
|
|
106
|
+
});
|
|
@@ -19,12 +19,13 @@ import FUSelectMenu from "../../../runtime/components/inputs/FUSelectMenu.vue";
|
|
|
19
19
|
import FUSlider from "../../../runtime/components/inputs/FUSlider.vue";
|
|
20
20
|
import FUSwitch from "../../../runtime/components/inputs/FUSwitch.vue";
|
|
21
21
|
import FUTextarea from "../../../runtime/components/inputs/FUTextarea.vue";
|
|
22
|
+
import FUTree from "../../../runtime/components/inputs/FUTree.vue";
|
|
22
23
|
export const nuxtUICalendarDefinition = createInput(FUCalendar, {
|
|
23
24
|
props: ["type", "range", "multiple", "color", "variant", "size", "weekNumbers", "monthControls", "yearControls", "viewControl", "defaultValue", "minValue", "maxValue", "isDateDisabled", "isDateUnavailable", "ui", "valueType", "timeZone"],
|
|
24
25
|
family: "NuxtUIInput"
|
|
25
26
|
});
|
|
26
27
|
export const nuxtUICheckboxDefinition = createInput(FUCheckbox, {
|
|
27
|
-
props: ["label", "description", "color", "variant", "size", "indicator", "icon", "indeterminateIcon", "trueValue", "falseValue", "autofocus", "ui"],
|
|
28
|
+
props: ["label", "description", "color", "variant", "size", "indicator", "icon", "indeterminateIcon", "trueValue", "falseValue", "autofocus", "name", "ui"],
|
|
28
29
|
family: "NuxtUIInput"
|
|
29
30
|
});
|
|
30
31
|
export const nuxtUICheckboxGroupDefinition = createInput(FUCheckboxGroup, {
|
|
@@ -52,7 +53,7 @@ export const nuxtUIInputDateDefinition = createInput(FUInputDate, {
|
|
|
52
53
|
family: "NuxtUIInput"
|
|
53
54
|
});
|
|
54
55
|
export const nuxtUIInputMenuDefinition = createInput(FUInputMenu, {
|
|
55
|
-
props: ["options", "inputType", "placeholder", "color", "variant", "size", "autofocus", "autofocusDelay", "trailingIcon", "selectedIcon", "deleteIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "mode", "by", "open", "valueKey", "labelKey", "descriptionKey", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "openOnClick", "openOnFocus", "icon", "leading", "leadingIcon", "trailing", "loading", "loadingIcon", "list", "autocomplete", "searchTerm", "ui"],
|
|
56
|
+
props: ["options", "inputType", "placeholder", "color", "variant", "size", "autofocus", "autofocusDelay", "trailingIcon", "selectedIcon", "deleteIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "mode", "by", "open", "valueKey", "labelKey", "descriptionKey", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "openOnClick", "openOnFocus", "icon", "leading", "leadingIcon", "trailing", "loading", "loadingIcon", "list", "autocomplete", "searchTerm", "name", "ui"],
|
|
56
57
|
family: "NuxtUIInput"
|
|
57
58
|
});
|
|
58
59
|
export const nuxtUIInputNumberDefinition = createInput(FUInputNumber, {
|
|
@@ -68,11 +69,11 @@ export const nuxtUIInputTimeDefinition = createInput(FUInputTime, {
|
|
|
68
69
|
family: "NuxtUIInput"
|
|
69
70
|
});
|
|
70
71
|
export const nuxtUIListboxDefinition = createInput(FUListbox, {
|
|
71
|
-
props: ["options", "as", "color", "size", "by", "orientation", "selectionBehavior", "disabled", "defaultValue", "multiple", "valueKey", "labelKey", "descriptionKey", "loading", "loadingIcon", "filter", "filterFields", "ignoreFilter", "selectedIcon", "virtualize", "highlight", "highlightOnHover", "autofocus", "autofocusDelay", "searchTerm", "ui", "displayMode", "transferLeftHeaderText", "transferRightHeaderText", "transferAll", "transferHeaderClass", "transferSortIcons", "transferItemDraggable"],
|
|
72
|
+
props: ["options", "as", "color", "size", "by", "orientation", "selectionBehavior", "disabled", "defaultValue", "multiple", "valueKey", "labelKey", "descriptionKey", "loading", "loadingIcon", "filter", "filterFields", "ignoreFilter", "selectedIcon", "virtualize", "highlight", "highlightOnHover", "autofocus", "autofocusDelay", "searchTerm", "name", "ui", "displayMode", "transferLeftHeaderText", "transferRightHeaderText", "transferAll", "transferHeaderClass", "transferSortIcons", "transferItemDraggable"],
|
|
72
73
|
family: "NuxtUIInput"
|
|
73
74
|
});
|
|
74
75
|
export const nuxtUIPinInputDefinition = createInput(FUPinInput, {
|
|
75
|
-
props: ["color", "variant", "size", "length", "autofocus", "autofocusDelay", "highlight", "fixed", "defaultValue", "mask", "otp", "separator", "type", "placeholder", "ui"],
|
|
76
|
+
props: ["color", "variant", "size", "length", "autofocus", "autofocusDelay", "highlight", "fixed", "defaultValue", "mask", "otp", "separator", "type", "placeholder", "name", "ui"],
|
|
76
77
|
family: "NuxtUIInput"
|
|
77
78
|
});
|
|
78
79
|
export const nuxtUIRadioGroupDefinition = createInput(FURadioGroup, {
|
|
@@ -80,11 +81,11 @@ export const nuxtUIRadioGroupDefinition = createInput(FURadioGroup, {
|
|
|
80
81
|
family: "NuxtUIInput"
|
|
81
82
|
});
|
|
82
83
|
export const nuxtUISelectDefinition = createInput(FUSelect, {
|
|
83
|
-
props: ["options", "placeholder", "color", "variant", "size", "selectedIcon", "arrow", "portal", "content", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "autofocus", "autofocusDelay", "open", "defaultOpen", "autocomplete", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "ui"],
|
|
84
|
+
props: ["options", "placeholder", "color", "variant", "size", "selectedIcon", "arrow", "portal", "content", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "autofocus", "autofocusDelay", "open", "defaultOpen", "autocomplete", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "name", "ui"],
|
|
84
85
|
family: "NuxtUIInput"
|
|
85
86
|
});
|
|
86
87
|
export const nuxtUISelectMenuDefinition = createInput(FUSelectMenu, {
|
|
87
|
-
props: ["options", "placeholder", "searchInput", "color", "variant", "size", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "selectedIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "by", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "autofocus", "autofocusDelay", "open", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "searchTerm", "ui"],
|
|
88
|
+
props: ["options", "placeholder", "searchInput", "color", "variant", "size", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "selectedIcon", "clear", "clearIcon", "arrow", "portal", "virtualize", "content", "by", "valueKey", "labelKey", "descriptionKey", "defaultValue", "multiple", "highlight", "fixed", "createItem", "filterFields", "ignoreFilter", "autofocus", "autofocusDelay", "open", "defaultOpen", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "searchTerm", "name", "ui"],
|
|
88
89
|
family: "NuxtUIInput"
|
|
89
90
|
});
|
|
90
91
|
export const nuxtUISliderDefinition = createInput(FUSlider, {
|
|
@@ -92,10 +93,14 @@ export const nuxtUISliderDefinition = createInput(FUSlider, {
|
|
|
92
93
|
family: "NuxtUIInput"
|
|
93
94
|
});
|
|
94
95
|
export const nuxtUISwitchDefinition = createInput(FUSwitch, {
|
|
95
|
-
props: ["color", "size", "loading", "loadingIcon", "checkedIcon", "uncheckedIcon", "label", "description", "defaultValue", "trueValue", "falseValue", "autofocus", "ui"],
|
|
96
|
+
props: ["color", "size", "loading", "loadingIcon", "checkedIcon", "uncheckedIcon", "label", "description", "defaultValue", "trueValue", "falseValue", "autofocus", "name", "ui"],
|
|
96
97
|
family: "NuxtUIInput"
|
|
97
98
|
});
|
|
98
99
|
export const nuxtUITextareaDefinition = createInput(FUTextarea, {
|
|
99
100
|
props: ["color", "size", "variant", "placeholder", "autofocus", "autofocusDelay", "autoresize", "autoresizeDelay", "rows", "maxrows", "highlight", "fixed", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "cols", "dirname", "maxlength", "minlength", "wrap", "ui"],
|
|
100
101
|
family: "NuxtUIInput"
|
|
101
102
|
});
|
|
103
|
+
export const nuxtUITreeDefinition = createInput(FUTree, {
|
|
104
|
+
props: ["color", "size", "disabled", "multiple", "nested", "virtualize", "labelKey", "trailingIcon", "expandedIcon", "collapsedIcon", "expanded", "defaultExpanded", "selectionBehavior", "propagateSelect", "bubbleSelect", "ui", "items", "options"],
|
|
105
|
+
family: "NuxtUIInput"
|
|
106
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { disablesChildren } from "@formkit/inputs";
|
|
1
|
+
import { disablesChildren, localize } from "@formkit/inputs";
|
|
2
2
|
import { createInput } from "@formkit/vue";
|
|
3
3
|
import { useFormKitMultiStep } from "../../composables/useFormKitMultiStep.js";
|
|
4
4
|
import { useFormKitSchema } from "../../composables/useFormKitSchema.js";
|
|
@@ -14,14 +14,14 @@ export const nuxtUIStepDefinition = createInput(
|
|
|
14
14
|
addElement("div", "$slots.default", { class: "formkit-step-inner" }),
|
|
15
15
|
addElement("div", [
|
|
16
16
|
addStepActionButton(
|
|
17
|
-
{ if: "$previousLabel", then: "$previousLabel", else: "
|
|
17
|
+
{ if: "$previousLabel", then: "$previousLabel", else: "$ui.prev.value" },
|
|
18
18
|
"$handlers.previous",
|
|
19
19
|
"$previousAttrs",
|
|
20
20
|
"$isFirstStep === false",
|
|
21
21
|
"outline"
|
|
22
22
|
),
|
|
23
23
|
addStepActionButton(
|
|
24
|
-
{ if: "$nextLabel", then: "$nextLabel", else: "
|
|
24
|
+
{ if: "$nextLabel", then: "$nextLabel", else: "$ui.next.value" },
|
|
25
25
|
"$handlers.next",
|
|
26
26
|
"$nextAttrs",
|
|
27
27
|
"$isLastStep === false || $stepIndex === 0",
|
|
@@ -42,7 +42,11 @@ export const nuxtUIStepDefinition = createInput(
|
|
|
42
42
|
forceTypeProp: "step",
|
|
43
43
|
family: "NuxtUIInput",
|
|
44
44
|
props: ["beforeStepChange", "nextAttrs", "nextLabel", "previousAttrs", "previousLabel", "validStepIcon", "ui", "stepActionsClass"],
|
|
45
|
-
|
|
45
|
+
// `localize('next')`/`localize('prev')` seed the `node.store` "ui" messages
|
|
46
|
+
// that `$ui.next.value`/`$ui.prev.value` (in the schema above) read - without
|
|
47
|
+
// them the schema expression resolves to nothing. Matches `@formkit/addons`'
|
|
48
|
+
// own `step` input definition, which includes the same two features.
|
|
49
|
+
features: [disablesChildren, addStepHandler, localize("next"), localize("prev")]
|
|
46
50
|
},
|
|
47
51
|
{
|
|
48
52
|
// `createInput()` always wraps the given schema in FormKit's standard
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { disablesChildren } from "@formkit/inputs";
|
|
1
|
+
import { disablesChildren, localize } from "@formkit/inputs";
|
|
2
2
|
import { createInput } from "@formkit/vue";
|
|
3
3
|
import { useFormKitMultiStep } from "../../composables/useFormKitMultiStep";
|
|
4
4
|
import { useFormKitSchema } from "../../composables/useFormKitSchema";
|
|
@@ -14,14 +14,14 @@ export const nuxtUIStepDefinition = createInput(
|
|
|
14
14
|
addElement("div", "$slots.default", { class: "formkit-step-inner" }),
|
|
15
15
|
addElement("div", [
|
|
16
16
|
addStepActionButton(
|
|
17
|
-
{ if: "$previousLabel", then: "$previousLabel", else: "
|
|
17
|
+
{ if: "$previousLabel", then: "$previousLabel", else: "$ui.prev.value" },
|
|
18
18
|
"$handlers.previous",
|
|
19
19
|
"$previousAttrs",
|
|
20
20
|
"$isFirstStep === false",
|
|
21
21
|
"outline"
|
|
22
22
|
),
|
|
23
23
|
addStepActionButton(
|
|
24
|
-
{ if: "$nextLabel", then: "$nextLabel", else: "
|
|
24
|
+
{ if: "$nextLabel", then: "$nextLabel", else: "$ui.next.value" },
|
|
25
25
|
"$handlers.next",
|
|
26
26
|
"$nextAttrs",
|
|
27
27
|
"$isLastStep === false || $stepIndex === 0",
|
|
@@ -42,7 +42,11 @@ export const nuxtUIStepDefinition = createInput(
|
|
|
42
42
|
forceTypeProp: "step",
|
|
43
43
|
family: "NuxtUIInput",
|
|
44
44
|
props: ["beforeStepChange", "nextAttrs", "nextLabel", "previousAttrs", "previousLabel", "validStepIcon", "ui", "stepActionsClass"],
|
|
45
|
-
|
|
45
|
+
// `localize('next')`/`localize('prev')` seed the `node.store` "ui" messages
|
|
46
|
+
// that `$ui.next.value`/`$ui.prev.value` (in the schema above) read - without
|
|
47
|
+
// them the schema expression resolves to nothing. Matches `@formkit/addons`'
|
|
48
|
+
// own `step` input definition, which includes the same two features.
|
|
49
|
+
features: [disablesChildren, addStepHandler, localize("next"), localize("prev")]
|
|
46
50
|
},
|
|
47
51
|
{
|
|
48
52
|
// `createInput()` always wraps the given schema in FormKit's standard
|
|
@@ -6,26 +6,26 @@ import FUOutputLink from "../../../runtime/components/output/FUOutputLink.vue";
|
|
|
6
6
|
import FUOutputNumber from "../../../runtime/components/output/FUOutputNumber.vue";
|
|
7
7
|
import FUOutputList from "../../../runtime/components/output/FUOutputList.vue";
|
|
8
8
|
export const nuxtUIOutputTextDefinition = createInput(FUOutputText, {
|
|
9
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "outputType"],
|
|
9
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "outputType", "ui"],
|
|
10
10
|
family: "NuxtUIOutput"
|
|
11
11
|
});
|
|
12
12
|
export const nuxtUIOutputBooleanDefinition = createInput(FUOutputBoolean, {
|
|
13
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "trueValue", "falseValue", "trueIcon", "falseIcon", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
13
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "trueValue", "falseValue", "trueIcon", "falseIcon", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
14
14
|
family: "NuxtUIOutput"
|
|
15
15
|
});
|
|
16
16
|
export const nuxtUIOutputDateDefinition = createInput(FUOutputDate, {
|
|
17
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "dateStyle", "timeStyle", "locale", "relative", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
17
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "dateStyle", "timeStyle", "locale", "relative", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
18
18
|
family: "NuxtUIOutput"
|
|
19
19
|
});
|
|
20
20
|
export const nuxtUIOutputLinkDefinition = createInput(FUOutputLink, {
|
|
21
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "target", "rel", "underline", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
21
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "target", "rel", "underline", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
22
22
|
family: "NuxtUIOutput"
|
|
23
23
|
});
|
|
24
24
|
export const nuxtUIOutputNumberDefinition = createInput(FUOutputNumber, {
|
|
25
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "locale", "formatOptions", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
25
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "locale", "formatOptions", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
26
26
|
family: "NuxtUIOutput"
|
|
27
27
|
});
|
|
28
28
|
export const nuxtUIOutputListDefinition = createInput(FUOutputList, {
|
|
29
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "listType", "separator", "itemClass", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
29
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "listType", "separator", "itemClass", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
30
30
|
family: "NuxtUIOutput"
|
|
31
31
|
});
|
|
@@ -6,26 +6,26 @@ import FUOutputLink from "../../../runtime/components/output/FUOutputLink.vue";
|
|
|
6
6
|
import FUOutputNumber from "../../../runtime/components/output/FUOutputNumber.vue";
|
|
7
7
|
import FUOutputList from "../../../runtime/components/output/FUOutputList.vue";
|
|
8
8
|
export const nuxtUIOutputTextDefinition = createInput(FUOutputText, {
|
|
9
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "outputType"],
|
|
9
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "outputType", "ui"],
|
|
10
10
|
family: "NuxtUIOutput"
|
|
11
11
|
});
|
|
12
12
|
export const nuxtUIOutputBooleanDefinition = createInput(FUOutputBoolean, {
|
|
13
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "trueValue", "falseValue", "trueIcon", "falseIcon", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
13
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "trueValue", "falseValue", "trueIcon", "falseIcon", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
14
14
|
family: "NuxtUIOutput"
|
|
15
15
|
});
|
|
16
16
|
export const nuxtUIOutputDateDefinition = createInput(FUOutputDate, {
|
|
17
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "dateStyle", "timeStyle", "locale", "relative", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
17
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "dateStyle", "timeStyle", "locale", "relative", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
18
18
|
family: "NuxtUIOutput"
|
|
19
19
|
});
|
|
20
20
|
export const nuxtUIOutputLinkDefinition = createInput(FUOutputLink, {
|
|
21
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "target", "rel", "underline", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
21
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "target", "rel", "underline", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
22
22
|
family: "NuxtUIOutput"
|
|
23
23
|
});
|
|
24
24
|
export const nuxtUIOutputNumberDefinition = createInput(FUOutputNumber, {
|
|
25
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "locale", "formatOptions", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
25
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "locale", "formatOptions", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
26
26
|
family: "NuxtUIOutput"
|
|
27
27
|
});
|
|
28
28
|
export const nuxtUIOutputListDefinition = createInput(FUOutputList, {
|
|
29
|
-
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "listType", "separator", "itemClass", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked"],
|
|
29
|
+
props: ["size", "color", "variant", "icon", "leadingIcon", "trailingIcon", "leading", "trailing", "listType", "separator", "itemClass", "onIconClicked", "onLeadingIconClicked", "onTrailingIconClicked", "ui"],
|
|
30
30
|
family: "NuxtUIOutput"
|
|
31
31
|
});
|
|
@@ -42,6 +42,10 @@ export const nuxtUIRepeaterDefinition = createInput(
|
|
|
42
42
|
addListGroup([
|
|
43
43
|
addElement("div", [
|
|
44
44
|
addDragHandle("$internalDragHandleClass", "$dragHandleIconName", "$renderDragHandle"),
|
|
45
|
+
// A bare `{ children }` node (no `$el`/`$cmp`/`$formkit` discriminant)
|
|
46
|
+
// is not representable by `FormKitSchemaNode`'s own type, but
|
|
47
|
+
// FormKit's schema compiler accepts it at runtime as a slot
|
|
48
|
+
// passthrough - cast rather than widen the shared `FormKitSchemaNode` type.
|
|
45
49
|
{ children: "$slots.default" },
|
|
46
50
|
addButtonGroup("$buttonGroupClass", "$buttonGroupItemClass", "$buttonSize", "$renderButtons")
|
|
47
51
|
], {
|