11// * ---------------------------------------- The shared props for all inline fields //
22export const sharedProps = {
3- // ? The vertical alignment of the field //
43 alignItems : 'center' as const ,
5-
6- // ? The color of the cancel button - [ All Fields ] //
74 cancelButtonColor : 'default' ,
8-
9- // ? The size of the cancel button - [ All Fields ] //
105 cancelButtonSize : 'x-small' ,
11-
12- // ? The title of the cancel button - [ All Fields ] //
136 cancelButtonTitle : 'Cancel' ,
14-
15- // ? The variant of the cancel button - [ All Fields ] //
167 cancelButtonVariant : 'tonal' as const ,
17-
18- // ? The icon to use to cancel - [ All Fields ] //
198 cancelIcon : undefined ,
20-
21- // ? The color of the cancel icon - [ All Fields ] //
229 cancelIconColor : 'default' ,
23-
24- // ? If true, the field will close when the user opens another inline form element - [ All Fields ] //
2510 closeSiblings : false ,
26-
27- // ? The Color of the field - [ All Fields ] //
2811 color : 'primary' ,
29-
30- // ? The field density - [ All Fields ] //
3112 density : 'compact' as const ,
32-
33- // ? Disabled the field - [ All Fields ] //
3413 disabled : false ,
35-
36- // ? Text to display when the field is empty - [ v-textarea, v-text-field ] //
3714 emptyText : 'empty' ,
38-
39- // ? If set to true will only show the field - [ All Fields ] //
4015 fieldOnly : false ,
41-
42- // ? Displays/Hides the field details //
4316 hideDetails : true ,
44-
45- // ! Required The item object - [ All Fields ] //
46- // item: () => ({}),
47-
48- // ? The field label - [ All Fields ] //
4917 label : '' ,
50-
5118 loading : false ,
52-
53- // ? The http method to use when saving the text field - [ All Fields ] //
54- method : 'PUT' ,
55-
56- // ? The column name of the field - [ All Fields ] //
19+ loadingWait : true ,
5720 name : '' ,
58-
59- // ? If the field is used in a table this will remove the top padding //
6021 tableField : true ,
61-
62- // ? The color of the underline - [ All Fields ] //
6322 underlineColor : 'primary' ,
64-
65- // ? The style of the underline - [ All Fields ] //
6623 underlineStyle : 'dotted' ,
67-
68- // ? The width of the underline - [ All Fields ] //
6924 underlineWidth : '2px' ,
70-
71- // ? Displays/Hides the value underline - [ All Fields ] //
7225 underlined : true ,
73-
74- // ? The color of the value - [ All Fields ] //
7526 valueColor : 'default' ,
7627} ;
7728
7829// * ------------------------------ Autofocus //
7930const autofocus = {
80- // ? If true, the field will autofocus //
8131 autofocus : true ,
8232} ;
8333
8434// * ------------------------------ Save & Loading Icon //
8535const saveAndLoadingIconProps = {
86- // ? Displays/Hides the save icon //
8736 hideSaveIcon : false ,
88-
89- // ? The icon to use when loading //
9037 loadingIcon : undefined ,
91-
92- // ? The icon to use when loading //
9338 loadingIconColor : 'primary' ,
94-
95- // ? The color of the save button //
9639 saveButtonColor : 'primary' ,
97-
98- // ? The size of the save button //
9940 saveButtonSize : 'x-small' ,
100-
101- // ? The title of the save button //
10241 saveButtonTitle : 'Save' ,
103-
104- // ? The variant of the save button //
10542 saveButtonVariant : 'text' as const ,
106-
107- // ? The icon to use to save //
10843 saveIcon : undefined ,
109-
110- // ? The icon to use to save //
11144 saveIconColor : 'primary' ,
11245} ;
11346
11447// * ------------------------------ True/False Icons //
11548const trueFalseIcons = {
116- // ? The "false" value of the field - [ v-checkbox, v-switch ] //
11749 falseValue : false ,
118-
119- // ? The false icon - [v-checkbox, v-switch] //
12050 iconFalse : undefined ,
121-
122- // ? The color of the icon when false - [v-checkbox, v-switch] //
12351 iconFalseColor : 'danger' ,
124-
125- // ? The title of the false icon - [v-checkbox, v-switch] //
12652 iconFalseTitle : 'No' ,
127-
128- // ? The true icon - [v-checkbox, v-switch] //
12953 iconTrue : undefined ,
130-
131- // ? The color of the icon when true - [v-checkbox, v-switch] //
13254 iconTrueColor : 'success' ,
133-
134- // ? The title of the true icon - [v-checkbox, v-switch] //
13555 iconTrueTitle : 'Yes' ,
136-
137- // ? Displays/Hides the icons - [v-checkbox, v-switch] //
13856 icons : true ,
139-
140- // ? The "true" value of the field - [v-checkbox, v-switch] //
14157 trueValue : true ,
14258} ;
14359
14460// * ------------------------------ Component Value Icons //
14561const valueIcons = {
146- // ? Displays/Hides the component value icons //
14762 icons : true ,
14863} ;
14964
@@ -154,14 +69,9 @@ const checkboxProps = {
15469 ...sharedProps ,
15570 ...trueFalseIcons ,
15671 ...{
157- // ? The icon of the field when false - [ v-checkbox ] //
158- falseIcon : 'mdi:mdi-checkbox-blank-outline' ,
159-
160- // ? Displays/Hides the icons //
72+ falseIcon : undefined ,
16173 icons : true ,
162-
163- // ? The icon of the field when true - [v-checkbox] //
164- trueIcon : 'mdi:mdi-checkbox-outline' ,
74+ trueIcon : undefined ,
16575 } ,
16676} ;
16777
@@ -171,25 +81,13 @@ const selectProps = {
17181 ...autofocus ,
17282 ...saveAndLoadingIconProps ,
17383 ...{
174- // ? The icon to use to clear the field //
17584 clearIcon : undefined ,
176-
177- // ? If true, the field will be clearable //
17885 clearable : false ,
179-
180- // ? Hides the selected items //
18186 hideSelected : true ,
182-
18387 itemTitle : 'title' ,
184-
18588 itemValue : 'value' ,
186-
187- // ? The select list items - [v-select] //
18889 items : ( ) => ( [ ] ) ,
189-
19090 menu : true ,
191-
192- // ? The variant of the field //
19391 variant : 'underlined' as const ,
19492 } ,
19593} ;
@@ -200,7 +98,6 @@ const switchProps = {
20098 ...trueFalseIcons ,
20199 ...valueIcons ,
202100 ...{
203- // ? The icon of the field when false - [ v-checkbox ] //
204101 falseIcon : '' ,
205102 } ,
206103} ;
@@ -211,13 +108,8 @@ const textareaProps = {
211108 ...saveAndLoadingIconProps ,
212109 ...sharedProps ,
213110 ...{
214- // ? Automatically grow the textarea depending on amount of text //
215111 autoGrow : true ,
216-
217- // ? The height of the textarea when autoGrow is false //
218112 rows : 1 ,
219-
220- // ? The variant of the field //
221113 variant : 'underlined' as const ,
222114 } ,
223115} ;
@@ -228,7 +120,6 @@ const textFieldProps = {
228120 ...autofocus ,
229121 ...saveAndLoadingIconProps ,
230122 ...{
231- // ? The variant of the field //
232123 variant : 'underlined' as const ,
233124 }
234125} ;
0 commit comments