nuxt-ui-formwerk 0.1.13 → 0.1.14
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.d.mts +1 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/Field.d.vue.ts +21 -14
- package/dist/runtime/components/Field.vue +5 -2
- package/dist/runtime/components/Field.vue.d.ts +21 -14
- package/dist/runtime/components/Form.d.vue.ts +25 -0
- package/dist/runtime/components/Form.vue +4 -2
- package/dist/runtime/components/Form.vue.d.ts +25 -0
- package/dist/runtime/types/form.d.ts +13 -0
- package/dist/runtime/types/form.js +2 -0
- package/dist/runtime/types/index.d.ts +4 -0
- package/dist/runtime/types/index.js +4 -0
- package/dist/types.d.mts +2 -0
- package/package.json +2 -2
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
export type FieldProps = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
|
|
2
|
+
export interface FieldSlots {
|
|
3
|
+
default(props: {
|
|
4
|
+
model: {
|
|
5
|
+
modelValue: any;
|
|
6
|
+
"onUpdate:modelValue": (value: any) => void;
|
|
7
|
+
};
|
|
8
|
+
setValue: (value: any) => void;
|
|
9
|
+
value: any;
|
|
10
|
+
}): any;
|
|
11
|
+
}
|
|
1
12
|
import type { FormFieldProps } from "@nuxt/ui";
|
|
2
|
-
type __VLS_Props = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
|
|
3
|
-
declare var __VLS_8: {
|
|
4
|
-
model: {
|
|
5
|
-
modelValue: any;
|
|
6
|
-
"onUpdate:modelValue": (value: any) => void;
|
|
7
|
-
};
|
|
8
|
-
setValue: (value: any) => void;
|
|
9
|
-
value: any;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_Slots = {} & {
|
|
12
|
-
default?: (props: typeof __VLS_8) => any;
|
|
13
|
-
};
|
|
14
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
13
|
declare const _default: typeof __VLS_export;
|
|
17
14
|
export default _default;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default?: (props: {
|
|
17
|
+
model: {
|
|
18
|
+
modelValue: any;
|
|
19
|
+
"onUpdate:modelValue": (value: any) => void;
|
|
20
|
+
};
|
|
21
|
+
setValue: (value: any) => void;
|
|
22
|
+
value: any;
|
|
23
|
+
}) => any;
|
|
24
|
+
}>;
|
|
18
25
|
type __VLS_WithSlots<T, S> = T & {
|
|
19
26
|
new (): {
|
|
20
27
|
$slots: S;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
1
5
|
<script setup>
|
|
2
6
|
import { useCustomControl } from "@formwerk/core";
|
|
3
7
|
import { formBusInjectionKey } from "#imports";
|
|
4
8
|
import { inject, watch, computed } from "vue";
|
|
5
|
-
import { formwerkOptionsInjectionKey, formwerkBusInjectionKey } from "
|
|
9
|
+
import { formwerkOptionsInjectionKey, formwerkBusInjectionKey } from "../types/form";
|
|
6
10
|
const props = defineProps({
|
|
7
11
|
as: { type: null, required: false },
|
|
8
12
|
name: { type: String, required: false },
|
|
@@ -21,7 +25,6 @@ const formwerkBus = inject(formwerkBusInjectionKey, void 0);
|
|
|
21
25
|
const formwerkOptions = inject(formwerkOptionsInjectionKey, void 0);
|
|
22
26
|
const {
|
|
23
27
|
field: { errorMessage, fieldValue, setValue, setBlurred, setTouched, isTouched, isBlurred, isDirty }
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
28
|
} = useCustomControl({
|
|
26
29
|
name: props.name,
|
|
27
30
|
required: props.required,
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
export type FieldProps = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
|
|
2
|
+
export interface FieldSlots {
|
|
3
|
+
default(props: {
|
|
4
|
+
model: {
|
|
5
|
+
modelValue: any;
|
|
6
|
+
"onUpdate:modelValue": (value: any) => void;
|
|
7
|
+
};
|
|
8
|
+
setValue: (value: any) => void;
|
|
9
|
+
value: any;
|
|
10
|
+
}): any;
|
|
11
|
+
}
|
|
1
12
|
import type { FormFieldProps } from "@nuxt/ui";
|
|
2
|
-
type __VLS_Props = Omit<FormFieldProps, "validateOnInputDelay" | "errorPattern" | "eagerValidation" | "error">;
|
|
3
|
-
declare var __VLS_8: {
|
|
4
|
-
model: {
|
|
5
|
-
modelValue: any;
|
|
6
|
-
"onUpdate:modelValue": (value: any) => void;
|
|
7
|
-
};
|
|
8
|
-
setValue: (value: any) => void;
|
|
9
|
-
value: any;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_Slots = {} & {
|
|
12
|
-
default?: (props: typeof __VLS_8) => any;
|
|
13
|
-
};
|
|
14
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
13
|
declare const _default: typeof __VLS_export;
|
|
17
14
|
export default _default;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default?: (props: {
|
|
17
|
+
model: {
|
|
18
|
+
modelValue: any;
|
|
19
|
+
"onUpdate:modelValue": (value: any) => void;
|
|
20
|
+
};
|
|
21
|
+
setValue: (value: any) => void;
|
|
22
|
+
value: any;
|
|
23
|
+
}) => any;
|
|
24
|
+
}>;
|
|
18
25
|
type __VLS_WithSlots<T, S> = T & {
|
|
19
26
|
new (): {
|
|
20
27
|
$slots: S;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface FormSlots {
|
|
2
|
+
default(props: {
|
|
3
|
+
blurredFields: ReadonlySet<any>;
|
|
4
|
+
touchedFields: ReadonlySet<any>;
|
|
5
|
+
dirtyFields: ReadonlySet<any>;
|
|
6
|
+
}): any;
|
|
7
|
+
}
|
|
8
|
+
export interface Props {
|
|
9
|
+
validateOn?: "touched" | "blur" | "dirty";
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
15
|
+
default?: (props: {
|
|
16
|
+
blurredFields: Set<any>;
|
|
17
|
+
touchedFields: Set<any>;
|
|
18
|
+
dirtyFields: Set<any>;
|
|
19
|
+
}) => any;
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -3,8 +3,10 @@ import { provide, reactive, computed } from "vue";
|
|
|
3
3
|
import { useEventBus } from "@vueuse/core";
|
|
4
4
|
import { useFormContext } from "@formwerk/core";
|
|
5
5
|
import { formBusInjectionKey, formOptionsInjectionKey } from "#imports";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
formwerkOptionsInjectionKey,
|
|
8
|
+
formwerkBusInjectionKey
|
|
9
|
+
} from "../types/form";
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
12
|
<script setup>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface FormSlots {
|
|
2
|
+
default(props: {
|
|
3
|
+
blurredFields: ReadonlySet<any>;
|
|
4
|
+
touchedFields: ReadonlySet<any>;
|
|
5
|
+
dirtyFields: ReadonlySet<any>;
|
|
6
|
+
}): any;
|
|
7
|
+
}
|
|
8
|
+
export interface Props {
|
|
9
|
+
validateOn?: "touched" | "blur" | "dirty";
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
15
|
+
default?: (props: {
|
|
16
|
+
blurredFields: Set<any>;
|
|
17
|
+
touchedFields: Set<any>;
|
|
18
|
+
dirtyFields: Set<any>;
|
|
19
|
+
}) => any;
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { InjectionKey, ComputedRef } from "vue";
|
|
2
|
+
import type { UseEventBusReturn } from "@vueuse/core";
|
|
3
|
+
export interface FormInjectedOptions {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
validateOn?: FormwerkInputEvents;
|
|
6
|
+
}
|
|
7
|
+
export type FormwerkInputEvent = {
|
|
8
|
+
name: string;
|
|
9
|
+
payload: unknown;
|
|
10
|
+
};
|
|
11
|
+
export type FormwerkInputEvents = "touched" | "blur" | "dirty";
|
|
12
|
+
export declare const formwerkOptionsInjectionKey: InjectionKey<ComputedRef<FormInjectedOptions>>;
|
|
13
|
+
export declare const formwerkBusInjectionKey: InjectionKey<UseEventBusReturn<FormwerkInputEvents, FormwerkInputEvent>>;
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-ui-formwerk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "A collection of beautiful, animated UI components for Nuxt applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/genu/nuxt-ui-formwerk.git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@nuxt/eslint-config": "^1.12.1",
|
|
32
32
|
"@nuxt/module-builder": "^1.0.2",
|
|
33
33
|
"@nuxt/schema": "^4.2.2",
|
|
34
|
-
"@nuxt/test-utils": "^3.
|
|
34
|
+
"@nuxt/test-utils": "^3.23.0",
|
|
35
35
|
"@types/culori": "^4.0.1",
|
|
36
36
|
"@types/node": "latest",
|
|
37
37
|
"changelogen": "^0.6.2",
|