@solfacil/girassol 0.7.0 → 0.8.1
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/cli/build/cli.js +68 -0
- package/cli/build/commands/create:component.js +136 -0
- package/cli/build/commands/generate:plugin.js +109 -0
- package/cli/build/commands/generate:types.js +76 -0
- package/cli/build/commands/girassol-cli.js +52 -0
- package/cli/build/extensions/cli-extension.js +17 -0
- package/cli/build/templates/components.d.ts.ejs +1 -0
- package/cli/build/templates/nuxt-plugin.ejs +8 -0
- package/cli/build/templates/vitesse-plugin.ejs +8 -0
- package/cli/build/templates/vue-plugin.ejs +5 -0
- package/cli/build/templates/windi.config.ts.ejs +3 -0
- package/cli/build/types/cli.d.ts +1 -0
- package/cli/build/types/commands/create:component.d.ts +1 -0
- package/cli/build/types/commands/generate:plugin.d.ts +1 -0
- package/cli/build/types/commands/generate:types.d.ts +7 -0
- package/cli/build/types/commands/girassol-cli.d.ts +1 -0
- package/cli/build/types/extensions/cli-extension.d.ts +1 -0
- package/cli/build/types/types.d.ts +0 -0
- package/cli/build/types.js +2 -0
- package/dist/components.d.ts +1 -0
- package/dist/components.json +1 -1
- package/dist/girassol.es.js +2143 -2015
- package/dist/girassol.umd.js +6 -6
- package/dist/style.css +1 -1
- package/dist/types/components/forms/checkbox/checkbox/Checkbox.vue.d.ts +81 -13
- package/dist/types/components/forms/checkbox/checkbox-group/CheckboxGroup.vue.d.ts +4 -20
- package/dist/types/components/forms/inputs/input-core/Input.vue.d.ts +91 -15
- package/dist/types/components/forms/inputs/input-password/InputPassword.vue.d.ts +107 -21
- package/dist/types/components/forms/inputs/input-textarea/InputTextarea.vue.d.ts +121 -33
- package/dist/types/components/forms/radio/radio/Radio.vue.d.ts +78 -12
- package/dist/types/components/forms/radio/radio-group/RadioGroup.vue.d.ts +4 -20
- package/dist/types/components/forms/select/ListOption.vue.d.ts +16 -60
- package/dist/types/components/forms/select/Select.vue.d.ts +23 -21
- package/dist/types/components/forms/select/types.d.ts +2 -2
- package/dist/types/components/forms/switch/Switch.vue.d.ts +107 -20
- package/dist/types/components/loader/CircleLoader.vue.d.ts +72 -10
- package/dist/types/components/pagination/Pagination.vue.d.ts +190 -0
- package/dist/types/components/pagination/index.d.ts +2 -0
- package/dist/types/components/pagination/pagination.spec.d.ts +1 -0
- package/dist/types/components/pagination/types.d.ts +14 -0
- package/dist/types/composables/use-validate-field/index.d.ts +3 -3
- package/dist/types/composables/use-validate-field/types.d.ts +4 -8
- package/dist/types/index.d.ts +1441 -525
- package/package.json +27 -18
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import type { Pagination } from './types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
$: import("vue").ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: Partial<{
|
|
7
|
+
size: "small" | "medium";
|
|
8
|
+
openMenuPosition: "top" | "dynamic";
|
|
9
|
+
totalPages: Pagination['totalPages'];
|
|
10
|
+
current: number;
|
|
11
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
id: Pagination['id'];
|
|
13
|
+
size?: Pagination['size'];
|
|
14
|
+
openMenuPosition?: Pagination['openMenuPosition'];
|
|
15
|
+
totalPages: Pagination['totalPages'];
|
|
16
|
+
current?: Pagination['current'];
|
|
17
|
+
nextPageData?: Pagination['nextPageData'];
|
|
18
|
+
previousPageData?: Pagination['previousPageData'];
|
|
19
|
+
}>, {
|
|
20
|
+
openMenuPosition: string;
|
|
21
|
+
size: string;
|
|
22
|
+
current: number;
|
|
23
|
+
totalPages: number;
|
|
24
|
+
}>>> & {
|
|
25
|
+
"onUpdate:current"?: ((page: number | undefined) => any) | undefined;
|
|
26
|
+
onPage?: ((page: number | undefined) => any) | undefined;
|
|
27
|
+
"onPage:next"?: ((value: (Record<string, unknown> & {
|
|
28
|
+
page: number;
|
|
29
|
+
}) | undefined) => any) | undefined;
|
|
30
|
+
"onPage:previous"?: ((value: (Record<string, unknown> & {
|
|
31
|
+
page: number;
|
|
32
|
+
}) | undefined) => any) | undefined;
|
|
33
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "size" | "openMenuPosition" | "totalPages" | "current">;
|
|
34
|
+
$attrs: {
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
$refs: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
$slots: Readonly<{
|
|
41
|
+
[name: string]: import("vue").Slot | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
44
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
45
|
+
$emit: ((event: "update:current", page: number | undefined) => void) & ((event: "page", page: number | undefined) => void) & ((event: "page:next", value: (Record<string, unknown> & {
|
|
46
|
+
page: number;
|
|
47
|
+
}) | undefined) => void) & ((event: "page:previous", value: (Record<string, unknown> & {
|
|
48
|
+
page: number;
|
|
49
|
+
}) | undefined) => void);
|
|
50
|
+
$el: any;
|
|
51
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
52
|
+
id: Pagination['id'];
|
|
53
|
+
size?: Pagination['size'];
|
|
54
|
+
openMenuPosition?: Pagination['openMenuPosition'];
|
|
55
|
+
totalPages: Pagination['totalPages'];
|
|
56
|
+
current?: Pagination['current'];
|
|
57
|
+
nextPageData?: Pagination['nextPageData'];
|
|
58
|
+
previousPageData?: Pagination['previousPageData'];
|
|
59
|
+
}>, {
|
|
60
|
+
openMenuPosition: string;
|
|
61
|
+
size: string;
|
|
62
|
+
current: number;
|
|
63
|
+
totalPages: number;
|
|
64
|
+
}>>> & {
|
|
65
|
+
"onUpdate:current"?: ((page: number | undefined) => any) | undefined;
|
|
66
|
+
onPage?: ((page: number | undefined) => any) | undefined;
|
|
67
|
+
"onPage:next"?: ((value: (Record<string, unknown> & {
|
|
68
|
+
page: number;
|
|
69
|
+
}) | undefined) => any) | undefined;
|
|
70
|
+
"onPage:previous"?: ((value: (Record<string, unknown> & {
|
|
71
|
+
page: number;
|
|
72
|
+
}) | undefined) => any) | undefined;
|
|
73
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
74
|
+
"update:current": (page: number | undefined) => void;
|
|
75
|
+
} & {
|
|
76
|
+
page: (page: number | undefined) => void;
|
|
77
|
+
} & {
|
|
78
|
+
"page:next": (value: (Record<string, unknown> & {
|
|
79
|
+
page: number;
|
|
80
|
+
}) | undefined) => void;
|
|
81
|
+
} & {
|
|
82
|
+
"page:previous": (value: (Record<string, unknown> & {
|
|
83
|
+
page: number;
|
|
84
|
+
}) | undefined) => void;
|
|
85
|
+
}, string, {
|
|
86
|
+
size: "small" | "medium";
|
|
87
|
+
openMenuPosition: "top" | "dynamic";
|
|
88
|
+
totalPages: Pagination['totalPages'];
|
|
89
|
+
current: number;
|
|
90
|
+
}> & {
|
|
91
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
92
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
93
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
94
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
95
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
96
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
97
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
98
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
99
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
100
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
101
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
102
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
103
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
104
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
105
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
106
|
+
};
|
|
107
|
+
$forceUpdate: () => void;
|
|
108
|
+
$nextTick: typeof import("vue").nextTick;
|
|
109
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
110
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
111
|
+
id: Pagination['id'];
|
|
112
|
+
size?: Pagination['size'];
|
|
113
|
+
openMenuPosition?: Pagination['openMenuPosition'];
|
|
114
|
+
totalPages: Pagination['totalPages'];
|
|
115
|
+
current?: Pagination['current'];
|
|
116
|
+
nextPageData?: Pagination['nextPageData'];
|
|
117
|
+
previousPageData?: Pagination['previousPageData'];
|
|
118
|
+
}>, {
|
|
119
|
+
openMenuPosition: string;
|
|
120
|
+
size: string;
|
|
121
|
+
current: number;
|
|
122
|
+
totalPages: number;
|
|
123
|
+
}>>> & {
|
|
124
|
+
"onUpdate:current"?: ((page: number | undefined) => any) | undefined;
|
|
125
|
+
onPage?: ((page: number | undefined) => any) | undefined;
|
|
126
|
+
"onPage:next"?: ((value: (Record<string, unknown> & {
|
|
127
|
+
page: number;
|
|
128
|
+
}) | undefined) => any) | undefined;
|
|
129
|
+
"onPage:previous"?: ((value: (Record<string, unknown> & {
|
|
130
|
+
page: number;
|
|
131
|
+
}) | undefined) => any) | undefined;
|
|
132
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
133
|
+
__isFragment?: undefined;
|
|
134
|
+
__isTeleport?: undefined;
|
|
135
|
+
__isSuspense?: undefined;
|
|
136
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
137
|
+
id: Pagination['id'];
|
|
138
|
+
size?: Pagination['size'];
|
|
139
|
+
openMenuPosition?: Pagination['openMenuPosition'];
|
|
140
|
+
totalPages: Pagination['totalPages'];
|
|
141
|
+
current?: Pagination['current'];
|
|
142
|
+
nextPageData?: Pagination['nextPageData'];
|
|
143
|
+
previousPageData?: Pagination['previousPageData'];
|
|
144
|
+
}>, {
|
|
145
|
+
openMenuPosition: string;
|
|
146
|
+
size: string;
|
|
147
|
+
current: number;
|
|
148
|
+
totalPages: number;
|
|
149
|
+
}>>> & {
|
|
150
|
+
"onUpdate:current"?: ((page: number | undefined) => any) | undefined;
|
|
151
|
+
onPage?: ((page: number | undefined) => any) | undefined;
|
|
152
|
+
"onPage:next"?: ((value: (Record<string, unknown> & {
|
|
153
|
+
page: number;
|
|
154
|
+
}) | undefined) => any) | undefined;
|
|
155
|
+
"onPage:previous"?: ((value: (Record<string, unknown> & {
|
|
156
|
+
page: number;
|
|
157
|
+
}) | undefined) => any) | undefined;
|
|
158
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
159
|
+
"update:current": (page: number | undefined) => void;
|
|
160
|
+
} & {
|
|
161
|
+
page: (page: number | undefined) => void;
|
|
162
|
+
} & {
|
|
163
|
+
"page:next": (value: (Record<string, unknown> & {
|
|
164
|
+
page: number;
|
|
165
|
+
}) | undefined) => void;
|
|
166
|
+
} & {
|
|
167
|
+
"page:previous": (value: (Record<string, unknown> & {
|
|
168
|
+
page: number;
|
|
169
|
+
}) | undefined) => void;
|
|
170
|
+
}, string, {
|
|
171
|
+
size: "small" | "medium";
|
|
172
|
+
openMenuPosition: "top" | "dynamic";
|
|
173
|
+
totalPages: Pagination['totalPages'];
|
|
174
|
+
current: number;
|
|
175
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
176
|
+
export default _default;
|
|
177
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
178
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
179
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
180
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
181
|
+
} : {
|
|
182
|
+
type: import('vue').PropType<T[K]>;
|
|
183
|
+
required: true;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
187
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
188
|
+
default: D[K];
|
|
189
|
+
} : P[K];
|
|
190
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare type PageProps = Record<string, unknown> & {
|
|
2
|
+
page: number;
|
|
3
|
+
};
|
|
4
|
+
declare type OpenMenuPosition = 'top' | 'dynamic';
|
|
5
|
+
export interface Pagination {
|
|
6
|
+
id: string;
|
|
7
|
+
size?: 'small' | 'medium';
|
|
8
|
+
openMenuPosition?: OpenMenuPosition;
|
|
9
|
+
totalPages: number;
|
|
10
|
+
current?: number;
|
|
11
|
+
nextPageData?: PageProps;
|
|
12
|
+
previousPageData?: PageProps;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ParentValidation } from './types';
|
|
2
|
-
export declare function useValidateField<T = unknown>(name: string, parentValidation
|
|
3
|
-
value: import("vue").
|
|
1
|
+
import type { ParentValidation, VModelSetting } from './types';
|
|
2
|
+
export declare function useValidateField<T = unknown>(name: string, parentValidation: ParentValidation<T>, vmodelSettings: VModelSetting<T>): import("vee-validate").FieldContext<T> | {
|
|
3
|
+
value: import("vue").WritableComputedRef<T>;
|
|
4
4
|
errorMessage: import("vue").ComputedRef<string | null> | undefined;
|
|
5
5
|
};
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import type { useField } from 'vee-validate';
|
|
2
2
|
import type { ComputedRef, Ref } from 'vue';
|
|
3
|
-
declare type Option = {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
};
|
|
7
3
|
declare type Error = ComputedRef<string | null>;
|
|
8
|
-
declare type ComponentType = 'input' | 'select' | 'checkbox' | 'radio';
|
|
9
4
|
export interface ParentValidation<T = unknown> {
|
|
10
5
|
error?: Error;
|
|
11
|
-
modelValue?: T;
|
|
12
|
-
component?: ComponentType;
|
|
13
|
-
selected?: Option | Option[];
|
|
14
6
|
useFieldParent?: typeof useField;
|
|
15
7
|
rules?: Parameters<typeof useField>['1'];
|
|
16
8
|
opts?: Parameters<typeof useField<T>>['2'];
|
|
17
9
|
}
|
|
10
|
+
export interface VModelSetting<T = unknown> {
|
|
11
|
+
propKey: string;
|
|
12
|
+
emit: (args: T) => void;
|
|
13
|
+
}
|
|
18
14
|
export declare type ValidateFieldReturn<T = string> = {
|
|
19
15
|
value: Ref<T>;
|
|
20
16
|
errorMessage: ComputedRef<string | null> | undefined;
|