@@ -11,6 +11,7 @@ import type {
1111 VTextField ,
1212 VTextarea ,
1313} from 'vuetify/components' ;
14+ import type { IconOptions } from 'vuetify' ;
1415import type { EventBusKey } from '@vueuse/core' ;
1516import {
1617 AxiosError ,
@@ -26,48 +27,45 @@ export type GlobalDensity = VCheckbox['$props']['density'] | VSelect['$props']['
2627export type GlobalVariant = VSelect [ '$props' ] [ 'variant' ] | VTextField [ '$props' ] [ 'variant' ] | VTextarea [ '$props' ] [ 'variant' ] ;
2728
2829
29-
3030// -------------------------------------------------- Props //
3131export interface SharedProps {
3232 alignItems ?: AlignItems ;
33- apiRoute ?: string | undefined ;
3433 autofocus ?: boolean ;
3534 cancelButtonColor ?: VBtn [ '$props' ] [ 'color' ] ;
3635 cancelButtonSize ?: VBtn [ '$props' ] [ 'size' ] ;
3736 cancelButtonTitle ?: string | undefined ;
3837 cancelButtonVariant ?: VBtn [ '$props' ] [ 'variant' ] ;
39- cancelIcon ?: string ;
38+ cancelIcon ?: string | undefined ;
4039 cancelIconColor ?: string ;
4140 closeSiblings ?: boolean ;
4241 color ?: string ;
4342 disabled ?: boolean ;
44- doNotSave ?: boolean ;
4543 emptyText ?: string ;
4644 error ?: boolean ;
4745 falseValue ?: boolean | string ;
4846 fieldOnly ?: boolean ;
4947 hideDetails ?: boolean ;
5048 hideSaveIcon ?: boolean ;
51- iconFalse ?: string ;
49+ iconFalse ?: string | undefined ;
5250 iconFalseColor ?: string ;
5351 iconFalseTitle ?: string | undefined ;
54- iconTrue ?: string ;
52+ iconTrue ?: string | undefined ;
5553 iconTrueColor ?: string ;
5654 iconTrueTitle ?: string | undefined ;
5755 icons ?: boolean ;
5856 item ?: Record < string , unknown > ;
5957 label ?: string ;
60- loadingIcon ?: string ;
58+ loading ?: boolean ;
59+ loadingIcon ?: string | undefined ;
6160 loadingIconColor ?: string ;
6261 method ?: string ;
63- // TODO: Change this to optional. Throw error if using apiRoute and not providing a name. //
6462 name ?: string ;
6563 required ?: boolean ;
6664 saveButtonColor ?: VBtn [ '$props' ] [ 'color' ] ;
6765 saveButtonSize ?: VBtn [ '$props' ] [ 'size' ] ;
6866 saveButtonTitle ?: string | undefined ;
6967 saveButtonVariant ?: VBtn [ '$props' ] [ 'variant' ] ;
70- saveIcon ?: string ;
68+ saveIcon ?: string | undefined ;
7169 saveIconColor ?: string ;
7270 tableField ?: boolean ;
7371 trueValue ?: boolean | string ;
@@ -92,7 +90,7 @@ export interface VInlineCheckboxProps extends Omit<SharedProps,
9290export interface VInlineSelectProps extends Omit < SharedProps ,
9391 'falseValue' | 'iconFalse' | 'iconFalseColor' | 'iconFalseTitle' | 'iconTrue' | 'iconTrueColor' | 'iconTrueTitle' | 'icons' | 'trueValue' | 'truncateLength' | 'truncateSuffix'
9492> {
95- clearIcon ?: VSelect [ '$props' ] [ 'clearIcon' ] ;
93+ clearIcon ?: string | undefined ;
9694 clearable ?: VSelect [ '$props' ] [ 'clearable' ] ;
9795 density ?: VSelect [ '$props' ] [ 'density' ] ;
9896 hideSelected ?: VSelect [ '$props' ] [ 'hideSelected' ] ;
@@ -131,30 +129,36 @@ export interface VInlineTextFieldProps extends Omit<SharedProps,
131129
132130
133131// -------------------------------------------------- Components //
134- export type BooleanIcons = Required < Pick < SharedProps , 'iconFalse' | 'iconFalseColor' | 'iconFalseTitle' | 'iconTrue' | 'iconTrueColor' | 'iconTrueTitle' > > ;
132+ export interface BooleanIcons extends
133+ Required < Pick < SharedProps , 'iconFalseColor' | 'iconFalseTitle' | 'iconTrueColor' | 'iconTrueTitle' > > ,
134+ Pick < SharedProps ,
135+ 'iconFalse' |
136+ 'iconTrue'
137+ > { } ;
135138
136- export interface SaveFieldButtons extends Required < Pick < SharedProps ,
137- 'cancelButtonColor' |
138- 'cancelButtonSize' |
139- 'cancelButtonVariant' |
140- 'cancelButtonTitle' |
141- 'cancelIcon' |
142- 'cancelIconColor' |
143- 'error' |
144- 'fieldOnly' |
145- 'hideSaveIcon' |
146- 'loadingIcon' |
147- 'loadingIconColor' |
148- 'saveButtonColor' |
149- 'saveButtonSize' |
150- 'saveButtonTitle' |
151- 'saveButtonVariant' |
152- 'saveIconColor' |
153- 'saveButtonVariant' |
154- 'saveIcon'
155- > > {
156- loading : boolean ;
157- } ;
139+ export interface SaveFieldButtons extends
140+ Required < Pick < SharedProps ,
141+ 'cancelButtonColor' |
142+ 'cancelButtonSize' |
143+ 'cancelButtonVariant' |
144+ 'cancelButtonTitle' |
145+ 'cancelIconColor' |
146+ 'error' |
147+ 'fieldOnly' |
148+ 'hideSaveIcon' |
149+ 'loadingIconColor' |
150+ 'saveButtonColor' |
151+ 'saveButtonSize' |
152+ 'saveButtonTitle' |
153+ 'saveButtonVariant' |
154+ 'saveIconColor' |
155+ 'saveButtonVariant'
156+ > > ,
157+ Pick < SharedProps ,
158+ 'cancelIcon' |
159+ 'loadingIcon' |
160+ 'saveIcon'
161+ > { loading : boolean ; } ;
158162
159163
160164// -------------------------------------------------- Composables //
@@ -219,6 +223,18 @@ export interface UseFieldContainerClass {
219223 ) : object ;
220224}
221225
226+ // ------------------------ Icons //
227+ export interface UseGetIcon {
228+ (
229+ options : {
230+ icon : string | undefined ;
231+ iconOptions : IconOptions | undefined ;
232+ name : string ;
233+ }
234+ ) : string ;
235+ }
236+
237+
222238// ------------------------ Other //
223239export interface UseCheckForErrors {
224240 (
0 commit comments