@volverjs/ui-vue 0.0.10-beta.14 → 0.0.10-beta.16

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 (154) hide show
  1. package/README.md +96 -2
  2. package/auto-imports.d.ts +2 -0
  3. package/dist/components/VvAccordion/VvAccordion.es.js +33 -9
  4. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  5. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +9 -2
  6. package/dist/components/VvAccordion/index.d.ts +4 -1
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +33 -9
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +9 -2
  10. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  11. package/dist/components/VvAction/VvAction.es.js +29 -8
  12. package/dist/components/VvAction/VvAction.umd.js +1 -1
  13. package/dist/components/VvAction/VvAction.vue.d.ts +44 -10
  14. package/dist/components/VvAction/index.d.ts +21 -5
  15. package/dist/components/VvAlert/VvAlert.es.js +91 -107
  16. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  17. package/dist/components/VvAlert/VvAlert.vue.d.ts +14 -4
  18. package/dist/components/VvAlert/index.d.ts +7 -3
  19. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +91 -107
  20. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  21. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -2
  22. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  23. package/dist/components/VvAvatar/VvAvatar.es.js +33 -9
  24. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  25. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +11 -3
  26. package/dist/components/VvAvatar/index.d.ts +4 -1
  27. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +33 -9
  28. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  29. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +9 -2
  30. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  31. package/dist/components/VvBadge/VvBadge.es.js +33 -9
  32. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  33. package/dist/components/VvBadge/VvBadge.vue.d.ts +11 -3
  34. package/dist/components/VvBadge/index.d.ts +4 -1
  35. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +33 -9
  36. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  37. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -3
  38. package/dist/components/VvBreadcrumb/index.d.ts +4 -1
  39. package/dist/components/VvButton/VvButton.es.js +100 -119
  40. package/dist/components/VvButton/VvButton.umd.js +1 -1
  41. package/dist/components/VvButton/VvButton.vue.d.ts +78 -20
  42. package/dist/components/VvButton/index.d.ts +34 -12
  43. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -9
  44. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  45. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +17 -4
  46. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  47. package/dist/components/VvCard/VvCard.es.js +33 -9
  48. package/dist/components/VvCard/VvCard.umd.js +1 -1
  49. package/dist/components/VvCard/VvCard.vue.d.ts +11 -3
  50. package/dist/components/VvCard/index.d.ts +4 -1
  51. package/dist/components/VvCheckbox/VvCheckbox.es.js +56 -17
  52. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  53. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +94 -22
  54. package/dist/components/VvCheckbox/index.d.ts +44 -11
  55. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +64 -19
  56. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  57. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +93 -22
  58. package/dist/components/VvCheckboxGroup/index.d.ts +44 -11
  59. package/dist/components/VvCombobox/VvCombobox.es.js +108 -165
  60. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  61. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +97 -24
  62. package/dist/components/VvCombobox/index.d.ts +42 -11
  63. package/dist/components/VvDialog/VvDialog.es.js +51 -103
  64. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  65. package/dist/components/VvDropdown/VvDropdown.es.js +33 -9
  66. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  67. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +14 -2
  68. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -12
  69. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +11 -3
  70. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +25 -6
  71. package/dist/components/VvDropdown/index.d.ts +6 -1
  72. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +33 -9
  73. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  74. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +29 -8
  75. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  76. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +37 -10
  77. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  78. package/dist/components/VvIcon/VvIcon.es.js +22 -95
  79. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  80. package/dist/components/VvIcon/VvIcon.vue.d.ts +81 -44
  81. package/dist/components/VvIcon/index.d.ts +21 -48
  82. package/dist/components/VvInputFile/VvInputFile.es.js +108 -124
  83. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  84. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +52 -12
  85. package/dist/components/VvInputFile/index.d.ts +24 -6
  86. package/dist/components/VvInputText/VvInputText.es.js +115 -147
  87. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  88. package/dist/components/VvInputText/VvInputText.vue.d.ts +141 -34
  89. package/dist/components/VvInputText/index.d.ts +71 -26
  90. package/dist/components/VvNav/VvNav.es.js +33 -9
  91. package/dist/components/VvNav/VvNav.umd.js +1 -1
  92. package/dist/components/VvNav/VvNav.vue.d.ts +9 -2
  93. package/dist/components/VvNav/index.d.ts +4 -1
  94. package/dist/components/VvNavItem/VvNavItem.es.js +29 -8
  95. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  96. package/dist/components/VvProgress/VvProgress.es.js +33 -9
  97. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  98. package/dist/components/VvProgress/VvProgress.vue.d.ts +9 -2
  99. package/dist/components/VvProgress/index.d.ts +4 -1
  100. package/dist/components/VvRadio/VvRadio.es.js +56 -17
  101. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  102. package/dist/components/VvRadio/VvRadio.vue.d.ts +94 -22
  103. package/dist/components/VvRadio/index.d.ts +44 -11
  104. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +64 -19
  105. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  106. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +93 -22
  107. package/dist/components/VvRadioGroup/index.d.ts +44 -11
  108. package/dist/components/VvSelect/VvSelect.es.js +95 -138
  109. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  110. package/dist/components/VvSelect/VvSelect.vue.d.ts +97 -24
  111. package/dist/components/VvSelect/index.d.ts +46 -12
  112. package/dist/components/VvTab/VvTab.es.js +33 -9
  113. package/dist/components/VvTab/VvTab.umd.js +1 -1
  114. package/dist/components/VvTab/VvTab.vue.d.ts +9 -2
  115. package/dist/components/VvTab/index.d.ts +4 -1
  116. package/dist/components/VvTextarea/VvTextarea.es.js +109 -143
  117. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  118. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +141 -34
  119. package/dist/components/VvTextarea/index.d.ts +66 -17
  120. package/dist/components/VvTooltip/VvTooltip.es.js +33 -9
  121. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  122. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +9 -2
  123. package/dist/components/VvTooltip/index.d.ts +4 -1
  124. package/dist/components/index.es.js +179 -233
  125. package/dist/components/index.umd.js +1 -1
  126. package/dist/composables/useComponentIcon.d.ts +9 -8
  127. package/dist/directives/index.es.js +33 -9
  128. package/dist/directives/index.umd.js +1 -1
  129. package/dist/directives/v-tooltip.es.js +33 -9
  130. package/dist/directives/v-tooltip.umd.js +1 -1
  131. package/dist/icons.es.js +3 -3
  132. package/dist/icons.umd.js +1 -1
  133. package/dist/props/index.d.ts +251 -61
  134. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +15 -4
  135. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +77 -22
  136. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  137. package/package.json +33 -33
  138. package/src/assets/icons/detailed.json +1 -1
  139. package/src/assets/icons/normal.json +1 -1
  140. package/src/assets/icons/simple.json +1 -1
  141. package/src/components/VvAlert/index.ts +1 -3
  142. package/src/components/VvAlertGroup/index.ts +2 -1
  143. package/src/components/VvButton/VvButton.vue +6 -6
  144. package/src/components/VvButton/index.ts +2 -4
  145. package/src/components/VvCombobox/VvCombobox.vue +5 -8
  146. package/src/components/VvIcon/VvIcon.vue +2 -2
  147. package/src/components/VvIcon/index.ts +22 -48
  148. package/src/components/VvInputFile/VvInputFile.vue +1 -1
  149. package/src/components/VvInputText/VvInputText.vue +11 -12
  150. package/src/components/VvSelect/VvSelect.vue +5 -8
  151. package/src/components/VvTextarea/VvTextarea.vue +5 -8
  152. package/src/composables/useComponentIcon.ts +15 -14
  153. package/src/props/index.ts +89 -25
  154. package/src/stories/Icon/Icon.settings.ts +3 -3
@@ -1,101 +1,11 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, isRef, h, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, Fragment, renderList, vModelSelect, createVNode, createSlots, withCtx } from "vue";
1
+ import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, isRef, h, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, Fragment, renderList, vModelSelect, createVNode, createSlots, withCtx } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { uid } from "uid";
4
4
  import { useFocus, useElementVisibility } from "@vueuse/core";
5
5
  import { get } from "ts-dot-prop";
6
- const VvIconProps = {
7
- /**
8
- * Color
9
- */
10
- color: String,
11
- /**
12
- * Width
13
- */
14
- width: {
15
- type: [String, Number]
16
- },
17
- /**
18
- * Height
19
- */
20
- height: {
21
- type: [String, Number]
22
- },
23
- /**
24
- * Icon name
25
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
26
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
27
- */
28
- name: {
29
- type: String,
30
- required: true
31
- },
32
- /**
33
- * By default 'vv'
34
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
35
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
36
- */
37
- provider: {
38
- type: String
39
- },
40
- /**
41
- * The name of icon set.
42
- * Icon default options prefix: simple | normal | detailed
43
- */
44
- prefix: {
45
- type: String,
46
- default: "normal"
47
- },
48
- /**
49
- * Url remote SVG icon
50
- */
51
- src: String,
52
- /**
53
- * Horizontal flip
54
- */
55
- horizontalFlip: Boolean,
56
- /**
57
- * Vertical flip
58
- */
59
- verticalFlip: Boolean,
60
- /**
61
- * String alternative to "horizontalFlip" and "verticalFlip".
62
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
63
- */
64
- flip: String,
65
- /**
66
- * Icon render mode
67
- * 'style' = 'bg' or 'mask', depending on icon content
68
- * 'bg' = span with style using `background`
69
- * 'mask' = span with style using `mask`
70
- * 'svg' = svg
71
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
72
- */
73
- mode: String,
74
- /**
75
- * Toggles inline or block mode
76
- * Example https://docs.iconify.design/icon-components/vue/inline.html
77
- */
78
- inline: Boolean,
79
- /**
80
- * rotates icon
81
- * Example https://docs.iconify.design/icon-components/vue/transform.html
82
- */
83
- rotate: [Number, String],
84
- /**
85
- * A callback that is called when icon data has been loaded
86
- */
87
- onLoad: Function,
88
- /**
89
- * SVG icon string
90
- */
91
- svg: String,
92
- /**
93
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
94
- * @values string | string[]
95
- */
96
- modifiers: {
97
- type: [String, Array]
98
- }
6
+ const VvIconPropsDefaults = {
7
+ prefix: "normal"
8
+ /* normal */
99
9
  };
100
10
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
101
11
  Strategy2["absolute"] = "absolute";
@@ -177,7 +87,24 @@ const __default__$1 = {
177
87
  };
178
88
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
179
89
  ...__default__$1,
180
- props: VvIconProps,
90
+ props: mergeDefaults({
91
+ name: {},
92
+ color: {},
93
+ width: {},
94
+ height: {},
95
+ provider: {},
96
+ prefix: {},
97
+ src: {},
98
+ horizontalFlip: { type: Boolean },
99
+ verticalFlip: { type: Boolean },
100
+ flip: {},
101
+ mode: {},
102
+ inline: { type: Boolean },
103
+ rotate: {},
104
+ onLoad: { type: Function },
105
+ svg: {},
106
+ modifiers: {}
107
+ }, VvIconPropsDefaults),
181
108
  setup(__props) {
182
109
  const props = __props;
183
110
  const hasRotate = computed(() => {
@@ -409,6 +336,7 @@ const LinkProps = {
409
336
  */
410
337
  target: {
411
338
  type: String,
339
+ default: void 0,
412
340
  validator: (value) => Object.values(AnchorTarget).includes(value)
413
341
  },
414
342
  /**
@@ -423,27 +351,33 @@ const ValidProps = {
423
351
  /**
424
352
  * Valid status
425
353
  */
426
- valid: Boolean,
354
+ valid: { type: Boolean, default: false },
427
355
  /**
428
356
  * Valid label
429
357
  */
430
- validLabel: [String, Array]
358
+ validLabel: { type: [String, Array], default: void 0 }
431
359
  };
432
360
  const InvalidProps = {
433
361
  /**
434
362
  * Invalid status
435
363
  */
436
- invalid: Boolean,
364
+ invalid: {
365
+ type: Boolean,
366
+ default: false
367
+ },
437
368
  /**
438
369
  * Invalid label
439
370
  */
440
- invalidLabel: [String, Array]
371
+ invalidLabel: { type: [String, Array], default: void 0 }
441
372
  };
442
373
  const LoadingProps = {
443
374
  /**
444
375
  * Loading status
445
376
  */
446
- loading: Boolean,
377
+ loading: {
378
+ type: Boolean,
379
+ default: false
380
+ },
447
381
  /**
448
382
  * Loading label
449
383
  */
@@ -456,43 +390,64 @@ const DisabledProps = {
456
390
  /**
457
391
  * Whether the form control is disabled
458
392
  */
459
- disabled: Boolean
393
+ disabled: {
394
+ type: Boolean,
395
+ default: false
396
+ }
460
397
  };
461
398
  const ActiveProps = {
462
399
  /**
463
400
  * Whether the item is active
464
401
  */
465
- active: Boolean
402
+ active: {
403
+ type: Boolean,
404
+ default: false
405
+ }
466
406
  };
467
407
  const CurrentProps = {
468
408
  /**
469
409
  * Whether the item is current
470
410
  */
471
- current: Boolean
411
+ current: {
412
+ type: Boolean,
413
+ default: false
414
+ }
472
415
  };
473
416
  const PressedProps = {
474
417
  /**
475
418
  * Whether the item is pressed
476
419
  */
477
- pressed: Boolean
420
+ pressed: {
421
+ type: Boolean,
422
+ default: false
423
+ }
478
424
  };
479
425
  const LabelProps = {
480
426
  /**
481
427
  * The item label
482
428
  */
483
- label: [String, Number]
429
+ label: {
430
+ type: [String, Number],
431
+ default: void 0
432
+ }
484
433
  };
485
434
  const ReadonlyProps = {
486
435
  /**
487
436
  * The value is not editable
488
437
  */
489
- readonly: Boolean
438
+ readonly: {
439
+ type: Boolean,
440
+ default: false
441
+ }
490
442
  };
491
443
  const ModifiersProps = {
492
444
  /**
493
445
  * Component BEM modifiers
494
446
  */
495
- modifiers: [String, Array]
447
+ modifiers: {
448
+ type: [String, Array],
449
+ default: void 0
450
+ }
496
451
  };
497
452
  const HintProps = {
498
453
  hintLabel: { type: String, default: "" }
@@ -523,7 +478,10 @@ const IconProps = {
523
478
  * VvIcon name or props
524
479
  * @see VVIcon
525
480
  */
526
- icon: { type: [String, Object] },
481
+ icon: {
482
+ type: [String, Object],
483
+ default: void 0
484
+ },
527
485
  /**
528
486
  * VvIcon position
529
487
  */
@@ -544,7 +502,10 @@ const FloatingLabelProps = {
544
502
  /**
545
503
  * If true the label will be floating
546
504
  */
547
- floating: Boolean
505
+ floating: {
506
+ type: Boolean,
507
+ default: false
508
+ }
548
509
  };
549
510
  const UnselectableProps = {
550
511
  /**
@@ -580,7 +541,8 @@ const IdProps = {
580
541
  * Dropdown show / hide transition name
581
542
  */
582
543
  transitionName: {
583
- type: String
544
+ type: String,
545
+ default: void 0
584
546
  },
585
547
  /**
586
548
  * Offset of the dropdown from the trigger
@@ -648,7 +610,8 @@ const IdProps = {
648
610
  * Set dropdown width to the same as the trigger
649
611
  */
650
612
  triggerWidth: {
651
- type: Boolean
613
+ type: Boolean,
614
+ default: false
652
615
  }
653
616
  });
654
617
  const IdNameProps = {
@@ -665,7 +628,10 @@ const AutofocusProps = {
665
628
  * Global attribute autofocus
666
629
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
667
630
  */
668
- autofocus: Boolean
631
+ autofocus: {
632
+ type: Boolean,
633
+ default: false
634
+ }
669
635
  };
670
636
  const AutocompleteProps = {
671
637
  /**
@@ -817,30 +783,30 @@ function useComponentFocus(inputTemplateRef, emit) {
817
783
  };
818
784
  }
819
785
  function useComponentIcon(icon, iconPosition) {
786
+ const hasIcon = computed(() => {
787
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
788
+ return { name: icon == null ? void 0 : icon.value };
789
+ }
790
+ return icon == null ? void 0 : icon.value;
791
+ });
820
792
  const hasIconBefore = computed(
821
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
793
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
822
794
  );
823
795
  const hasIconAfter = computed(
824
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
796
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
825
797
  );
826
798
  const hasIconLeft = computed(
827
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
799
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
828
800
  );
829
801
  const hasIconRight = computed(
830
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
802
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
831
803
  );
832
804
  const hasIconTop = computed(
833
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
805
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
834
806
  );
835
807
  const hasIconBottom = computed(
836
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
808
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
837
809
  );
838
- const hasIcon = computed(() => {
839
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
840
- return { name: icon == null ? void 0 : icon.value };
841
- }
842
- return icon == null ? void 0 : icon.value;
843
- });
844
810
  return {
845
811
  hasIcon,
846
812
  hasIconLeft,
@@ -943,10 +909,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
943
909
  focused.value = true;
944
910
  }
945
911
  });
946
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
947
- icon,
948
- iconPosition
949
- );
912
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
950
913
  const isDirty = computed(() => !isEmpty(props.modelValue));
951
914
  const isDisabled = computed(() => props.disabled || props.readonly);
952
915
  const hasTabindex = computed(() => {
@@ -970,8 +933,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
970
933
  loading: loading.value,
971
934
  disabled: disabled.value,
972
935
  readonly: readonly.value,
973
- "icon-before": hasIconBefore.value,
974
- "icon-after": hasIconAfter.value,
936
+ "icon-before": hasIconBefore.value !== void 0,
937
+ "icon-after": hasIconAfter.value !== void 0,
975
938
  dirty: isDirty.value,
976
939
  focus: focused.value,
977
940
  floating: floating.value,
@@ -1037,10 +1000,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1037
1000
  createElementVNode("div", _hoisted_4, [
1038
1001
  unref(hasIconBefore) ? (openBlock(), createBlock(
1039
1002
  _sfc_main$1,
1040
- mergeProps({
1041
- key: 0,
1042
- class: "vv-select__icon"
1043
- }, unref(hasIcon)),
1003
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
1044
1004
  null,
1045
1005
  16
1046
1006
  /* FULL_PROPS */
@@ -1101,10 +1061,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1101
1061
  ]),
1102
1062
  unref(hasIconAfter) ? (openBlock(), createBlock(
1103
1063
  _sfc_main$1,
1104
- mergeProps({
1105
- key: 1,
1106
- class: "vv-select__icon vv-select__icon-after"
1107
- }, unref(hasIcon)),
1064
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
1108
1065
  null,
1109
1066
  16
1110
1067
  /* FULL_PROPS */
@@ -1 +1 @@
1
- !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@iconify/vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid","@vueuse/core","ts-dot-prop"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvSelect=l(e.vue,e.vue$1,e.uid,e.core,e.tsDotProp)}(this,(function(e,l,o,t,n){"use strict";const a={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var i=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(i||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),u=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(u||{}),d=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(d||{});const s=Symbol.for("volver");function c(){return e.inject(s)}function v(l,o,t){return e.computed((()=>{const n={[l]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(n[`${l}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((o=>{n[`${l}--${o}`]=e.unref(t.value[o])})),n}))}const p=e.defineComponent({name:"VvIcon",props:a,setup(o){const t=o,n=e.computed((()=>"string"==typeof t.rotate?parseFloat(t.rotate):t.rotate)),a=e.ref(!0),i=c(),{modifiers:r}=e.toRefs(t),u=v("vv-icon",r),d=e.computed((()=>t.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=t.name??"",o=`@${d.value}:${t.prefix}:${e}`;if(l.iconExists(o))return o;const n=null==i?void 0:i.iconsCollections.find((o=>{const t=`@${d.value}:${o.prefix}:${e}`;return l.iconExists(t)}));return n?`@${d.value}:${n.prefix}:${e}`:e}));function p(e){const o=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),n=(null==o?void 0:o.innerHTML.trim())||"";o&&n&&l.addIcon(`@${d.value}:${t.prefix}:${t.name}`,{body:n,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return i&&t.src&&!l.iconExists(`@${d.value}:${t.prefix}:${t.name}`)&&(a.value=!1,i.fetchIcon(t.src).then((e=>{e&&(p(e),a.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),t.svg&&p(t.svg),(o,t)=>e.unref(a)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:e.unref(n),color:o.color,onLoad:o.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function f(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const m={valid:Boolean,validLabel:[String,Array]},b={invalid:Boolean,invalidLabel:[String,Array]},g={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},h={disabled:Boolean},y=(Boolean,Boolean,Boolean,{label:[String,Number]}),S={readonly:Boolean},B={modifiers:[String,Array]},k={hintLabel:{type:String,default:""}},L={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},$={icon:{type:[String,Object]},iconPosition:{type:String,default:r.before,validation:e=>Object.values(r).includes(e)}},V={tabindex:{type:[String,Number],default:0}},O={floating:Boolean},w={unselectable:{type:Boolean,default:!0}},x={id:[String,Number]};i.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const E={...x,name:{type:String,required:!0}},P={autofocus:Boolean},N={autocomplete:{type:String,default:"off"}};u.button,d.button;const I={...E,...P,...N,...V,...m,...b,...k,...g,...h,...S,...B,...L,...$,...O,...w,...y,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};const A=["for"],_={class:"vv-select__wrapper"},j={key:0,class:"vv-select__input-before"},C={class:"vv-select__inner"},F=["id"],z=["disabled","hidden"],q=["disabled","value"],D=["disabled","label"],R=["disabled","value"],H={key:1,class:"vv-select__input-after"};return e.defineComponent({name:"VvSelect",props:I,emits:["update:modelValue","focus","blur"],setup(l,{emit:a}){const u=l,d=e.useSlots(),s=function(l,o,t){const n=c(),a=e.computed((()=>{var e;if(n&&(null==(e=n.defaults.value)?void 0:e[l]))return n.defaults.value[l]}));return e.computed((()=>{if(void 0===a.value)return t;const e=a.value,l=o,n=t;return Object.keys(l).reduce(((o,t)=>{const a=n[t];if(o[t]=a,t in e){if(Array.isArray(l[t])){const n=l[t];n.length&&n[0]===a&&(o[t]=e[t])}if("function"==typeof l[t]&&(0,l[t])()===a&&(o[t]=e[t]),"object"==typeof l[t]){let n=l[t].default;"function"==typeof n&&(n=n()),"object"==typeof n?JSON.stringify(n)===JSON.stringify(a)&&(o[t]=e[t]):n===a&&(o[t]=e[t])}}return o}),{})}))}("VvSelect",I,u),m=e.ref(),{HintSlot:b,hasHintLabelOrSlot:g,hasInvalidLabelOrSlot:h,hintSlotScope:y}=function(l,o){const t=e.computed((()=>e.isRef(l)?l.value:l)),n=e.computed((()=>f(t.value.invalidLabel))),a=e.computed((()=>f(t.value.validLabel))),i=e.computed((()=>t.value.loadingLabel)),r=e.computed((()=>t.value.hintLabel)),u=e.computed((()=>Boolean(t.value.loading&&(o.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(t.value.invalid&&(o.invalid||n.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(t.value.valid&&(o.valid||a.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(o.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),p=e.computed((()=>({modelValue:t.value.modelValue,valid:t.value.valid,invalid:t.value.invalid,loading:t.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:n,validLabel:a,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var l,o,t,n,a,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(l=this.$slots).loading)?void 0:o.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(n=(t=this.$slots).invalid)?void 0:n.call(t))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(a=this.$slots).valid)?void 0:i.call(a))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:m}}(s,d),{id:S,modifiers:B,disabled:k,readonly:L,loading:$,icon:V,iconPosition:O,invalid:w,valid:x,floating:E,multiple:P}=e.toRefs(u),N=(l=>e.computed((()=>String((null==l?void 0:l.value)||o.uid()))))(S),K=e.computed((()=>`${N.value}-hint`)),{focused:M}=function(l,o){const{focused:n}=t.useFocus(l);return e.watch(n,(t=>{o(t?"focus":"blur",e.unref(l))})),{focused:n}}(m,a),T=t.useElementVisibility(m);e.watch(T,(e=>{e&&u.autofocus&&(M.value=!0)}));const{hasIcon:J,hasIconBefore:G,hasIconAfter:U}=function(l,o){const t=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===r.before))),n=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===r.after))),a=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===i.left))),u=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===i.right))),d=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===i.top))),s=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===i.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),hasIconLeft:a,hasIconRight:u,hasIconTop:d,hasIconBottom:s,hasIconBefore:t,hasIconAfter:n}}(V,O),Q=e.computed((()=>{return l=u.modelValue,!(null==(o=e.unref(l))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length);var l,o})),W=e.computed((()=>u.disabled||u.readonly)),X=e.computed((()=>W.value?-1:u.tabindex)),Y=e.computed((()=>!0===u.invalid||!0!==u.valid&&void 0)),Z=v("vv-select",B,e.computed((()=>({valid:x.value,invalid:w.value,loading:$.value,disabled:k.value,readonly:L.value,"icon-before":G.value,"icon-after":U.value,dirty:Q.value,focus:M.value,floating:E.value,multiple:P.value})))),ee=e.computed((()=>({name:u.name,tabindex:X.value,disabled:W.value,required:u.required,size:u.size,autocomplete:u.autocomplete,multiple:u.multiple,"aria-invalid":Y.value,"aria-describedby":g.value?K.value:void 0,"aria-errormessage":h.value?K.value:void 0}))),le=e.computed((()=>({valid:u.valid,invalid:u.invalid,modelValue:u.modelValue}))),{getOptionLabel:oe,getOptionValue:te,isOptionDisabled:ne,getOptionGrouped:ae}=function(l){const{options:o,labelKey:t,valueKey:a,disabledKey:i}=e.toRefs(l);return{options:o,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof t.value?t.value(e):n.get(e,t.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof a.value?a.value(e):n.get(e,a.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):n.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(u),ie=e.computed({get:()=>u.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),a("update:modelValue",e)}}),re=e=>"string"!=typeof e&&(e&&e.options&&e.options.length>0);return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Z))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(N)},e.toDisplayString(l.label),9,A)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",_,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",C,[e.unref(G)?(e.openBlock(),e.createBlock(p,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(J)),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(N),ref_key:"select",ref:m,"onUpdate:modelValue":o[0]||(o[0]=l=>e.isRef(ie)?ie.value=l:null)},e.unref(ee)),[l.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!l.unselectable,hidden:!l.unselectable},e.toDisplayString(l.placeholder),9,z)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,((l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[re(l)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${o}`,disabled:e.unref(ne)(l),label:e.unref(oe)(l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae)(l),((l,t)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${o}-item-${t}`,disabled:e.unref(ne)(l),value:e.unref(te)(l)},e.toDisplayString(e.unref(oe)(l)),9,R)))),128))],8,D)):(e.openBlock(),e.createElementBlock("option",{key:o,disabled:e.unref(ne)(l),value:e.unref(te)(l)},e.toDisplayString(e.unref(oe)(l)),9,q))],64)))),256))],16,F),[[e.vModelSelect,e.unref(ie)]]),e.unref(U)?(e.openBlock(),e.createBlock(p,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(J)),null,16)):e.createCommentVNode("v-if",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(b),{id:e.unref(K),class:"vv-select__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
1
+ !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@iconify/vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid","@vueuse/core","ts-dot-prop"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvSelect=l(e.vue,e.vue$1,e.uid,e.core,e.tsDotProp)}(this,(function(e,l,t,o,a){"use strict";var n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{});const d=Symbol.for("volver");function s(){return e.inject(d)}function c(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const v=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},{prefix:"normal"}),setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=s(),{modifiers:r}=e.toRefs(o),u=c("vv-icon",r),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),v=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function f(e){const t=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(f(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&f(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(v)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function f(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const p={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},m={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},b={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},h={disabled:{type:Boolean,default:!1}},g=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),y={readonly:{type:Boolean,default:!1}},S={modifiers:{type:[String,Array],default:void 0}},B={hintLabel:{type:String,default:""}},k={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},L={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:i.before,validation:e=>Object.values(i).includes(e)}},$={tabindex:{type:[String,Number],default:0}},V={floating:{type:Boolean,default:!1}},O={unselectable:{type:Boolean,default:!0}},w={id:[String,Number]};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const x={...w,name:{type:String,required:!0}},E={autofocus:{type:Boolean,default:!1}},P={autocomplete:{type:String,default:"off"}};r.button,u.button;const I={...x,...E,...P,...$,...p,...m,...B,...b,...h,...y,...S,...k,...L,...V,...O,...g,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};const N=["for"],_={class:"vv-select__wrapper"},j={key:0,class:"vv-select__input-before"},A={class:"vv-select__inner"},C=["id"],F=["disabled","hidden"],z=["disabled","value"],D=["disabled","label"],R=["disabled","value"],q={key:1,class:"vv-select__input-after"};return e.defineComponent({name:"VvSelect",props:I,emits:["update:modelValue","focus","blur"],setup(l,{emit:r}){const u=l,d=e.useSlots(),p=function(l,t,o){const a=s(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvSelect",I,u),m=e.ref(),{HintSlot:b,hasHintLabelOrSlot:h,hasInvalidLabelOrSlot:g,hintSlotScope:y}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>f(o.value.invalidLabel))),n=e.computed((()=>f(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var l,t,o,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:m}}(p,d),{id:S,modifiers:B,disabled:k,readonly:L,loading:$,icon:V,iconPosition:O,invalid:w,valid:x,floating:E,multiple:P}=e.toRefs(u),H=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(S),K=e.computed((()=>`${H.value}-hint`)),{focused:M}=function(l,t){const{focused:a}=o.useFocus(l);return e.watch(a,(o=>{t(o?"focus":"blur",e.unref(l))})),{focused:a}}(m,r),T=o.useElementVisibility(m);e.watch(T,(e=>{e&&u.autofocus&&(M.value=!0)}));const{hasIconBefore:J,hasIconAfter:G}=function(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===i.before?o.value:void 0)),r=e.computed((()=>(null==t?void 0:t.value)===i.after?o.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===n.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===n.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===n.top?o.value:void 0)),c=e.computed((()=>(null==t?void 0:t.value)===n.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:u,hasIconRight:d,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:r}}(V,O),U=e.computed((()=>{return l=u.modelValue,!(null==(t=e.unref(l))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var l,t})),Q=e.computed((()=>u.disabled||u.readonly)),W=e.computed((()=>Q.value?-1:u.tabindex)),X=e.computed((()=>!0===u.invalid||!0!==u.valid&&void 0)),Y=c("vv-select",B,e.computed((()=>({valid:x.value,invalid:w.value,loading:$.value,disabled:k.value,readonly:L.value,"icon-before":void 0!==J.value,"icon-after":void 0!==G.value,dirty:U.value,focus:M.value,floating:E.value,multiple:P.value})))),Z=e.computed((()=>({name:u.name,tabindex:W.value,disabled:Q.value,required:u.required,size:u.size,autocomplete:u.autocomplete,multiple:u.multiple,"aria-invalid":X.value,"aria-describedby":h.value?K.value:void 0,"aria-errormessage":g.value?K.value:void 0}))),ee=e.computed((()=>({valid:u.valid,invalid:u.invalid,modelValue:u.modelValue}))),{getOptionLabel:le,getOptionValue:te,isOptionDisabled:oe,getOptionGrouped:ae}=function(l){const{options:t,labelKey:o,valueKey:n,disabledKey:i}=e.toRefs(l);return{options:t,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof o.value?o.value(e):a.get(e,o.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):a.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):a.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(u),ne=e.computed({get:()=>u.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),r("update:modelValue",e)}}),ie=e=>"string"!=typeof e&&(e&&e.options&&e.options.length>0);return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Y))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(H)},e.toDisplayString(l.label),9,N)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",_,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",A,[e.unref(J)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0},e.unref(J),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(H),ref_key:"select",ref:m,"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(ne)?ne.value=l:null)},e.unref(Z)),[l.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!l.unselectable,hidden:!l.unselectable},e.toDisplayString(l.placeholder),9,F)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,((l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[ie(l)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${t}`,disabled:e.unref(oe)(l),label:e.unref(le)(l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae)(l),((l,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${t}-item-${o}`,disabled:e.unref(oe)(l),value:e.unref(te)(l)},e.toDisplayString(e.unref(le)(l)),9,R)))),128))],8,D)):(e.openBlock(),e.createElementBlock("option",{key:t,disabled:e.unref(oe)(l),value:e.unref(te)(l)},e.toDisplayString(e.unref(le)(l)),9,z))],64)))),256))],16,C),[[e.vModelSelect,e.unref(ne)]]),e.unref(G)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:1},e.unref(G),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(b),{id:e.unref(K),class:"vv-select__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(y))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
@@ -8,14 +8,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
8
8
  default: undefined;
9
9
  };
10
10
  placeholder: StringConstructor;
11
- label: (StringConstructor | NumberConstructor)[];
11
+ label: {
12
+ type: (StringConstructor | NumberConstructor)[];
13
+ default: undefined;
14
+ };
12
15
  unselectable: {
13
16
  type: BooleanConstructor;
14
17
  default: boolean;
15
18
  };
16
- floating: BooleanConstructor;
19
+ floating: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
17
23
  icon: {
18
- type: (ObjectConstructor | StringConstructor)[];
24
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
25
+ default: undefined;
19
26
  };
20
27
  iconPosition: {
21
28
  type: globalThis.PropType<"before" | "after">;
@@ -38,10 +45,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
38
45
  type: (StringConstructor | FunctionConstructor)[];
39
46
  default: string;
40
47
  };
41
- modifiers: globalThis.PropType<string | string[]>;
42
- readonly: BooleanConstructor;
43
- disabled: BooleanConstructor;
44
- loading: BooleanConstructor;
48
+ modifiers: {
49
+ type: globalThis.PropType<string | string[]>;
50
+ default: undefined;
51
+ };
52
+ readonly: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ disabled: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ loading: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
45
64
  loadingLabel: {
46
65
  type: StringConstructor;
47
66
  default: string;
@@ -50,10 +69,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
50
69
  type: StringConstructor;
51
70
  default: string;
52
71
  };
53
- invalid: BooleanConstructor;
54
- invalidLabel: (ArrayConstructor | StringConstructor)[];
55
- valid: BooleanConstructor;
56
- validLabel: (ArrayConstructor | StringConstructor)[];
72
+ invalid: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ invalidLabel: {
77
+ type: (ArrayConstructor | StringConstructor)[];
78
+ default: undefined;
79
+ };
80
+ valid: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ validLabel: {
85
+ type: (ArrayConstructor | StringConstructor)[];
86
+ default: undefined;
87
+ };
57
88
  tabindex: {
58
89
  type: (StringConstructor | NumberConstructor)[];
59
90
  default: number;
@@ -62,7 +93,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
62
93
  type: StringConstructor;
63
94
  default: string;
64
95
  };
65
- autofocus: BooleanConstructor;
96
+ autofocus: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
66
100
  name: {
67
101
  type: StringConstructor;
68
102
  required: boolean;
@@ -79,14 +113,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
79
113
  default: undefined;
80
114
  };
81
115
  placeholder: StringConstructor;
82
- label: (StringConstructor | NumberConstructor)[];
116
+ label: {
117
+ type: (StringConstructor | NumberConstructor)[];
118
+ default: undefined;
119
+ };
83
120
  unselectable: {
84
121
  type: BooleanConstructor;
85
122
  default: boolean;
86
123
  };
87
- floating: BooleanConstructor;
124
+ floating: {
125
+ type: BooleanConstructor;
126
+ default: boolean;
127
+ };
88
128
  icon: {
89
- type: (ObjectConstructor | StringConstructor)[];
129
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
130
+ default: undefined;
90
131
  };
91
132
  iconPosition: {
92
133
  type: globalThis.PropType<"before" | "after">;
@@ -109,10 +150,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
109
150
  type: (StringConstructor | FunctionConstructor)[];
110
151
  default: string;
111
152
  };
112
- modifiers: globalThis.PropType<string | string[]>;
113
- readonly: BooleanConstructor;
114
- disabled: BooleanConstructor;
115
- loading: BooleanConstructor;
153
+ modifiers: {
154
+ type: globalThis.PropType<string | string[]>;
155
+ default: undefined;
156
+ };
157
+ readonly: {
158
+ type: BooleanConstructor;
159
+ default: boolean;
160
+ };
161
+ disabled: {
162
+ type: BooleanConstructor;
163
+ default: boolean;
164
+ };
165
+ loading: {
166
+ type: BooleanConstructor;
167
+ default: boolean;
168
+ };
116
169
  loadingLabel: {
117
170
  type: StringConstructor;
118
171
  default: string;
@@ -121,10 +174,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
121
174
  type: StringConstructor;
122
175
  default: string;
123
176
  };
124
- invalid: BooleanConstructor;
125
- invalidLabel: (ArrayConstructor | StringConstructor)[];
126
- valid: BooleanConstructor;
127
- validLabel: (ArrayConstructor | StringConstructor)[];
177
+ invalid: {
178
+ type: BooleanConstructor;
179
+ default: boolean;
180
+ };
181
+ invalidLabel: {
182
+ type: (ArrayConstructor | StringConstructor)[];
183
+ default: undefined;
184
+ };
185
+ valid: {
186
+ type: BooleanConstructor;
187
+ default: boolean;
188
+ };
189
+ validLabel: {
190
+ type: (ArrayConstructor | StringConstructor)[];
191
+ default: undefined;
192
+ };
128
193
  tabindex: {
129
194
  type: (StringConstructor | NumberConstructor)[];
130
195
  default: number;
@@ -133,7 +198,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
133
198
  type: StringConstructor;
134
199
  default: string;
135
200
  };
136
- autofocus: BooleanConstructor;
201
+ autofocus: {
202
+ type: BooleanConstructor;
203
+ default: boolean;
204
+ };
137
205
  name: {
138
206
  type: StringConstructor;
139
207
  required: boolean;
@@ -147,13 +215,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
147
215
  modelValue: string | number | boolean | unknown[] | Record<string, any>;
148
216
  multiple: boolean;
149
217
  unselectable: boolean;
218
+ modifiers: string | string[];
150
219
  floating: boolean;
151
220
  options: (string | Option)[];
221
+ label: string | number;
152
222
  required: boolean;
223
+ icon: string | import("../VvIcon").VvIconProps;
153
224
  iconPosition: "before" | "after";
154
225
  loading: boolean;
155
226
  loadingLabel: string;
156
227
  hintLabel: string;
228
+ invalidLabel: string | unknown[];
229
+ validLabel: string | unknown[];
157
230
  tabindex: string | number;
158
231
  labelKey: string | Function;
159
232
  valueKey: string | Function;