@uniquedj95/vform 1.3.0 → 1.4.0
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 +1 -0
- package/dist/components/inputs/BaseInput.vue.d.ts +6 -4
- package/dist/components/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/DateInput.vue.d.ts +6 -4
- package/dist/components/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/EmailInput.vue.d.ts +7 -3
- package/dist/components/inputs/EmailInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/NumberInput.vue.d.ts +7 -3
- package/dist/components/inputs/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/PasswordInput.vue.d.ts +7 -3
- package/dist/components/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/SelectInput.vue.d.ts +6 -4
- package/dist/components/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/TextAreaInput.vue.d.ts +22 -0
- package/dist/components/inputs/TextAreaInput.vue.d.ts.map +1 -0
- package/dist/components/inputs/TextInput.vue.d.ts +5 -4
- package/dist/components/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/vForm.vue.d.ts +100 -49
- package/dist/components/vForm.vue.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +2993 -2844
- package/dist/index.umd.js +1 -1
- package/dist/types/index.d.ts +161 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/types/index.d.ts
CHANGED
@@ -12,33 +12,186 @@ export interface GridSize {
|
|
12
12
|
lg?: string;
|
13
13
|
xl?: string;
|
14
14
|
}
|
15
|
+
/**
|
16
|
+
* Represents a form field with various properties to define its behavior and appearance.
|
17
|
+
*
|
18
|
+
* @interface FormField
|
19
|
+
*/
|
15
20
|
export interface FormField {
|
21
|
+
/**
|
22
|
+
* The current value of the form input field.
|
23
|
+
*
|
24
|
+
* @type FormValue
|
25
|
+
*/
|
16
26
|
value?: FormValue;
|
27
|
+
/**
|
28
|
+
* The type of input for the form input field.
|
29
|
+
*
|
30
|
+
* @type InputType
|
31
|
+
*/
|
17
32
|
type: InputType;
|
33
|
+
/**
|
34
|
+
* The label for the form input field.
|
35
|
+
*
|
36
|
+
* @type string
|
37
|
+
*/
|
18
38
|
label?: string;
|
39
|
+
/**
|
40
|
+
* Indicates if the form input field is required.
|
41
|
+
*
|
42
|
+
* @type boolean
|
43
|
+
*/
|
19
44
|
required?: boolean;
|
45
|
+
/**
|
46
|
+
* Options for select-type form input fields.
|
47
|
+
*
|
48
|
+
* @type FormOptions
|
49
|
+
*/
|
20
50
|
options?: FormOptions;
|
51
|
+
/**
|
52
|
+
* Indicates if multiple selections are allowed.
|
53
|
+
*
|
54
|
+
* @type boolean
|
55
|
+
*/
|
21
56
|
multiple?: boolean;
|
57
|
+
/**
|
58
|
+
* The minimum value or length for the form input field.
|
59
|
+
*
|
60
|
+
* @type number | string
|
61
|
+
*/
|
22
62
|
min?: number | string;
|
63
|
+
/**
|
64
|
+
* The maximum value or length for the form input field.
|
65
|
+
*
|
66
|
+
* @type number | string
|
67
|
+
*/
|
23
68
|
max?: number | string;
|
69
|
+
/**
|
70
|
+
* The number of columns for textarea-type form input fields.
|
71
|
+
*
|
72
|
+
* @type number
|
73
|
+
*/
|
74
|
+
cols?: number;
|
75
|
+
/**
|
76
|
+
* The number of rows for textarea-type form input fields.
|
77
|
+
*
|
78
|
+
* @type number
|
79
|
+
*/
|
80
|
+
rows?: number;
|
81
|
+
/**
|
82
|
+
* Indicates if a character counter should be displayed.
|
83
|
+
*
|
84
|
+
* @type boolean
|
85
|
+
*/
|
24
86
|
counter?: boolean;
|
87
|
+
/**
|
88
|
+
* The minimum length for the form input field.
|
89
|
+
*
|
90
|
+
* @type number
|
91
|
+
*/
|
25
92
|
minLength?: number;
|
93
|
+
/**
|
94
|
+
* The maximum length for the form input field.
|
95
|
+
*
|
96
|
+
* @type number
|
97
|
+
*/
|
26
98
|
maxLength?: number;
|
99
|
+
/**
|
100
|
+
* Indicates if the form input field is disabled.
|
101
|
+
*
|
102
|
+
* @type boolean
|
103
|
+
*/
|
27
104
|
disabled?: boolean;
|
105
|
+
/**
|
106
|
+
* Indicates if the form input field is read-only.
|
107
|
+
*
|
108
|
+
* @type boolean
|
109
|
+
*/
|
28
110
|
hidden?: boolean;
|
111
|
+
/**
|
112
|
+
* The size of the form input field.
|
113
|
+
*
|
114
|
+
* @type GridSize
|
115
|
+
*/
|
29
116
|
grid?: GridSize;
|
117
|
+
/**
|
118
|
+
* The placeholder text for the form input field.
|
119
|
+
*
|
120
|
+
* @type string
|
121
|
+
*/
|
30
122
|
placeholder?: string;
|
123
|
+
/**
|
124
|
+
* The icon for the form input field.
|
125
|
+
*
|
126
|
+
* @type string
|
127
|
+
*/
|
31
128
|
icon?: string;
|
129
|
+
/**
|
130
|
+
* The prefix for the form input field.
|
131
|
+
*
|
132
|
+
* @type string
|
133
|
+
*/
|
32
134
|
prefix?: string;
|
135
|
+
/**
|
136
|
+
* The suffix for the form input field.
|
137
|
+
*
|
138
|
+
* @type string
|
139
|
+
*/
|
33
140
|
suffix?: string;
|
141
|
+
/**
|
142
|
+
* The error message for the form input field.
|
143
|
+
*
|
144
|
+
* @type string
|
145
|
+
*/
|
34
146
|
error?: string;
|
147
|
+
/**
|
148
|
+
* The pattern for the form input field.
|
149
|
+
* If the pattern is not matched, an error message will be displayed.
|
150
|
+
*
|
151
|
+
* @type string
|
152
|
+
*/
|
35
153
|
pattern?: string;
|
154
|
+
/**
|
155
|
+
* Auto-focuses the form input field when the page loads.
|
156
|
+
*
|
157
|
+
* @type boolean
|
158
|
+
*/
|
36
159
|
autoFocus?: boolean;
|
160
|
+
/**
|
161
|
+
* Indicates if the form input field should be filled with a solid or outlined color.
|
162
|
+
*
|
163
|
+
* @type "solid" | "outline"
|
164
|
+
*/
|
37
165
|
fill?: "solid" | "outline";
|
166
|
+
/**
|
167
|
+
* The position of the label for the form input field.
|
168
|
+
*
|
169
|
+
* @type "stacked" | "start" | "end" | "fixed" | "floating"
|
170
|
+
*/
|
38
171
|
labelPlacement?: "stacked" | "start" | "end" | "fixed" | "floating";
|
172
|
+
/**
|
173
|
+
* The custom validation function for the form input field.
|
174
|
+
*
|
175
|
+
* @type FormValidator
|
176
|
+
*/
|
39
177
|
validation?: FormValidator;
|
178
|
+
/**
|
179
|
+
* The custom function for listening to changes in the form input field.
|
180
|
+
*
|
181
|
+
* @type ComputedValueHandler
|
182
|
+
*/
|
40
183
|
onChange?: (value: FormValue) => FormValue;
|
184
|
+
/**
|
185
|
+
* The custom function used for computing alternative values based on the current value of the form input field.
|
186
|
+
*
|
187
|
+
* @type ComputedValueHandler
|
188
|
+
*/
|
41
189
|
computedValue?: ComputedValueHandler;
|
190
|
+
/**
|
191
|
+
* The custom function for checking if the form input field should be displayed.
|
192
|
+
*
|
193
|
+
* @type (data: FormData, computedData: ComputedData) => boolean
|
194
|
+
*/
|
42
195
|
condition?: (data: FormData, computedData: ComputedData) => boolean;
|
43
196
|
}
|
44
197
|
export interface OptionDescription {
|
@@ -54,6 +207,13 @@ export interface Option {
|
|
54
207
|
disabled?: boolean;
|
55
208
|
description?: OptionDescription;
|
56
209
|
}
|
57
|
-
export type InputType = "TextInput" | "DateInput" | "NumberInput" | "EmailInput" | "PasswordInput" | "SelectInput";
|
210
|
+
export type InputType = "TextInput" | "DateInput" | "NumberInput" | "EmailInput" | "PasswordInput" | "SelectInput" | "TextAreaInput";
|
58
211
|
export type BaseFieldTypes = "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "time" | "month" | "week";
|
212
|
+
export interface CustomButton {
|
213
|
+
label: string;
|
214
|
+
icon: string;
|
215
|
+
fill?: "solid" | "outline";
|
216
|
+
color?: "primary" | "warning" | "danger" | "secondary" | "light";
|
217
|
+
action: () => void;
|
218
|
+
}
|
59
219
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC3E,MAAM,MAAM,aAAa,GAAG,CAC1B,KAAK,EAAE,SAAS,EAChB,MAAM,CAAC,EAAE,UAAU,KAChB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAC1D,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,KACf,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AACxB,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzE,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;AAC7D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings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|
|
1
1
|
{
|
2
2
|
"name": "@uniquedj95/vform",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.0",
|
4
4
|
"description": "A simplified ionic vue desktop form builder",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./dist/index.umd.js",
|
7
7
|
"module": "./dist/index.es.js",
|
8
8
|
"types": "./dist/index.d.ts",
|
9
|
-
"style": "./dist/
|
9
|
+
"style": "./dist/style.css",
|
10
10
|
"files": [
|
11
11
|
"dist"
|
12
12
|
],
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"require": "./dist/index.umd.js",
|
17
17
|
"types": "./dist/index.d.ts"
|
18
18
|
},
|
19
|
-
"./styles.css": "./dist/
|
19
|
+
"./styles.css": "./dist/style.css"
|
20
20
|
},
|
21
21
|
"scripts": {
|
22
22
|
"build": "vite build",
|
@@ -37,10 +37,10 @@
|
|
37
37
|
"typescript": "^5.5.3",
|
38
38
|
"vite": "^5.3.3",
|
39
39
|
"vite-plugin-dts": "^3.9.1",
|
40
|
-
"vue": "^3.
|
40
|
+
"vue": "^3.5.10"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
|
-
"vue": "^3.
|
43
|
+
"vue": "^3.5.10"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
46
|
"@vuepic/vue-datepicker": "^9.0.1"
|