@vuetify/nightly 4.0.0-dev-20230419.0 → 4.0.0-dev-20230422.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.
Files changed (121) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/json/attributes.json +172 -108
  3. package/dist/json/importMap.json +58 -58
  4. package/dist/json/tags.json +16 -0
  5. package/dist/json/web-types.json +522 -220
  6. package/dist/vuetify-labs.css +335 -172
  7. package/dist/vuetify-labs.d.ts +620 -171
  8. package/dist/vuetify-labs.esm.js +864 -182
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +864 -181
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +166 -3
  13. package/dist/vuetify.d.ts +584 -167
  14. package/dist/vuetify.esm.js +806 -134
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +806 -133
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +748 -682
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/adapters/date-adapter.mjs +2 -0
  22. package/lib/adapters/date-adapter.mjs.map +1 -0
  23. package/lib/adapters/vuetify.mjs +399 -0
  24. package/lib/adapters/vuetify.mjs.map +1 -0
  25. package/lib/blueprints/index.d.ts +34 -0
  26. package/lib/blueprints/md1.d.ts +34 -0
  27. package/lib/blueprints/md2.d.ts +34 -0
  28. package/lib/blueprints/md3.d.ts +34 -0
  29. package/lib/components/VAppBar/VAppBar.mjs +62 -10
  30. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  31. package/lib/components/VAppBar/index.d.ts +26 -0
  32. package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
  33. package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
  34. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  35. package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
  36. package/lib/components/VAutocomplete/index.d.ts +29 -17
  37. package/lib/components/VBtn/_mixins.scss +1 -1
  38. package/lib/components/VCard/VCard.mjs.map +1 -1
  39. package/lib/components/VCard/index.d.ts +21 -16
  40. package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
  41. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  42. package/lib/components/VCheckbox/index.d.ts +22 -1
  43. package/lib/components/VCombobox/VCombobox.css +1 -1
  44. package/lib/components/VCombobox/VCombobox.mjs +6 -4
  45. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  46. package/lib/components/VCombobox/VCombobox.sass +1 -1
  47. package/lib/components/VCombobox/index.d.ts +29 -17
  48. package/lib/components/VField/index.d.ts +6 -0
  49. package/lib/components/VFileInput/VFileInput.mjs +13 -17
  50. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  51. package/lib/components/VFileInput/index.d.ts +68 -23
  52. package/lib/components/VInput/VInput.mjs +14 -7
  53. package/lib/components/VInput/VInput.mjs.map +1 -1
  54. package/lib/components/VInput/index.d.ts +22 -1
  55. package/lib/components/VOverlay/locationStrategies.mjs +9 -4
  56. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  57. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
  58. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  59. package/lib/components/VRadioGroup/index.d.ts +22 -1
  60. package/lib/components/VRangeSlider/VRangeSlider.mjs +33 -22
  61. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  62. package/lib/components/VRangeSlider/index.d.ts +39 -6
  63. package/lib/components/VSelect/VSelect.mjs +6 -0
  64. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  65. package/lib/components/VSelect/index.d.ts +32 -17
  66. package/lib/components/VSlider/VSlider.mjs +33 -15
  67. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  68. package/lib/components/VSlider/index.d.ts +39 -6
  69. package/lib/components/VSlider/slider.mjs +43 -23
  70. package/lib/components/VSlider/slider.mjs.map +1 -1
  71. package/lib/components/VSwitch/VSwitch.mjs +5 -3
  72. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  73. package/lib/components/VSwitch/index.d.ts +43 -1
  74. package/lib/components/VTextField/VTextField.mjs +4 -12
  75. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  76. package/lib/components/VTextField/index.d.ts +70 -22
  77. package/lib/components/VTextarea/VTextarea.mjs +4 -12
  78. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  79. package/lib/components/VTextarea/index.d.ts +61 -22
  80. package/lib/components/VToolbar/VToolbar.css +3 -1
  81. package/lib/components/VToolbar/VToolbar.sass +3 -1
  82. package/lib/components/VValidation/index.d.ts +10 -1
  83. package/lib/components/index.d.ts +525 -150
  84. package/lib/composables/date.mjs +39 -0
  85. package/lib/composables/date.mjs.map +1 -0
  86. package/lib/composables/focus.mjs +3 -2
  87. package/lib/composables/focus.mjs.map +1 -1
  88. package/lib/composables/index.mjs +1 -0
  89. package/lib/composables/index.mjs.map +1 -1
  90. package/lib/composables/items.mjs +7 -2
  91. package/lib/composables/items.mjs.map +1 -1
  92. package/lib/composables/scroll.mjs +3 -0
  93. package/lib/composables/scroll.mjs.map +1 -1
  94. package/lib/entry-bundler.mjs +1 -1
  95. package/lib/framework.mjs +8 -3
  96. package/lib/framework.mjs.map +1 -1
  97. package/lib/iconsets/mdi-svg.mjs +2 -2
  98. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  99. package/lib/index.d.ts +59 -17
  100. package/lib/labs/VDataTable/VDataTable.mjs +2 -2
  101. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  102. package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
  103. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  104. package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
  105. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  106. package/lib/labs/VDataTable/VDataTableServer.mjs +2 -1
  107. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  108. package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
  109. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  110. package/lib/labs/VDataTable/composables/options.mjs +2 -1
  111. package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
  112. package/lib/labs/VDataTable/index.d.ts +44 -11
  113. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
  114. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  115. package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
  116. package/lib/labs/components.d.ts +53 -20
  117. package/lib/styles/main.css +152 -0
  118. package/lib/styles/settings/_utilities.scss +11 -1
  119. package/lib/util/helpers.mjs +4 -0
  120. package/lib/util/helpers.mjs.map +1 -1
  121. package/package.json +2 -2
@@ -71,11 +71,11 @@ declare const VFileInput: {
71
71
  errorMessages: string | string[];
72
72
  maxErrors: string | number;
73
73
  rules: ValidationRule[];
74
+ persistentHint: boolean;
74
75
  clearable: boolean;
75
76
  dirty: boolean;
76
77
  persistentClear: boolean;
77
78
  singleLine: boolean;
78
- persistentHint: boolean;
79
79
  chips: boolean;
80
80
  counterSizeString: string;
81
81
  counterString: string;
@@ -100,11 +100,11 @@ declare const VFileInput: {
100
100
  errorMessages: string | string[];
101
101
  maxErrors: string | number;
102
102
  rules: ValidationRule[];
103
+ persistentHint: boolean;
103
104
  clearable: boolean;
104
105
  dirty: boolean;
105
106
  persistentClear: boolean;
106
107
  singleLine: boolean;
107
- persistentHint: boolean;
108
108
  chips: boolean;
109
109
  counterSizeString: string;
110
110
  counterString: string;
@@ -126,10 +126,11 @@ declare const VFileInput: {
126
126
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
127
127
  'onClick:appendInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
128
128
  'onClick:prependInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
129
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
129
130
  validateOn?: "input" | "blur" | "submit" | undefined;
130
131
  validationValue?: any;
131
- hideDetails?: boolean | "auto" | undefined;
132
132
  hint?: string | undefined;
133
+ hideDetails?: boolean | "auto" | undefined;
133
134
  } & {
134
135
  $children?: {} | vue.VNodeChild | {
135
136
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & ((args_0: VFieldSlot) => vue.VNodeChild)) | undefined;
@@ -180,9 +181,10 @@ declare const VFileInput: {
180
181
  "v-slot:counter"?: false | (() => vue.VNodeChild) | undefined;
181
182
  } & {
182
183
  "onUpdate:modelValue"?: ((files: File[]) => any) | undefined;
184
+ "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
183
185
  "onClick:control"?: ((e: MouseEvent) => any) | undefined;
184
186
  "onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
185
- } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "flat" | "reverse" | "error" | "active" | "direction" | "disabled" | "multiple" | "readonly" | "counter" | "messages" | "rounded" | "density" | "variant" | "modelValue" | "prependIcon" | "clearIcon" | "focused" | "errorMessages" | "maxErrors" | "rules" | "clearable" | "dirty" | "persistentClear" | "singleLine" | "persistentHint" | "chips" | "counterSizeString" | "counterString" | "showSize">;
187
+ } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "flat" | "reverse" | "error" | "active" | "direction" | "disabled" | "multiple" | "readonly" | "counter" | "messages" | "rounded" | "density" | "variant" | "modelValue" | "prependIcon" | "clearIcon" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint" | "clearable" | "dirty" | "persistentClear" | "singleLine" | "chips" | "counterSizeString" | "counterString" | "showSize">;
186
188
  $attrs: {
187
189
  [x: string]: unknown;
188
190
  };
@@ -194,7 +196,7 @@ declare const VFileInput: {
194
196
  }>;
195
197
  $root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
196
198
  $parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
197
- $emit: ((event: "update:modelValue", files: File[]) => void) & ((event: "click:control", e: MouseEvent) => void) & ((event: "mousedown:control", e: MouseEvent) => void);
199
+ $emit: ((event: "update:modelValue", files: File[]) => void) & ((event: "update:focused", focused: boolean) => void) & ((event: "click:control", e: MouseEvent) => void) & ((event: "mousedown:control", e: MouseEvent) => void);
198
200
  $el: any;
199
201
  $options: vue.ComponentOptionsBase<{
200
202
  flat: boolean;
@@ -216,11 +218,11 @@ declare const VFileInput: {
216
218
  errorMessages: string | string[];
217
219
  maxErrors: string | number;
218
220
  rules: ValidationRule[];
221
+ persistentHint: boolean;
219
222
  clearable: boolean;
220
223
  dirty: boolean;
221
224
  persistentClear: boolean;
222
225
  singleLine: boolean;
223
- persistentHint: boolean;
224
226
  chips: boolean;
225
227
  counterSizeString: string;
226
228
  counterString: string;
@@ -242,10 +244,11 @@ declare const VFileInput: {
242
244
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
243
245
  'onClick:appendInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
244
246
  'onClick:prependInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
247
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
245
248
  validateOn?: "input" | "blur" | "submit" | undefined;
246
249
  validationValue?: any;
247
- hideDetails?: boolean | "auto" | undefined;
248
250
  hint?: string | undefined;
251
+ hideDetails?: boolean | "auto" | undefined;
249
252
  } & {
250
253
  $children?: {} | vue.VNodeChild | {
251
254
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & ((args_0: VFieldSlot) => vue.VNodeChild)) | undefined;
@@ -296,6 +299,7 @@ declare const VFileInput: {
296
299
  "v-slot:counter"?: false | (() => vue.VNodeChild) | undefined;
297
300
  } & {
298
301
  "onUpdate:modelValue"?: ((files: File[]) => any) | undefined;
302
+ "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
299
303
  "onClick:control"?: ((e: MouseEvent) => any) | undefined;
300
304
  "onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
301
305
  }, Omit<Omit<{
@@ -312,6 +316,7 @@ declare const VFileInput: {
312
316
  errorMessages: string | string[];
313
317
  maxErrors: string | number;
314
318
  rules: ValidationRule[];
319
+ persistentHint: boolean;
315
320
  }> & Omit<{
316
321
  error: boolean;
317
322
  direction: "horizontal" | "vertical";
@@ -323,6 +328,7 @@ declare const VFileInput: {
323
328
  errorMessages: string | string[];
324
329
  maxErrors: string | number;
325
330
  rules: ValidationRule[];
331
+ persistentHint: boolean;
326
332
  } & {
327
333
  id?: string | undefined;
328
334
  name?: string | undefined;
@@ -332,8 +338,10 @@ declare const VFileInput: {
332
338
  appendIcon?: IconValue | undefined;
333
339
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
334
340
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
341
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
335
342
  validateOn?: "input" | "blur" | "submit" | undefined;
336
343
  validationValue?: any;
344
+ hint?: string | undefined;
337
345
  hideDetails?: boolean | "auto" | undefined;
338
346
  } & {
339
347
  $children?: {} | vue.VNodeChild | {
@@ -361,7 +369,7 @@ declare const VFileInput: {
361
369
  "v-slot:details"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
362
370
  } & {
363
371
  "onUpdate:modelValue"?: ((val: any) => any) | undefined;
364
- } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules">;
372
+ } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint">;
365
373
  $attrs: {
366
374
  [x: string]: unknown;
367
375
  };
@@ -386,6 +394,7 @@ declare const VFileInput: {
386
394
  errorMessages: string | string[];
387
395
  maxErrors: string | number;
388
396
  rules: ValidationRule[];
397
+ persistentHint: boolean;
389
398
  } & {
390
399
  id?: string | undefined;
391
400
  name?: string | undefined;
@@ -395,8 +404,10 @@ declare const VFileInput: {
395
404
  appendIcon?: IconValue | undefined;
396
405
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
397
406
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
407
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
398
408
  validateOn?: "input" | "blur" | "submit" | undefined;
399
409
  validationValue?: any;
410
+ hint?: string | undefined;
400
411
  hideDetails?: boolean | "auto" | undefined;
401
412
  } & {
402
413
  $children?: {} | vue.VNodeChild | {
@@ -441,6 +452,7 @@ declare const VFileInput: {
441
452
  errorMessages: string | string[];
442
453
  maxErrors: string | number;
443
454
  rules: ValidationRule[];
455
+ persistentHint: boolean;
444
456
  }, {}, string> & {
445
457
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
446
458
  created?: ((() => void) | (() => void)[]) | undefined;
@@ -472,6 +484,7 @@ declare const VFileInput: {
472
484
  errorMessages: string | string[];
473
485
  maxErrors: string | number;
474
486
  rules: ValidationRule[];
487
+ persistentHint: boolean;
475
488
  } & {
476
489
  id?: string | undefined;
477
490
  name?: string | undefined;
@@ -481,8 +494,10 @@ declare const VFileInput: {
481
494
  appendIcon?: IconValue | undefined;
482
495
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
483
496
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
497
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
484
498
  validateOn?: "input" | "blur" | "submit" | undefined;
485
499
  validationValue?: any;
500
+ hint?: string | undefined;
486
501
  hideDetails?: boolean | "auto" | undefined;
487
502
  } & {
488
503
  $children?: {} | vue.VNodeChild | {
@@ -514,9 +529,10 @@ declare const VFileInput: {
514
529
  reset: () => void;
515
530
  resetValidation: () => void;
516
531
  validate: () => Promise<string[]>;
517
- }> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "validateOn" | "validationValue" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules") | "v-slot:details">, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
532
+ }> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "onUpdate:focused" | "validateOn" | "validationValue" | "hint" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint") | "v-slot:details">, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
518
533
  'click:control': (e: MouseEvent) => true;
519
534
  'mousedown:control': (e: MouseEvent) => true;
535
+ 'update:focused': (focused: boolean) => true;
520
536
  'update:modelValue': (files: File[]) => true;
521
537
  }, string, {
522
538
  flat: boolean;
@@ -539,11 +555,11 @@ declare const VFileInput: {
539
555
  errorMessages: string | string[];
540
556
  maxErrors: string | number;
541
557
  rules: ValidationRule[];
558
+ persistentHint: boolean;
542
559
  clearable: boolean;
543
560
  dirty: boolean;
544
561
  persistentClear: boolean;
545
562
  singleLine: boolean;
546
- persistentHint: boolean;
547
563
  chips: boolean;
548
564
  counterSizeString: string;
549
565
  counterString: string;
@@ -588,11 +604,11 @@ declare const VFileInput: {
588
604
  errorMessages: string | string[];
589
605
  maxErrors: string | number;
590
606
  rules: ValidationRule[];
607
+ persistentHint: boolean;
591
608
  clearable: boolean;
592
609
  dirty: boolean;
593
610
  persistentClear: boolean;
594
611
  singleLine: boolean;
595
- persistentHint: boolean;
596
612
  chips: boolean;
597
613
  counterSizeString: string;
598
614
  counterString: string;
@@ -614,10 +630,11 @@ declare const VFileInput: {
614
630
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
615
631
  'onClick:appendInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
616
632
  'onClick:prependInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
633
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
617
634
  validateOn?: "input" | "blur" | "submit" | undefined;
618
635
  validationValue?: any;
619
- hideDetails?: boolean | "auto" | undefined;
620
636
  hint?: string | undefined;
637
+ hideDetails?: boolean | "auto" | undefined;
621
638
  } & {
622
639
  $children?: {} | vue.VNodeChild | {
623
640
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & ((args_0: VFieldSlot) => vue.VNodeChild)) | undefined;
@@ -668,6 +685,7 @@ declare const VFileInput: {
668
685
  "v-slot:counter"?: false | (() => vue.VNodeChild) | undefined;
669
686
  } & {
670
687
  "onUpdate:modelValue"?: ((files: File[]) => any) | undefined;
688
+ "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
671
689
  "onClick:control"?: ((e: MouseEvent) => any) | undefined;
672
690
  "onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
673
691
  } & vue.ShallowUnwrapRef<Omit<Omit<{
@@ -684,6 +702,7 @@ declare const VFileInput: {
684
702
  errorMessages: string | string[];
685
703
  maxErrors: string | number;
686
704
  rules: ValidationRule[];
705
+ persistentHint: boolean;
687
706
  }> & Omit<{
688
707
  error: boolean;
689
708
  direction: "horizontal" | "vertical";
@@ -695,6 +714,7 @@ declare const VFileInput: {
695
714
  errorMessages: string | string[];
696
715
  maxErrors: string | number;
697
716
  rules: ValidationRule[];
717
+ persistentHint: boolean;
698
718
  } & {
699
719
  id?: string | undefined;
700
720
  name?: string | undefined;
@@ -704,8 +724,10 @@ declare const VFileInput: {
704
724
  appendIcon?: IconValue | undefined;
705
725
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
706
726
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
727
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
707
728
  validateOn?: "input" | "blur" | "submit" | undefined;
708
729
  validationValue?: any;
730
+ hint?: string | undefined;
709
731
  hideDetails?: boolean | "auto" | undefined;
710
732
  } & {
711
733
  $children?: {} | vue.VNodeChild | {
@@ -733,7 +755,7 @@ declare const VFileInput: {
733
755
  "v-slot:details"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
734
756
  } & {
735
757
  "onUpdate:modelValue"?: ((val: any) => any) | undefined;
736
- } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules">;
758
+ } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint">;
737
759
  $attrs: {
738
760
  [x: string]: unknown;
739
761
  };
@@ -758,6 +780,7 @@ declare const VFileInput: {
758
780
  errorMessages: string | string[];
759
781
  maxErrors: string | number;
760
782
  rules: ValidationRule[];
783
+ persistentHint: boolean;
761
784
  } & {
762
785
  id?: string | undefined;
763
786
  name?: string | undefined;
@@ -767,8 +790,10 @@ declare const VFileInput: {
767
790
  appendIcon?: IconValue | undefined;
768
791
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
769
792
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
793
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
770
794
  validateOn?: "input" | "blur" | "submit" | undefined;
771
795
  validationValue?: any;
796
+ hint?: string | undefined;
772
797
  hideDetails?: boolean | "auto" | undefined;
773
798
  } & {
774
799
  $children?: {} | vue.VNodeChild | {
@@ -813,6 +838,7 @@ declare const VFileInput: {
813
838
  errorMessages: string | string[];
814
839
  maxErrors: string | number;
815
840
  rules: ValidationRule[];
841
+ persistentHint: boolean;
816
842
  }, {}, string> & {
817
843
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
818
844
  created?: ((() => void) | (() => void)[]) | undefined;
@@ -844,6 +870,7 @@ declare const VFileInput: {
844
870
  errorMessages: string | string[];
845
871
  maxErrors: string | number;
846
872
  rules: ValidationRule[];
873
+ persistentHint: boolean;
847
874
  } & {
848
875
  id?: string | undefined;
849
876
  name?: string | undefined;
@@ -853,8 +880,10 @@ declare const VFileInput: {
853
880
  appendIcon?: IconValue | undefined;
854
881
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
855
882
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
883
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
856
884
  validateOn?: "input" | "blur" | "submit" | undefined;
857
885
  validationValue?: any;
886
+ hint?: string | undefined;
858
887
  hideDetails?: boolean | "auto" | undefined;
859
888
  } & {
860
889
  $children?: {} | vue.VNodeChild | {
@@ -886,7 +915,7 @@ declare const VFileInput: {
886
915
  reset: () => void;
887
916
  resetValidation: () => void;
888
917
  validate: () => Promise<string[]>;
889
- }> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "validateOn" | "validationValue" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules") | "v-slot:details">, `$${any}`>> & {} & vue.ComponentCustomProperties & {};
918
+ }> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "onUpdate:focused" | "validateOn" | "validationValue" | "hint" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint") | "v-slot:details">, `$${any}`>> & {} & vue.ComponentCustomProperties & {};
890
919
  __isFragment?: undefined;
891
920
  __isTeleport?: undefined;
892
921
  __isSuspense?: undefined;
@@ -910,11 +939,11 @@ declare const VFileInput: {
910
939
  errorMessages: string | string[];
911
940
  maxErrors: string | number;
912
941
  rules: ValidationRule[];
942
+ persistentHint: boolean;
913
943
  clearable: boolean;
914
944
  dirty: boolean;
915
945
  persistentClear: boolean;
916
946
  singleLine: boolean;
917
- persistentHint: boolean;
918
947
  chips: boolean;
919
948
  counterSizeString: string;
920
949
  counterString: string;
@@ -936,10 +965,11 @@ declare const VFileInput: {
936
965
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
937
966
  'onClick:appendInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
938
967
  'onClick:prependInner'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
968
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
939
969
  validateOn?: "input" | "blur" | "submit" | undefined;
940
970
  validationValue?: any;
941
- hideDetails?: boolean | "auto" | undefined;
942
971
  hint?: string | undefined;
972
+ hideDetails?: boolean | "auto" | undefined;
943
973
  } & {
944
974
  $children?: {} | vue.VNodeChild | {
945
975
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & ((args_0: VFieldSlot) => vue.VNodeChild)) | undefined;
@@ -990,6 +1020,7 @@ declare const VFileInput: {
990
1020
  "v-slot:counter"?: false | (() => vue.VNodeChild) | undefined;
991
1021
  } & {
992
1022
  "onUpdate:modelValue"?: ((files: File[]) => any) | undefined;
1023
+ "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
993
1024
  "onClick:control"?: ((e: MouseEvent) => any) | undefined;
994
1025
  "onMousedown:control"?: ((e: MouseEvent) => any) | undefined;
995
1026
  }, Omit<Omit<{
@@ -1006,6 +1037,7 @@ declare const VFileInput: {
1006
1037
  errorMessages: string | string[];
1007
1038
  maxErrors: string | number;
1008
1039
  rules: ValidationRule[];
1040
+ persistentHint: boolean;
1009
1041
  }> & Omit<{
1010
1042
  error: boolean;
1011
1043
  direction: "horizontal" | "vertical";
@@ -1017,6 +1049,7 @@ declare const VFileInput: {
1017
1049
  errorMessages: string | string[];
1018
1050
  maxErrors: string | number;
1019
1051
  rules: ValidationRule[];
1052
+ persistentHint: boolean;
1020
1053
  } & {
1021
1054
  id?: string | undefined;
1022
1055
  name?: string | undefined;
@@ -1026,8 +1059,10 @@ declare const VFileInput: {
1026
1059
  appendIcon?: IconValue | undefined;
1027
1060
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
1028
1061
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
1062
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
1029
1063
  validateOn?: "input" | "blur" | "submit" | undefined;
1030
1064
  validationValue?: any;
1065
+ hint?: string | undefined;
1031
1066
  hideDetails?: boolean | "auto" | undefined;
1032
1067
  } & {
1033
1068
  $children?: {} | vue.VNodeChild | {
@@ -1055,7 +1090,7 @@ declare const VFileInput: {
1055
1090
  "v-slot:details"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
1056
1091
  } & {
1057
1092
  "onUpdate:modelValue"?: ((val: any) => any) | undefined;
1058
- } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules">;
1093
+ } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint">;
1059
1094
  $attrs: {
1060
1095
  [x: string]: unknown;
1061
1096
  };
@@ -1080,6 +1115,7 @@ declare const VFileInput: {
1080
1115
  errorMessages: string | string[];
1081
1116
  maxErrors: string | number;
1082
1117
  rules: ValidationRule[];
1118
+ persistentHint: boolean;
1083
1119
  } & {
1084
1120
  id?: string | undefined;
1085
1121
  name?: string | undefined;
@@ -1089,8 +1125,10 @@ declare const VFileInput: {
1089
1125
  appendIcon?: IconValue | undefined;
1090
1126
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
1091
1127
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
1128
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
1092
1129
  validateOn?: "input" | "blur" | "submit" | undefined;
1093
1130
  validationValue?: any;
1131
+ hint?: string | undefined;
1094
1132
  hideDetails?: boolean | "auto" | undefined;
1095
1133
  } & {
1096
1134
  $children?: {} | vue.VNodeChild | {
@@ -1135,6 +1173,7 @@ declare const VFileInput: {
1135
1173
  errorMessages: string | string[];
1136
1174
  maxErrors: string | number;
1137
1175
  rules: ValidationRule[];
1176
+ persistentHint: boolean;
1138
1177
  }, {}, string> & {
1139
1178
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
1140
1179
  created?: ((() => void) | (() => void)[]) | undefined;
@@ -1166,6 +1205,7 @@ declare const VFileInput: {
1166
1205
  errorMessages: string | string[];
1167
1206
  maxErrors: string | number;
1168
1207
  rules: ValidationRule[];
1208
+ persistentHint: boolean;
1169
1209
  } & {
1170
1210
  id?: string | undefined;
1171
1211
  name?: string | undefined;
@@ -1175,8 +1215,10 @@ declare const VFileInput: {
1175
1215
  appendIcon?: IconValue | undefined;
1176
1216
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
1177
1217
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
1218
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
1178
1219
  validateOn?: "input" | "blur" | "submit" | undefined;
1179
1220
  validationValue?: any;
1221
+ hint?: string | undefined;
1180
1222
  hideDetails?: boolean | "auto" | undefined;
1181
1223
  } & {
1182
1224
  $children?: {} | vue.VNodeChild | {
@@ -1208,9 +1250,10 @@ declare const VFileInput: {
1208
1250
  reset: () => void;
1209
1251
  resetValidation: () => void;
1210
1252
  validate: () => Promise<string[]>;
1211
- }> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "validateOn" | "validationValue" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules") | "v-slot:details">, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1253
+ }> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "onUpdate:focused" | "validateOn" | "validationValue" | "hint" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint") | "v-slot:details">, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1212
1254
  'click:control': (e: MouseEvent) => true;
1213
1255
  'mousedown:control': (e: MouseEvent) => true;
1256
+ 'update:focused': (focused: boolean) => true;
1214
1257
  'update:modelValue': (files: File[]) => true;
1215
1258
  }, string, {
1216
1259
  flat: boolean;
@@ -1233,11 +1276,11 @@ declare const VFileInput: {
1233
1276
  errorMessages: string | string[];
1234
1277
  maxErrors: string | number;
1235
1278
  rules: ValidationRule[];
1279
+ persistentHint: boolean;
1236
1280
  clearable: boolean;
1237
1281
  dirty: boolean;
1238
1282
  persistentClear: boolean;
1239
1283
  singleLine: boolean;
1240
- persistentHint: boolean;
1241
1284
  chips: boolean;
1242
1285
  counterSizeString: string;
1243
1286
  counterString: string;
@@ -1284,6 +1327,7 @@ declare const VFileInput: {
1284
1327
  validator: (val: any) => boolean;
1285
1328
  };
1286
1329
  focused: BooleanConstructor;
1330
+ 'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
1287
1331
  errorMessages: {
1288
1332
  type: PropType<string | string[]>;
1289
1333
  default: () => never[];
@@ -1312,6 +1356,8 @@ declare const VFileInput: {
1312
1356
  default: NonNullable<IconValue>;
1313
1357
  };
1314
1358
  hideDetails: PropType<boolean | "auto">;
1359
+ hint: StringConstructor;
1360
+ persistentHint: BooleanConstructor;
1315
1361
  messages: {
1316
1362
  type: PropType<string | string[]>;
1317
1363
  default: () => never[];
@@ -1334,8 +1380,6 @@ declare const VFileInput: {
1334
1380
  default: string;
1335
1381
  };
1336
1382
  multiple: BooleanConstructor;
1337
- hint: StringConstructor;
1338
- persistentHint: BooleanConstructor;
1339
1383
  showSize: {
1340
1384
  type: PropType<boolean | 1024 | 1000>;
1341
1385
  default: boolean;
@@ -1383,6 +1427,7 @@ declare const VFileInput: {
1383
1427
  validator: (val: any) => boolean;
1384
1428
  };
1385
1429
  focused: BooleanConstructor;
1430
+ 'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
1386
1431
  errorMessages: {
1387
1432
  type: PropType<string | string[]>;
1388
1433
  default: () => never[];
@@ -1411,6 +1456,8 @@ declare const VFileInput: {
1411
1456
  default: NonNullable<IconValue>;
1412
1457
  };
1413
1458
  hideDetails: PropType<boolean | "auto">;
1459
+ hint: StringConstructor;
1460
+ persistentHint: BooleanConstructor;
1414
1461
  messages: {
1415
1462
  type: PropType<string | string[]>;
1416
1463
  default: () => never[];
@@ -1433,8 +1480,6 @@ declare const VFileInput: {
1433
1480
  default: string;
1434
1481
  };
1435
1482
  multiple: BooleanConstructor;
1436
- hint: StringConstructor;
1437
- persistentHint: BooleanConstructor;
1438
1483
  showSize: {
1439
1484
  type: PropType<boolean | 1024 | 1000>;
1440
1485
  default: boolean;
@@ -8,13 +8,15 @@ import { IconValue } from "../../composables/icons.mjs";
8
8
  import { makeDensityProps, useDensity } from "../../composables/density.mjs";
9
9
  import { makeValidationProps, useValidation } from "../../composables/validation.mjs"; // Utilities
10
10
  import { computed } from 'vue';
11
- import { EventProp, genericComponent, getUid, isOn, pick, propsFactory, useRender } from "../../util/index.mjs"; // Types
11
+ import { EventProp, genericComponent, getUid, propsFactory, useRender } from "../../util/index.mjs"; // Types
12
12
  import { useInputIcon } from "./InputIcon.mjs";
13
13
  export const makeVInputProps = propsFactory({
14
14
  id: String,
15
15
  appendIcon: IconValue,
16
16
  prependIcon: IconValue,
17
17
  hideDetails: [Boolean, String],
18
+ hint: String,
19
+ persistentHint: Boolean,
18
20
  messages: {
19
21
  type: [Array, String],
20
22
  default: () => []
@@ -78,10 +80,19 @@ export const VInput = genericComponent()({
78
80
  resetValidation,
79
81
  validate
80
82
  }));
83
+ const messages = computed(() => {
84
+ if (errorMessages.value.length > 0) {
85
+ return errorMessages.value;
86
+ } else if (props.hint && (props.persistentHint || props.focused)) {
87
+ return props.hint;
88
+ } else {
89
+ return props.messages;
90
+ }
91
+ });
81
92
  useRender(() => {
82
93
  const hasPrepend = !!(slots.prepend || props.prependIcon);
83
94
  const hasAppend = !!(slots.append || props.appendIcon);
84
- const hasMessages = !!(props.messages?.length || errorMessages.value.length);
95
+ const hasMessages = messages.value.length > 0;
85
96
  const hasDetails = !props.hideDetails || props.hideDetails === 'auto' && (hasMessages || !!slots.details);
86
97
  return _createVNode("div", {
87
98
  "class": ['v-input', `v-input--${props.direction}`, densityClasses.value, validationClasses.value]
@@ -104,7 +115,7 @@ export const VInput = genericComponent()({
104
115
  }, [_createVNode(VMessages, {
105
116
  "id": messagesId.value,
106
117
  "active": hasMessages,
107
- "messages": errorMessages.value.length > 0 ? errorMessages.value : props.messages
118
+ "messages": messages.value
108
119
  }, {
109
120
  message: slots.message
110
121
  }), slots.details?.(slotProps.value)])]);
@@ -116,8 +127,4 @@ export const VInput = genericComponent()({
116
127
  };
117
128
  }
118
129
  });
119
- export function filterInputProps(props) {
120
- const keys = Object.keys(VInput.props).filter(k => !isOn(k));
121
- return pick(props, keys);
122
- }
123
130
  //# sourceMappingURL=VInput.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VInput.mjs","names":["VMessages","IconValue","makeDensityProps","useDensity","makeValidationProps","useValidation","computed","EventProp","genericComponent","getUid","isOn","pick","propsFactory","useRender","useInputIcon","makeVInputProps","id","String","appendIcon","prependIcon","hideDetails","Boolean","messages","type","Array","default","direction","validator","v","includes","VInput","name","props","emits","val","setup","_ref","attrs","slots","emit","densityClasses","InputIcon","uid","messagesId","value","errorMessages","isDirty","isDisabled","isReadonly","isPristine","isValid","isValidating","reset","resetValidation","validate","validationClasses","slotProps","hasPrepend","prepend","hasAppend","append","hasMessages","length","hasDetails","details","_createVNode","message","filterInputProps","keys","Object","filter","k"],"sources":["../../../src/components/VInput/VInput.tsx"],"sourcesContent":["// Styles\nimport './VInput.sass'\n\n// Components\nimport { VMessages } from '@/components/VMessages'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeValidationProps, useValidation } from '@/composables/validation'\n\n// Utilities\nimport { computed } from 'vue'\nimport { EventProp, genericComponent, getUid, isOn, pick, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref } from 'vue'\nimport type { MakeSlots } from '@/util'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\nexport interface VInputSlot {\n id: ComputedRef<string>\n messagesId: ComputedRef<string>\n isDirty: ComputedRef<boolean>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isPristine: Ref<boolean>\n isValid: ComputedRef<boolean | null>\n isValidating: Ref<boolean>\n reset: () => void\n resetValidation: () => void\n validate: () => void\n}\n\nexport const makeVInputProps = propsFactory({\n id: String,\n appendIcon: IconValue,\n prependIcon: IconValue,\n hideDetails: [Boolean, String] as PropType<boolean | 'auto'>,\n messages: {\n type: [Array, String] as PropType<string | string[]>,\n default: () => ([]),\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n validator: (v: any) => ['horizontal', 'vertical'].includes(v),\n },\n\n 'onClick:prepend': EventProp<[MouseEvent]>(),\n 'onClick:append': EventProp<[MouseEvent]>(),\n\n ...makeDensityProps(),\n ...makeValidationProps(),\n}, 'v-input')\n\nexport type VInputSlots = MakeSlots<{\n default: [VInputSlot]\n prepend: [VInputSlot]\n append: [VInputSlot]\n details: [VInputSlot]\n}>\n\nexport const VInput = genericComponent<VInputSlots>()({\n name: 'VInput',\n\n props: {\n ...makeVInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: any) => true,\n },\n\n setup (props, { attrs, slots, emit }) {\n const { densityClasses } = useDensity(props)\n const { InputIcon } = useInputIcon(props)\n\n const uid = getUid()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n } = useValidation(props, 'v-input', id)\n\n const slotProps = computed<VInputSlot>(() => ({\n id,\n messagesId,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n }))\n\n useRender(() => {\n const hasPrepend = !!(slots.prepend || props.prependIcon)\n const hasAppend = !!(slots.append || props.appendIcon)\n const hasMessages = !!(\n props.messages?.length ||\n errorMessages.value.length\n )\n const hasDetails = !props.hideDetails || (\n props.hideDetails === 'auto' &&\n (hasMessages || !!slots.details)\n )\n\n return (\n <div class={[\n 'v-input',\n `v-input--${props.direction}`,\n densityClasses.value,\n validationClasses.value,\n ]}\n >\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-input__prepend\">\n { slots.prepend?.(slotProps.value) }\n\n { props.prependIcon && (\n <InputIcon\n key=\"prepend-icon\"\n name=\"prepend\"\n />\n )}\n </div>\n )}\n\n { slots.default && (\n <div class=\"v-input__control\">\n { slots.default?.(slotProps.value) }\n </div>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-input__append\">\n { props.appendIcon && (\n <InputIcon\n key=\"append-icon\"\n name=\"append\"\n />\n )}\n\n { slots.append?.(slotProps.value) }\n </div>\n )}\n\n { hasDetails && (\n <div class=\"v-input__details\">\n <VMessages\n id={ messagesId.value }\n active={ hasMessages }\n messages={ errorMessages.value.length > 0\n ? errorMessages.value\n : props.messages\n }\n v-slots={{ message: slots.message }}\n />\n\n { slots.details?.(slotProps.value) }\n </div>\n )}\n </div>\n )\n })\n\n return {\n reset,\n resetValidation,\n validate,\n }\n },\n})\n\nexport type VInput = InstanceType<typeof VInput>\n\nexport function filterInputProps (props: Record<string, unknown>) {\n const keys = Object.keys(VInput.props).filter(k => !isOn(k))\n return pick(props, keys)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,SAAS,kCAElB;AAAA,SACSC,SAAS;AAAA,SACTC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,mBAAmB,EAAEC,aAAa,4CAE3C;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,SAAS,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEjF;AAAA,SAGSC,YAAY;AAgBrB,OAAO,MAAMC,eAAe,GAAGH,YAAY,CAAC;EAC1CI,EAAE,EAAEC,MAAM;EACVC,UAAU,EAAEjB,SAAS;EACrBkB,WAAW,EAAElB,SAAS;EACtBmB,WAAW,EAAE,CAACC,OAAO,EAAEJ,MAAM,CAA+B;EAC5DK,QAAQ,EAAE;IACRC,IAAI,EAAE,CAACC,KAAK,EAAEP,MAAM,CAAgC;IACpDQ,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDC,SAAS,EAAE;IACTH,IAAI,EAAEN,MAA6C;IACnDQ,OAAO,EAAE,YAAY;IACrBE,SAAS,EAAGC,CAAM,IAAK,CAAC,YAAY,EAAE,UAAU,CAAC,CAACC,QAAQ,CAACD,CAAC;EAC9D,CAAC;EAED,iBAAiB,EAAErB,SAAS,EAAgB;EAC5C,gBAAgB,EAAEA,SAAS,EAAgB;EAE3C,GAAGL,gBAAgB,EAAE;EACrB,GAAGE,mBAAmB;AACxB,CAAC,EAAE,SAAS,C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AAM,GAAG,CAAC,GACrCjB,aAAa,CAACD,KAAK,GACnBZ,KAAK,CAACV;MAAQ,GAET;QAAE4C,OAAO,EAAE5B,KAAK,CAAC4B;MAAQ,CAAC,GAGnC5B,KAAK,CAAC0B,OAAO,GAAGR,SAAS,CAACZ,KAAK,CAAC,EAErC;IAGP,CAAC,CAAC;IAEF,OAAO;MACLQ,KAAK;MACLC,eAAe;MACfC;IACF,CAAC;EACH;AACF,CAAC,CAAC;AAIF,OAAO,SAASa,gBAAgBA,CAAEnC,KAA8B,EAAE;EAChE,MAAMoC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACtC,MAAM,CAACE,KAAK,CAAC,CAACsC,MAAM,CAACC,CAAC,IAAI,CAAC7D,IAAI,CAAC6D,CAAC,CAAC,CAAC;EAC5D,OAAO5D,IAAI,CAACqB,KAAK,EAAEoC,IAAI,CAAC;AAC1B"}
1
+ {"version":3,"file":"VInput.mjs","names":["VMessages","IconValue","makeDensityProps","useDensity","makeValidationProps","useValidation","computed","EventProp","genericComponent","getUid","propsFactory","useRender","useInputIcon","makeVInputProps","id","String","appendIcon","prependIcon","hideDetails","Boolean","hint","persistentHint","messages","type","Array","default","direction","validator","v","includes","VInput","name","props","emits","val","setup","_ref","attrs","slots","emit","densityClasses","InputIcon","uid","messagesId","value","errorMessages","isDirty","isDisabled","isReadonly","isPristine","isValid","isValidating","reset","resetValidation","validate","validationClasses","slotProps","length","focused","hasPrepend","prepend","hasAppend","append","hasMessages","hasDetails","details","_createVNode","message"],"sources":["../../../src/components/VInput/VInput.tsx"],"sourcesContent":["// Styles\nimport './VInput.sass'\n\n// Components\nimport { VMessages } from '@/components/VMessages'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeValidationProps, useValidation } from '@/composables/validation'\n\n// Utilities\nimport { computed } from 'vue'\nimport { EventProp, genericComponent, getUid, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref } from 'vue'\nimport type { MakeSlots } from '@/util'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\nexport interface VInputSlot {\n id: ComputedRef<string>\n messagesId: ComputedRef<string>\n isDirty: ComputedRef<boolean>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isPristine: Ref<boolean>\n isValid: ComputedRef<boolean | null>\n isValidating: Ref<boolean>\n reset: () => void\n resetValidation: () => void\n validate: () => void\n}\n\nexport const makeVInputProps = propsFactory({\n id: String,\n appendIcon: IconValue,\n prependIcon: IconValue,\n hideDetails: [Boolean, String] as PropType<boolean | 'auto'>,\n hint: String,\n persistentHint: Boolean,\n messages: {\n type: [Array, String] as PropType<string | string[]>,\n default: () => ([]),\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n validator: (v: any) => ['horizontal', 'vertical'].includes(v),\n },\n\n 'onClick:prepend': EventProp<[MouseEvent]>(),\n 'onClick:append': EventProp<[MouseEvent]>(),\n\n ...makeDensityProps(),\n ...makeValidationProps(),\n}, 'v-input')\n\nexport type VInputSlots = MakeSlots<{\n default: [VInputSlot]\n prepend: [VInputSlot]\n append: [VInputSlot]\n details: [VInputSlot]\n}>\n\nexport const VInput = genericComponent<VInputSlots>()({\n name: 'VInput',\n\n props: {\n ...makeVInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: any) => true,\n },\n\n setup (props, { attrs, slots, emit }) {\n const { densityClasses } = useDensity(props)\n const { InputIcon } = useInputIcon(props)\n\n const uid = getUid()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n } = useValidation(props, 'v-input', id)\n\n const slotProps = computed<VInputSlot>(() => ({\n id,\n messagesId,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n }))\n\n const messages = computed(() => {\n if (errorMessages.value.length > 0) {\n return errorMessages.value\n } else if (props.hint && (props.persistentHint || props.focused)) {\n return props.hint\n } else {\n return props.messages\n }\n })\n\n useRender(() => {\n const hasPrepend = !!(slots.prepend || props.prependIcon)\n const hasAppend = !!(slots.append || props.appendIcon)\n const hasMessages = messages.value.length > 0\n const hasDetails = !props.hideDetails || (\n props.hideDetails === 'auto' &&\n (hasMessages || !!slots.details)\n )\n\n return (\n <div class={[\n 'v-input',\n `v-input--${props.direction}`,\n densityClasses.value,\n validationClasses.value,\n ]}\n >\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-input__prepend\">\n { slots.prepend?.(slotProps.value) }\n\n { props.prependIcon && (\n <InputIcon\n key=\"prepend-icon\"\n name=\"prepend\"\n />\n )}\n </div>\n )}\n\n { slots.default && (\n <div class=\"v-input__control\">\n { slots.default?.(slotProps.value) }\n </div>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-input__append\">\n { props.appendIcon && (\n <InputIcon\n key=\"append-icon\"\n name=\"append\"\n />\n )}\n\n { slots.append?.(slotProps.value) }\n </div>\n )}\n\n { hasDetails && (\n <div class=\"v-input__details\">\n <VMessages\n id={ messagesId.value }\n active={ hasMessages }\n messages={ messages.value }\n v-slots={{ message: slots.message }}\n />\n\n { slots.details?.(slotProps.value) }\n </div>\n )}\n </div>\n )\n })\n\n return {\n reset,\n resetValidation,\n validate,\n }\n },\n})\n\nexport type VInput = InstanceType<typeof VInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,SAAS,kCAElB;AAAA,SACSC,SAAS;AAAA,SACTC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,mBAAmB,EAAEC,aAAa,4CAE3C;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,SAAS,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,SAAS,gCAErE;AAAA,SAGSC,YAAY;AAgBrB,OAAO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