@mythpe/quasar-ui-qui 0.0.79 → 0.0.81
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/package.json +1 -1
- package/src/components/form/MInput.vue +1 -1
- package/src/types/components.d.ts +77 -121
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import { QField, QInput, type QInputSlots } from 'quasar'
|
|
|
16
16
|
import { useBindInput, useMyth } from '../../composable'
|
|
17
17
|
import type { MInputProps as Props } from '../../types'
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
interface P {
|
|
20
20
|
name: Props['name'];
|
|
21
21
|
auto?: Props['auto'];
|
|
22
22
|
col?: Props['col'];
|
|
@@ -53,12 +53,12 @@ import type { MTransitionProps, MTransitionsSlots } from './api/MTransition'
|
|
|
53
53
|
import type { MAxiosProps, MAxiosSlots } from './api/MAxios'
|
|
54
54
|
import type { MSelectProps, MSelectSlots } from './api/MSelect'
|
|
55
55
|
|
|
56
|
-
export
|
|
56
|
+
export type MBtnProps = QBtnProps & {
|
|
57
57
|
ariaLabel?: boolean | string | null | undefined;
|
|
58
58
|
nativeLabel?: boolean | undefined;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export
|
|
61
|
+
export type MBtnSlots = QBtnSlots & {
|
|
62
62
|
/**
|
|
63
63
|
* Use for custom content, instead of relying on 'icon' and 'label' props
|
|
64
64
|
*/
|
|
@@ -69,7 +69,7 @@ export interface MBtnSlots extends QBtnSlots {
|
|
|
69
69
|
loading: () => VNode[];
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export
|
|
72
|
+
export type MBlockProps = {
|
|
73
73
|
/**
|
|
74
74
|
* Size of the padding block.
|
|
75
75
|
* Default: 'md'
|
|
@@ -85,7 +85,7 @@ export interface MBlockProps {
|
|
|
85
85
|
shadow?: ThemeShadow | undefined;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
export
|
|
88
|
+
export type MBlockSlots = {
|
|
89
89
|
default?: () => VNode[];
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -122,8 +122,8 @@ export type ColStyleType =
|
|
|
122
122
|
| 11
|
|
123
123
|
| 12
|
|
124
124
|
|
|
125
|
-
export
|
|
126
|
-
auto?: boolean
|
|
125
|
+
export type MColProps = {
|
|
126
|
+
auto?: boolean;
|
|
127
127
|
col?: ColStyleType;
|
|
128
128
|
xs?: ColStyleType;
|
|
129
129
|
sm?: ColStyleType;
|
|
@@ -133,29 +133,29 @@ export interface MColProps {
|
|
|
133
133
|
name?: string;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
export
|
|
136
|
+
export type MColSlots = {
|
|
137
137
|
default?: () => VNode[];
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
export
|
|
140
|
+
export type MColumnProps = {
|
|
141
141
|
[key: string]: any;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export
|
|
144
|
+
export type MColumnSlots = {
|
|
145
145
|
default?: () => VNode[];
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
export
|
|
148
|
+
export type MContainerProps = {
|
|
149
149
|
size?: ThemeSize | string | undefined;
|
|
150
150
|
dense?: boolean | undefined;
|
|
151
151
|
fluid?: boolean | undefined;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
export
|
|
154
|
+
export type MContainerSlots = {
|
|
155
155
|
default?: () => VNode[];
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
export
|
|
158
|
+
export type MRowProps = {
|
|
159
159
|
/**
|
|
160
160
|
* Default: false.
|
|
161
161
|
*/
|
|
@@ -166,21 +166,21 @@ export interface MRowProps {
|
|
|
166
166
|
col?: boolean | ThemeSize | undefined;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
export
|
|
169
|
+
export type MRowSlots = {
|
|
170
170
|
default?: () => VNode[];
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
export
|
|
173
|
+
export type MHelpRowProps = Partial<QItemProps> & {
|
|
174
174
|
text?: string | undefined;
|
|
175
175
|
icon?: string | undefined;
|
|
176
176
|
tooltip?: boolean | undefined;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
export
|
|
179
|
+
export type MHelpRowSlots = {
|
|
180
180
|
default?: () => VNode[];
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
export
|
|
183
|
+
export type MTypingStringProps = {
|
|
184
184
|
name: number | string;
|
|
185
185
|
tag?: string;
|
|
186
186
|
string: string | string[];
|
|
@@ -191,15 +191,13 @@ export interface MTypingStringProps {
|
|
|
191
191
|
options?: Omit<TypedOptions, 'loop' | 'typeSpeed' | 'backDelay' | 'fadeOut'>;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
export
|
|
194
|
+
export type MTypingStringSlots = {
|
|
195
195
|
default?: () => VNode[];
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
export
|
|
199
|
-
//
|
|
200
|
-
}
|
|
198
|
+
export type BaseInputFieldPropContext = FieldContext<any>
|
|
201
199
|
|
|
202
|
-
export
|
|
200
|
+
export type BaseInputFieldProps = {
|
|
203
201
|
/**
|
|
204
202
|
* Context of field input.
|
|
205
203
|
*/
|
|
@@ -207,23 +205,21 @@ export interface BaseInputFieldProps {
|
|
|
207
205
|
label?: string | undefined;
|
|
208
206
|
}
|
|
209
207
|
|
|
210
|
-
export
|
|
208
|
+
export type MInputFieldControlProps = {
|
|
211
209
|
[k: string]: any;
|
|
212
210
|
}
|
|
213
211
|
|
|
214
|
-
export
|
|
212
|
+
export type MInputFieldControlSlots = {
|
|
215
213
|
default: () => VNode[];
|
|
216
214
|
}
|
|
217
215
|
|
|
218
|
-
export
|
|
219
|
-
//
|
|
220
|
-
}
|
|
216
|
+
export type MInputLabelProps = BaseInputFieldProps
|
|
221
217
|
|
|
222
|
-
export
|
|
218
|
+
export type MInputLabelSlots = {
|
|
223
219
|
default?: () => VNode[];
|
|
224
220
|
}
|
|
225
221
|
|
|
226
|
-
export
|
|
222
|
+
export type ViewModeProps = {
|
|
227
223
|
/**
|
|
228
224
|
* Set input to vie mode use q-field
|
|
229
225
|
*/
|
|
@@ -234,14 +230,14 @@ export interface ViewModeProps {
|
|
|
234
230
|
viewModeValue?: any | undefined;
|
|
235
231
|
}
|
|
236
232
|
|
|
237
|
-
export
|
|
233
|
+
export type InputHelpProps = {
|
|
238
234
|
/**
|
|
239
235
|
* Information text with Icon.
|
|
240
236
|
*/
|
|
241
237
|
help?: string;
|
|
242
238
|
}
|
|
243
239
|
|
|
244
|
-
export
|
|
240
|
+
export type InputHelpSlots = {
|
|
245
241
|
/**
|
|
246
242
|
* VNode bottom of input & before 'bottom-input slot'.
|
|
247
243
|
*/
|
|
@@ -252,7 +248,7 @@ export type InputRulesContext = string | string[] | Record<string, any> | undefi
|
|
|
252
248
|
export type InputErrorsContext = string[];
|
|
253
249
|
export type InputFormErrorsContext = Record<string, InputErrorsContext> | undefined;
|
|
254
250
|
|
|
255
|
-
export
|
|
251
|
+
export type BaseInputFormProps = {
|
|
256
252
|
/**
|
|
257
253
|
* Input name.
|
|
258
254
|
*/
|
|
@@ -328,11 +324,9 @@ export interface BaseInputFormProps {
|
|
|
328
324
|
useChoice?: boolean | string;
|
|
329
325
|
}
|
|
330
326
|
|
|
331
|
-
export
|
|
332
|
-
//
|
|
333
|
-
}
|
|
327
|
+
export type BaseInputsProps = ViewModeProps & InputHelpProps & Omit<MColProps, 'name'> & BaseInputFormProps
|
|
334
328
|
|
|
335
|
-
export
|
|
329
|
+
export type BaseInputsSlots = InputHelpSlots & {
|
|
336
330
|
/**
|
|
337
331
|
* VNode top of input & top of 'top label slot'.
|
|
338
332
|
*/
|
|
@@ -355,15 +349,11 @@ export interface BaseInputsSlots extends InputHelpSlots {
|
|
|
355
349
|
'bottom-input': () => VNode[];
|
|
356
350
|
}
|
|
357
351
|
|
|
358
|
-
export
|
|
359
|
-
//
|
|
360
|
-
}
|
|
352
|
+
export type MInputProps = Omit<QInputProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint'> & BaseInputsProps
|
|
361
353
|
|
|
362
|
-
export
|
|
363
|
-
//
|
|
364
|
-
}
|
|
354
|
+
export type MInputSlots = QInputSlots & QFieldSlots & BaseInputsSlots
|
|
365
355
|
|
|
366
|
-
export
|
|
356
|
+
export type MPasswordProps = MInputProps & {
|
|
367
357
|
/**
|
|
368
358
|
* icon prepend it to password input.
|
|
369
359
|
*/
|
|
@@ -374,29 +364,23 @@ export interface MPasswordProps extends MInputProps {
|
|
|
374
364
|
noToggle?: boolean | undefined;
|
|
375
365
|
}
|
|
376
366
|
|
|
377
|
-
export
|
|
378
|
-
//
|
|
379
|
-
}
|
|
367
|
+
export type MEditorProps = Omit<QEditorProps, 'modelValue' | 'placeholder'> & BaseInputsProps
|
|
380
368
|
|
|
381
|
-
export
|
|
382
|
-
//
|
|
383
|
-
}
|
|
369
|
+
export type MEditorSlots = QEditorSlots & BaseInputsSlots
|
|
384
370
|
|
|
385
|
-
export
|
|
386
|
-
accept?: string | undefined
|
|
387
|
-
images?: boolean | string
|
|
388
|
-
svg?: boolean | string
|
|
389
|
-
video?: boolean | string
|
|
390
|
-
pdf?: boolean | string
|
|
391
|
-
excel?: boolean | string
|
|
392
|
-
dragDrop?: boolean | undefined
|
|
371
|
+
export type MFileProps = Omit<QFileProps, 'modelValue' | 'rules' | 'name' | 'label' | 'hint'> & Omit<BaseInputsProps, 'autocomplete'> & {
|
|
372
|
+
accept?: string | undefined
|
|
373
|
+
images?: boolean | string
|
|
374
|
+
svg?: boolean | string
|
|
375
|
+
video?: boolean | string
|
|
376
|
+
pdf?: boolean | string
|
|
377
|
+
excel?: boolean | string
|
|
378
|
+
dragDrop?: boolean | undefined
|
|
393
379
|
}
|
|
394
380
|
|
|
395
|
-
export
|
|
396
|
-
//
|
|
397
|
-
}
|
|
381
|
+
export type MFileSlots = QFileSlots & BaseInputsSlots
|
|
398
382
|
|
|
399
|
-
export
|
|
383
|
+
export type BaseCheckboxProps = Omit<BaseInputsProps, 'topLabel'> & {
|
|
400
384
|
/**
|
|
401
385
|
* Input row props.
|
|
402
386
|
*/
|
|
@@ -407,11 +391,9 @@ export interface BaseCheckboxProps extends Omit<BaseInputsProps, 'topLabel'> {
|
|
|
407
391
|
colProps?: Record<string, any>;
|
|
408
392
|
}
|
|
409
393
|
|
|
410
|
-
export
|
|
411
|
-
//
|
|
412
|
-
}
|
|
394
|
+
export type MCheckboxProps = BaseCheckboxProps & Omit<QCheckboxProps, 'name' | 'modelValue' | 'label'>
|
|
413
395
|
|
|
414
|
-
export
|
|
396
|
+
export type MCheckboxSlots = Omit<BaseInputsSlots & 'top-label'> & {
|
|
415
397
|
/**
|
|
416
398
|
* VNode before field main content.
|
|
417
399
|
*/
|
|
@@ -422,17 +404,11 @@ export interface MCheckboxSlots extends Omit<BaseInputsSlots, 'top-label'> {
|
|
|
422
404
|
after: () => VNode[];
|
|
423
405
|
}
|
|
424
406
|
|
|
425
|
-
export
|
|
426
|
-
//
|
|
427
|
-
}
|
|
407
|
+
export type MRadioProps = Omit<QRadioProps, 'name' | 'modelValue' | 'label'> & BaseCheckboxProps
|
|
428
408
|
|
|
429
|
-
export
|
|
430
|
-
//
|
|
431
|
-
}
|
|
409
|
+
export type MRadioSlots = MCheckboxSlots
|
|
432
410
|
|
|
433
|
-
export
|
|
434
|
-
Omit<QDateProps, 'modelValue' | 'options'>,
|
|
435
|
-
Omit<QTimeProps, 'modelValue'> {
|
|
411
|
+
export type MPickerProps = BaseInputsProps & Omit<QDateProps, 'modelValue' | 'options'> & Omit<QTimeProps, 'modelValue'> & {
|
|
436
412
|
/**
|
|
437
413
|
* Initial value of the picker.
|
|
438
414
|
* Default is: null.
|
|
@@ -454,54 +430,38 @@ export interface MPickerProps extends BaseInputsProps,
|
|
|
454
430
|
rangeSeparator?: string;
|
|
455
431
|
}
|
|
456
432
|
|
|
457
|
-
export
|
|
458
|
-
//
|
|
459
|
-
}
|
|
433
|
+
export type MPickerSlots = MInputSlots
|
|
460
434
|
|
|
461
|
-
export
|
|
462
|
-
//
|
|
463
|
-
}
|
|
435
|
+
export type MDateProps = Omit<MPickerProps, 'type'>
|
|
464
436
|
|
|
465
|
-
export
|
|
466
|
-
//
|
|
467
|
-
}
|
|
437
|
+
export type MDateSlots = MPickerSlots
|
|
468
438
|
|
|
469
|
-
export
|
|
470
|
-
//
|
|
471
|
-
}
|
|
439
|
+
export type MTimeProps = Omit<MPickerProps, 'type'>
|
|
472
440
|
|
|
473
|
-
export
|
|
474
|
-
//
|
|
475
|
-
}
|
|
441
|
+
export type MTimeSlots = MPickerSlots
|
|
476
442
|
|
|
477
|
-
export
|
|
478
|
-
//
|
|
479
|
-
}
|
|
443
|
+
export type MFieldProps = Omit<MInputProps, 'viewMode' | 'viewModeValue' | 'fieldOptions'>
|
|
480
444
|
|
|
481
|
-
export
|
|
482
|
-
//
|
|
483
|
-
}
|
|
445
|
+
export type MFieldSlots = MInputSlots
|
|
484
446
|
|
|
485
|
-
export
|
|
447
|
+
export type MHiddenInputSlots = {
|
|
486
448
|
[key: string]: () => VNode[]
|
|
487
449
|
}
|
|
488
450
|
|
|
489
|
-
export
|
|
451
|
+
export type MHiddenInputProps = Pick<BaseInputFormProps, 'rules' | 'required'> & {
|
|
490
452
|
/**
|
|
491
453
|
* Input name.
|
|
492
454
|
*/
|
|
493
|
-
name: string
|
|
455
|
+
name: string
|
|
494
456
|
/**
|
|
495
457
|
* Input model value.
|
|
496
458
|
*/
|
|
497
|
-
modelValue?: any
|
|
459
|
+
modelValue?: any
|
|
498
460
|
}
|
|
499
461
|
|
|
500
|
-
export
|
|
501
|
-
//
|
|
502
|
-
}
|
|
462
|
+
export type MHiddenProps = MHiddenInputProps & Pick<ViewModeProps, 'viewMode'> & Omit<MColProps, 'name'>
|
|
503
463
|
|
|
504
|
-
export
|
|
464
|
+
export type MHiddenSlots = {
|
|
505
465
|
/**
|
|
506
466
|
* Field main content
|
|
507
467
|
*/
|
|
@@ -510,7 +470,7 @@ export interface MHiddenSlots {
|
|
|
510
470
|
|
|
511
471
|
export type MFormScope = FormContext;
|
|
512
472
|
|
|
513
|
-
export
|
|
473
|
+
export type MFormProps = {
|
|
514
474
|
/**
|
|
515
475
|
* Form HTML element attributes.
|
|
516
476
|
*/
|
|
@@ -551,13 +511,13 @@ export interface MFormProps {
|
|
|
551
511
|
readonly padding?: boolean;
|
|
552
512
|
}
|
|
553
513
|
|
|
554
|
-
export
|
|
514
|
+
export type MFormSlots = {
|
|
555
515
|
default: (scope: MFormScope) => VNode[];
|
|
556
516
|
}
|
|
557
517
|
|
|
558
518
|
export declare type GenericFormValues = Record<any, any>;
|
|
559
519
|
|
|
560
|
-
export
|
|
520
|
+
export type MOptionsOptionContext = Omit<QToggleProps, 'modelValue'> & Omit<QRadioProps, 'modelValue'> & Omit<QCheckboxProps, 'modelValue'> & {
|
|
561
521
|
/**
|
|
562
522
|
* Label to display along the component
|
|
563
523
|
*/
|
|
@@ -571,15 +531,15 @@ export interface MOptionsOptionContext extends Omit<QToggleProps, 'modelValue'>,
|
|
|
571
531
|
*/
|
|
572
532
|
disable?: boolean;
|
|
573
533
|
/**
|
|
574
|
-
* Any other props from QToggle
|
|
534
|
+
* Any other props from QToggle & QCheckbox, or QRadio
|
|
575
535
|
*/
|
|
576
536
|
}
|
|
577
537
|
|
|
578
|
-
export
|
|
579
|
-
Omit<BaseInputsProps, 'autocomplete' | 'modelValue'> {
|
|
538
|
+
export type MOptionsProps = Omit<QOptionGroupProps, 'name' | 'modelValue' | 'options'> &
|
|
539
|
+
Omit<BaseInputsProps, 'autocomplete' | 'modelValue'> & {
|
|
580
540
|
modelValue?: any;
|
|
581
541
|
/**
|
|
582
|
-
* Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle
|
|
542
|
+
* Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle & QCheckbox or QRadio can also be added as key/value pairs to control the components singularly
|
|
583
543
|
*/
|
|
584
544
|
options?: MOptionsOptionContext[];
|
|
585
545
|
/**
|
|
@@ -601,7 +561,7 @@ export interface MOptionsProps extends Omit<QOptionGroupProps, 'name' | 'modelVa
|
|
|
601
561
|
fitWidth?: boolean;
|
|
602
562
|
}
|
|
603
563
|
|
|
604
|
-
export
|
|
564
|
+
export type MOtpProps = Omit<QInputProps, 'modelValue'> & {
|
|
605
565
|
modelValue?: string | number;
|
|
606
566
|
inputLength?: string | number;
|
|
607
567
|
numeric?: boolean;
|
|
@@ -613,19 +573,17 @@ export interface MOtpProps extends Omit<QInputProps, 'modelValue'> {
|
|
|
613
573
|
errors?: string[];
|
|
614
574
|
}
|
|
615
575
|
|
|
616
|
-
export
|
|
576
|
+
export type MOtpSlots = QInputSlots & {
|
|
617
577
|
default: () => VNode[];
|
|
618
578
|
'before-all': () => VNode[];
|
|
619
579
|
'after-all': () => VNode[];
|
|
620
580
|
'after-input': () => VNode[];
|
|
621
581
|
}
|
|
622
582
|
|
|
623
|
-
export
|
|
624
|
-
//
|
|
625
|
-
}
|
|
583
|
+
export type MOptionsSlots = QOptionGroupSlots & QFieldSlots & BaseInputsSlots
|
|
626
584
|
|
|
627
|
-
export
|
|
628
|
-
Omit<QToggleProps, 'modelValue' | 'label' | 'name'> {
|
|
585
|
+
export type MToggleProps = Omit<BaseInputsProps, 'placeholder' | 'topLabel' | 'autocomplete' | 'modelValue'> &
|
|
586
|
+
Omit<QToggleProps, 'modelValue' | 'label' | 'name'> & {
|
|
629
587
|
modelValue?: any;
|
|
630
588
|
/**
|
|
631
589
|
* Customize the label when the toggle is true.
|
|
@@ -651,9 +609,7 @@ export interface MToggleProps extends Omit<BaseInputsProps, 'placeholder' | 'top
|
|
|
651
609
|
colProps?: Record<string, any>;
|
|
652
610
|
}
|
|
653
611
|
|
|
654
|
-
export
|
|
655
|
-
//
|
|
656
|
-
}
|
|
612
|
+
export type MToggleSlots = MCheckboxSlots & Pick<BaseInputsProps, 'topLabel'>
|
|
657
613
|
|
|
658
614
|
export type MUploaderMediaItem = {
|
|
659
615
|
id: number;
|
|
@@ -678,7 +634,7 @@ export type MUploaderMediaItem = {
|
|
|
678
634
|
|
|
679
635
|
export type MUploaderServiceType = Pick<HelpersStubSchema, 'getUploadAttachmentsUrl' | 'updateAttachment' | 'uploadAttachments' | 'deleteAttachment'>
|
|
680
636
|
|
|
681
|
-
export
|
|
637
|
+
export type MUploaderProps = Omit<QUploaderProps, 'formFields' | 'headers' | 'url'> & MColProps & Pick<BaseInputsProps, 'fieldOptions'> & {
|
|
682
638
|
/**
|
|
683
639
|
* Name fo field input, Attachments key name.
|
|
684
640
|
* Default is: 'attachments'
|
|
@@ -792,7 +748,7 @@ export interface MUploaderProps extends Omit<QUploaderProps, 'formFields' | 'hea
|
|
|
792
748
|
mediaLabel?: string | undefined;
|
|
793
749
|
}
|
|
794
750
|
|
|
795
|
-
export
|
|
751
|
+
export type MUploaderSlots = QUploaderSlots & {
|
|
796
752
|
/**
|
|
797
753
|
* Field main content
|
|
798
754
|
*/
|