@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
|
@@ -7,7 +7,7 @@ const props = defineProps({
|
|
|
7
7
|
required: true
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
|
-
const { handleInput, handleChange, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
|
|
10
|
+
const { handleInput, handleChange, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
|
|
11
11
|
const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
12
12
|
</script>
|
|
13
13
|
|
|
@@ -30,7 +30,7 @@ const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
|
30
30
|
:description-key="context.descriptionKey"
|
|
31
31
|
:loop="context.loop ?? false"
|
|
32
32
|
:name="context.name"
|
|
33
|
-
:ui="
|
|
33
|
+
:ui="ui"
|
|
34
34
|
@change="handleChange"
|
|
35
35
|
@update:model-value="handleInput"
|
|
36
36
|
@focusout="handleContainerBlur"
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, items, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -45,7 +45,7 @@ const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, ite
|
|
|
45
45
|
:open="context.open"
|
|
46
46
|
:default-open="context.defaultOpen"
|
|
47
47
|
:autocomplete="context.autocomplete"
|
|
48
|
-
:ui="
|
|
48
|
+
:ui="ui"
|
|
49
49
|
@change="handleChange"
|
|
50
50
|
@update:model-value="handleInput"
|
|
51
51
|
>
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -57,7 +57,7 @@ const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, ite
|
|
|
57
57
|
:reset-model-value-on-clear="context.resetModelValueOnClear"
|
|
58
58
|
:highlight-on-hover="context.highlightOnHover"
|
|
59
59
|
:search-term="context.searchTerm"
|
|
60
|
-
:ui="
|
|
60
|
+
:ui="ui"
|
|
61
61
|
@change="handleChange"
|
|
62
62
|
@update:model-value="handleInput"
|
|
63
63
|
>
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, styleClass, color, modelValue } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, styleClass, color, modelValue, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -29,7 +29,7 @@ const { handleInput, handleChange, styleClass, color, modelValue } = useFormKitI
|
|
|
29
29
|
:max="context.max"
|
|
30
30
|
:step="context.step"
|
|
31
31
|
:min-steps-between-thumbs="context.minStepsBetweenThumbs"
|
|
32
|
-
:ui="
|
|
32
|
+
:ui="ui"
|
|
33
33
|
@change="handleChange"
|
|
34
34
|
@update:model-value="handleInput"
|
|
35
35
|
/>
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -29,7 +29,7 @@ const { handleInput, handleChange, handleBlur, styleClass, color, modelValue, va
|
|
|
29
29
|
:true-value="context.trueValue"
|
|
30
30
|
:false-value="context.falseValue"
|
|
31
31
|
:autofocus="context.autofocus"
|
|
32
|
-
:ui="
|
|
32
|
+
:ui="ui"
|
|
33
33
|
@change="handleChange"
|
|
34
34
|
@update:model-value="handleInput"
|
|
35
35
|
@blur="handleBlur"
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, styleClass, color, isInvalid, modelValue, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, styleClass, color, isInvalid, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -43,7 +43,7 @@ const { handleInput, handleChange, handleBlur, styleClass, color, isInvalid, mod
|
|
|
43
43
|
:maxlength="context.maxlength"
|
|
44
44
|
:minlength="context.minlength"
|
|
45
45
|
:wrap="context.wrap"
|
|
46
|
-
:ui="
|
|
46
|
+
:ui="ui"
|
|
47
47
|
@change="handleChange"
|
|
48
48
|
@update:model-value="handleInput"
|
|
49
49
|
@blur="handleBlur"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
|
|
2
3
|
import type { PropType } from 'vue';
|
|
3
4
|
import type { FormKitIconProps } from './FUIcon.vue.js';
|
|
4
5
|
export interface FormKitOutputBooleanProps {
|
|
@@ -14,6 +15,7 @@ export interface FormKitOutputBooleanProps {
|
|
|
14
15
|
trueIcon?: string;
|
|
15
16
|
trueValue?: string;
|
|
16
17
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
18
|
+
ui?: FormKitOutputUi;
|
|
17
19
|
}
|
|
18
20
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
19
21
|
context: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
|
|
2
3
|
import type { PropType } from 'vue';
|
|
3
4
|
import type { FormKitIconProps } from './FUIcon.vue.js';
|
|
4
5
|
export interface FormKitOutputBooleanProps {
|
|
@@ -14,6 +15,7 @@ export interface FormKitOutputBooleanProps {
|
|
|
14
15
|
trueIcon?: string;
|
|
15
16
|
trueValue?: string;
|
|
16
17
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
18
|
+
ui?: FormKitOutputUi;
|
|
17
19
|
}
|
|
18
20
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
19
21
|
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 FormKitOutputDateProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -14,6 +15,7 @@ export interface FormKitOutputDateProps {
|
|
|
14
15
|
trailing?: boolean;
|
|
15
16
|
trailingIcon?: string;
|
|
16
17
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
18
|
+
ui?: FormKitOutputUi;
|
|
17
19
|
}
|
|
18
20
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
19
21
|
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 FormKitOutputDateProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -14,6 +15,7 @@ export interface FormKitOutputDateProps {
|
|
|
14
15
|
trailing?: boolean;
|
|
15
16
|
trailingIcon?: string;
|
|
16
17
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
18
|
+
ui?: FormKitOutputUi;
|
|
17
19
|
}
|
|
18
20
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
19
21
|
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 FormKitOutputLinkProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -12,6 +13,7 @@ export interface FormKitOutputLinkProps {
|
|
|
12
13
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
13
14
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
14
15
|
rel?: string;
|
|
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 FormKitOutputLinkProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -12,6 +13,7 @@ export interface FormKitOutputLinkProps {
|
|
|
12
13
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
13
14
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
14
15
|
rel?: string;
|
|
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 FormKitOutputListProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -13,6 +14,7 @@ export interface FormKitOutputListProps {
|
|
|
13
14
|
trailing?: boolean;
|
|
14
15
|
trailingIcon?: string;
|
|
15
16
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
17
|
+
ui?: FormKitOutputUi;
|
|
16
18
|
}
|
|
17
19
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
18
20
|
context: {
|
|
@@ -44,7 +44,7 @@ const badgeVariant = computed(() => {
|
|
|
44
44
|
if (variant === "ghost" || variant === "none") return "soft";
|
|
45
45
|
return variant;
|
|
46
46
|
});
|
|
47
|
-
const { containerClass, iconClass, leadingIconName, trailingIconName } = useFormKitOutput(props.context);
|
|
47
|
+
const { containerClass, iconClass, leadingIconName, trailingIconName, ui } = useFormKitOutput(props.context);
|
|
48
48
|
</script>
|
|
49
49
|
|
|
50
50
|
<template>
|
|
@@ -128,6 +128,7 @@ const { containerClass, iconClass, leadingIconName, trailingIconName } = useForm
|
|
|
128
128
|
:variant="badgeVariant"
|
|
129
129
|
:size="context.size"
|
|
130
130
|
:class="itemClass"
|
|
131
|
+
:ui="ui?.badge"
|
|
131
132
|
>
|
|
132
133
|
{{ item }}
|
|
133
134
|
</UBadge>
|
|
@@ -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 FormKitOutputListProps {
|
|
5
6
|
color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
|
|
@@ -13,6 +14,7 @@ export interface FormKitOutputListProps {
|
|
|
13
14
|
trailing?: boolean;
|
|
14
15
|
trailingIcon?: string;
|
|
15
16
|
variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
|
|
17
|
+
ui?: FormKitOutputUi;
|
|
16
18
|
}
|
|
17
19
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
18
20
|
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 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 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: {
|
|
@@ -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
|
};
|
|
@@ -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
|
], {
|
|
@@ -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
|
], {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FormKitMultiStepSlots, FormKitStepSlots } from '@formkit/addons';
|
|
2
2
|
import type { FormKitBaseSlots, FormKitInputs } from '@formkit/inputs';
|
|
3
|
-
import type { CalendarSlots, CheckboxSlots, CheckboxGroupSlots, EditorSlots, FileUploadSlots, RadioGroupSlots, InputSlots, TextareaSlots, SelectSlots, SelectMenuSlots, InputDateSlots, InputMenuSlots, InputNumberSlots, InputTagsSlots, InputTimeSlots, ListboxSlots, SwitchSlots } from '@nuxt/ui';
|
|
3
|
+
import type { CalendarSlots, CheckboxSlots, CheckboxGroupSlots, EditorSlots, FileUploadSlots, RadioGroupSlots, InputSlots, TextareaSlots, SelectSlots, SelectMenuSlots, InputDateSlots, InputMenuSlots, InputNumberSlots, InputTagsSlots, InputTimeSlots, ListboxSlots, PinInputSlots, SwitchSlots } from '@nuxt/ui';
|
|
4
4
|
export * from './createNuxtUiFormkitConfig.js';
|
|
5
5
|
export * from './definitions/index.js';
|
|
6
6
|
export * from './plugins/index.js';
|
|
@@ -58,6 +58,9 @@ declare module '@formkit/inputs' {
|
|
|
58
58
|
nuxtUIRadioGroup: {
|
|
59
59
|
type: 'nuxtUIRadioGroup';
|
|
60
60
|
};
|
|
61
|
+
nuxtUIRepeater: {
|
|
62
|
+
type: 'nuxtUIRepeater';
|
|
63
|
+
};
|
|
61
64
|
nuxtUISelect: {
|
|
62
65
|
type: 'nuxtUISelect';
|
|
63
66
|
};
|
|
@@ -109,7 +112,9 @@ declare module '@formkit/inputs' {
|
|
|
109
112
|
nuxtUIInputTime: MergeSlots<FormKitBaseSlots<Props>, InputTimeSlots>;
|
|
110
113
|
nuxtUIListbox: MergeSlots<FormKitBaseSlots<Props>, ListboxSlots>;
|
|
111
114
|
nuxtUIMultiStep: MergeSlots<FormKitBaseSlots<Props>, FormKitMultiStepSlots<Props>>;
|
|
115
|
+
nuxtUIPinInput: MergeSlots<FormKitBaseSlots<Props>, PinInputSlots>;
|
|
112
116
|
nuxtUIRadioGroup: MergeSlots<FormKitBaseSlots<Props>, RadioGroupSlots>;
|
|
117
|
+
nuxtUIRepeater: FormKitBaseSlots<Props>;
|
|
113
118
|
nuxtUISelect: MergeSlots<FormKitBaseSlots<Props>, SelectSlots>;
|
|
114
119
|
nuxtUISelectMenu: MergeSlots<FormKitBaseSlots<Props>, SelectMenuSlots>;
|
|
115
120
|
nuxtUIStep: MergeSlots<FormKitBaseSlots<Props>, FormKitStepSlots<Props>>;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
1
|
+
import { computed, onBeforeUnmount, ref } from "vue";
|
|
2
2
|
export function useFormKitInput(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 isInvalid = computed(() => {
|
|
4
12
|
return context?.state?.validationVisible && !context?.state?.valid;
|
|
5
13
|
});
|
|
@@ -38,5 +46,5 @@ export function useFormKitInput(context) {
|
|
|
38
46
|
}
|
|
39
47
|
return [];
|
|
40
48
|
});
|
|
41
|
-
return { isInvalid, validSlotNames, styleClass, color, handleBlur, handleChange, handleInput, handleSelect, modelValue, items };
|
|
49
|
+
return { isInvalid, validSlotNames, styleClass, color, handleBlur, handleChange, handleInput, handleSelect, modelValue, items, ui };
|
|
42
50
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
+
export interface FormKitOutputUi {
|
|
3
|
+
/** Merged into `containerClass` - Output components have no themeable Nuxt UI root to forward to. */
|
|
4
|
+
root?: string;
|
|
5
|
+
/** Merged into `iconClass`, applied to every `FUIcon` an Output component renders. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Forwarded unmodified to `UBadge`'s own `:ui` prop (`FUOutputList`'s badge display mode only). */
|
|
8
|
+
badge?: Record<string, unknown>;
|
|
9
|
+
}
|
|
2
10
|
export declare function useFormKitOutput(context: FormKitFrameworkContext): {
|
|
3
11
|
colorClass: import("vue").ComputedRef<string>;
|
|
4
12
|
sizeClass: import("vue").ComputedRef<string>;
|
|
@@ -7,4 +15,21 @@ export declare function useFormKitOutput(context: FormKitFrameworkContext): {
|
|
|
7
15
|
iconClass: import("vue").ComputedRef<string>;
|
|
8
16
|
leadingIconName: import("vue").ComputedRef<string | null>;
|
|
9
17
|
trailingIconName: import("vue").ComputedRef<string | null>;
|
|
18
|
+
ui: import("vue").Ref<{
|
|
19
|
+
root?: string
|
|
20
|
+
/** Merged into `iconClass`, applied to every `FUIcon` an Output component renders. */
|
|
21
|
+
| undefined;
|
|
22
|
+
icon?: string
|
|
23
|
+
/** Forwarded unmodified to `UBadge`'s own `:ui` prop (`FUOutputList`'s badge display mode only). */
|
|
24
|
+
| undefined;
|
|
25
|
+
badge?: Record<string, unknown> | undefined;
|
|
26
|
+
} | undefined, FormKitOutputUi | {
|
|
27
|
+
root?: string
|
|
28
|
+
/** Merged into `iconClass`, applied to every `FUIcon` an Output component renders. */
|
|
29
|
+
| undefined;
|
|
30
|
+
icon?: string
|
|
31
|
+
/** Forwarded unmodified to `UBadge`'s own `:ui` prop (`FUOutputList`'s badge display mode only). */
|
|
32
|
+
| undefined;
|
|
33
|
+
badge?: Record<string, unknown> | undefined;
|
|
34
|
+
} | undefined>;
|
|
10
35
|
};
|