@volverjs/ui-vue 0.0.10-beta.15 → 0.0.10-beta.17

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 +146 -140
  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 +217 -249
  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 +33 -10
  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,4 +1,4 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
1
+ import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
4
  import { uid } from "uid";
@@ -97,6 +97,7 @@ const LinkProps = {
97
97
  */
98
98
  target: {
99
99
  type: String,
100
+ default: void 0,
100
101
  validator: (value) => Object.values(AnchorTarget).includes(value)
101
102
  },
102
103
  /**
@@ -111,27 +112,33 @@ const ValidProps = {
111
112
  /**
112
113
  * Valid status
113
114
  */
114
- valid: Boolean,
115
+ valid: { type: Boolean, default: false },
115
116
  /**
116
117
  * Valid label
117
118
  */
118
- validLabel: [String, Array]
119
+ validLabel: { type: [String, Array], default: void 0 }
119
120
  };
120
121
  const InvalidProps = {
121
122
  /**
122
123
  * Invalid status
123
124
  */
124
- invalid: Boolean,
125
+ invalid: {
126
+ type: Boolean,
127
+ default: false
128
+ },
125
129
  /**
126
130
  * Invalid label
127
131
  */
128
- invalidLabel: [String, Array]
132
+ invalidLabel: { type: [String, Array], default: void 0 }
129
133
  };
130
134
  const LoadingProps = {
131
135
  /**
132
136
  * Loading status
133
137
  */
134
- loading: Boolean,
138
+ loading: {
139
+ type: Boolean,
140
+ default: false
141
+ },
135
142
  /**
136
143
  * Loading label
137
144
  */
@@ -144,49 +151,73 @@ const DisabledProps = {
144
151
  /**
145
152
  * Whether the form control is disabled
146
153
  */
147
- disabled: Boolean
154
+ disabled: {
155
+ type: Boolean,
156
+ default: false
157
+ }
148
158
  };
149
159
  const SelectedProps = {
150
160
  /**
151
161
  * Whether the item is selected
152
162
  */
153
- selected: Boolean
163
+ selected: {
164
+ type: Boolean,
165
+ default: false
166
+ }
154
167
  };
155
168
  const ActiveProps = {
156
169
  /**
157
170
  * Whether the item is active
158
171
  */
159
- active: Boolean
172
+ active: {
173
+ type: Boolean,
174
+ default: false
175
+ }
160
176
  };
161
177
  const CurrentProps = {
162
178
  /**
163
179
  * Whether the item is current
164
180
  */
165
- current: Boolean
181
+ current: {
182
+ type: Boolean,
183
+ default: false
184
+ }
166
185
  };
167
186
  const PressedProps = {
168
187
  /**
169
188
  * Whether the item is pressed
170
189
  */
171
- pressed: Boolean
190
+ pressed: {
191
+ type: Boolean,
192
+ default: false
193
+ }
172
194
  };
173
195
  const LabelProps = {
174
196
  /**
175
197
  * The item label
176
198
  */
177
- label: [String, Number]
199
+ label: {
200
+ type: [String, Number],
201
+ default: void 0
202
+ }
178
203
  };
179
204
  const ReadonlyProps = {
180
205
  /**
181
206
  * The value is not editable
182
207
  */
183
- readonly: Boolean
208
+ readonly: {
209
+ type: Boolean,
210
+ default: false
211
+ }
184
212
  };
185
213
  const ModifiersProps = {
186
214
  /**
187
215
  * Component BEM modifiers
188
216
  */
189
- modifiers: [String, Array]
217
+ modifiers: {
218
+ type: [String, Array],
219
+ default: void 0
220
+ }
190
221
  };
191
222
  const HintProps = {
192
223
  hintLabel: { type: String, default: "" }
@@ -217,7 +248,10 @@ const IconProps = {
217
248
  * VvIcon name or props
218
249
  * @see VVIcon
219
250
  */
220
- icon: { type: [String, Object] },
251
+ icon: {
252
+ type: [String, Object],
253
+ default: void 0
254
+ },
221
255
  /**
222
256
  * VvIcon position
223
257
  */
@@ -238,7 +272,10 @@ const FloatingLabelProps = {
238
272
  /**
239
273
  * If true the label will be floating
240
274
  */
241
- floating: Boolean
275
+ floating: {
276
+ type: Boolean,
277
+ default: false
278
+ }
242
279
  };
243
280
  const UnselectableProps = {
244
281
  /**
@@ -274,7 +311,8 @@ const DropdownProps = {
274
311
  * Dropdown show / hide transition name
275
312
  */
276
313
  transitionName: {
277
- type: String
314
+ type: String,
315
+ default: void 0
278
316
  },
279
317
  /**
280
318
  * Offset of the dropdown from the trigger
@@ -342,7 +380,8 @@ const DropdownProps = {
342
380
  * Set dropdown width to the same as the trigger
343
381
  */
344
382
  triggerWidth: {
345
- type: Boolean
383
+ type: Boolean,
384
+ default: false
346
385
  }
347
386
  };
348
387
  const IdNameProps = {
@@ -359,7 +398,10 @@ const AutofocusProps = {
359
398
  * Global attribute autofocus
360
399
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
361
400
  */
362
- autofocus: Boolean
401
+ autofocus: {
402
+ type: Boolean,
403
+ default: false
404
+ }
363
405
  };
364
406
  const AutocompleteProps = {
365
407
  /**
@@ -551,99 +593,9 @@ const VvComboboxProps = {
551
593
  default: false
552
594
  }
553
595
  };
554
- const VvIconProps = {
555
- /**
556
- * Color
557
- */
558
- color: String,
559
- /**
560
- * Width
561
- */
562
- width: {
563
- type: [String, Number]
564
- },
565
- /**
566
- * Height
567
- */
568
- height: {
569
- type: [String, Number]
570
- },
571
- /**
572
- * Icon name
573
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
574
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
575
- */
576
- name: {
577
- type: String,
578
- required: true
579
- },
580
- /**
581
- * By default 'vv'
582
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
583
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
584
- */
585
- provider: {
586
- type: String
587
- },
588
- /**
589
- * The name of icon set.
590
- * Icon default options prefix: simple | normal | detailed
591
- */
592
- prefix: {
593
- type: String,
594
- default: "normal"
595
- },
596
- /**
597
- * Url remote SVG icon
598
- */
599
- src: String,
600
- /**
601
- * Horizontal flip
602
- */
603
- horizontalFlip: Boolean,
604
- /**
605
- * Vertical flip
606
- */
607
- verticalFlip: Boolean,
608
- /**
609
- * String alternative to "horizontalFlip" and "verticalFlip".
610
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
611
- */
612
- flip: String,
613
- /**
614
- * Icon render mode
615
- * 'style' = 'bg' or 'mask', depending on icon content
616
- * 'bg' = span with style using `background`
617
- * 'mask' = span with style using `mask`
618
- * 'svg' = svg
619
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
620
- */
621
- mode: String,
622
- /**
623
- * Toggles inline or block mode
624
- * Example https://docs.iconify.design/icon-components/vue/inline.html
625
- */
626
- inline: Boolean,
627
- /**
628
- * rotates icon
629
- * Example https://docs.iconify.design/icon-components/vue/transform.html
630
- */
631
- rotate: [Number, String],
632
- /**
633
- * A callback that is called when icon data has been loaded
634
- */
635
- onLoad: Function,
636
- /**
637
- * SVG icon string
638
- */
639
- svg: String,
640
- /**
641
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
642
- * @values string | string[]
643
- */
644
- modifiers: {
645
- type: [String, Array]
646
- }
596
+ const VvIconPropsDefaults = {
597
+ prefix: "normal"
598
+ /* normal */
647
599
  };
648
600
  function useVolver() {
649
601
  return inject(INJECTION_KEY_VOLVER);
@@ -676,7 +628,24 @@ const __default__$9 = {
676
628
  };
677
629
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
678
630
  ...__default__$9,
679
- props: VvIconProps,
631
+ props: mergeDefaults({
632
+ name: {},
633
+ color: {},
634
+ width: {},
635
+ height: {},
636
+ provider: {},
637
+ prefix: {},
638
+ src: {},
639
+ horizontalFlip: { type: Boolean },
640
+ verticalFlip: { type: Boolean },
641
+ flip: {},
642
+ mode: {},
643
+ inline: { type: Boolean },
644
+ rotate: {},
645
+ onLoad: { type: Function },
646
+ svg: {},
647
+ modifiers: {}
648
+ }, VvIconPropsDefaults),
680
649
  setup(__props) {
681
650
  const props = __props;
682
651
  const hasRotate = computed(() => {
@@ -1744,30 +1713,30 @@ function useComponentFocus(inputTemplateRef, emit) {
1744
1713
  };
1745
1714
  }
1746
1715
  function useComponentIcon(icon, iconPosition) {
1716
+ const hasIcon = computed(() => {
1717
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
1718
+ return { name: icon == null ? void 0 : icon.value };
1719
+ }
1720
+ return icon == null ? void 0 : icon.value;
1721
+ });
1747
1722
  const hasIconBefore = computed(
1748
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
1723
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1749
1724
  );
1750
1725
  const hasIconAfter = computed(
1751
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
1726
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1752
1727
  );
1753
1728
  const hasIconLeft = computed(
1754
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
1729
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1755
1730
  );
1756
1731
  const hasIconRight = computed(
1757
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
1732
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1758
1733
  );
1759
1734
  const hasIconTop = computed(
1760
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
1735
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1761
1736
  );
1762
1737
  const hasIconBottom = computed(
1763
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
1738
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1764
1739
  );
1765
- const hasIcon = computed(() => {
1766
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
1767
- return { name: icon == null ? void 0 : icon.value };
1768
- }
1769
- return icon == null ? void 0 : icon.value;
1770
- });
1771
1740
  return {
1772
1741
  hasIcon,
1773
1742
  hasIconLeft,
@@ -1870,10 +1839,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1870
1839
  focused.value = true;
1871
1840
  }
1872
1841
  });
1873
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
1874
- icon,
1875
- iconPosition
1876
- );
1842
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
1877
1843
  const isDirty = computed(() => !isEmpty(props.modelValue));
1878
1844
  const isDisabled = computed(() => props.disabled || props.readonly);
1879
1845
  const hasTabindex = computed(() => {
@@ -1897,8 +1863,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1897
1863
  loading: loading.value,
1898
1864
  disabled: disabled.value,
1899
1865
  readonly: readonly.value,
1900
- "icon-before": hasIconBefore.value,
1901
- "icon-after": hasIconAfter.value,
1866
+ "icon-before": hasIconBefore.value !== void 0,
1867
+ "icon-after": hasIconAfter.value !== void 0,
1902
1868
  dirty: isDirty.value,
1903
1869
  focus: focused.value,
1904
1870
  floating: floating.value,
@@ -1964,10 +1930,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1964
1930
  createElementVNode("div", _hoisted_4$1, [
1965
1931
  unref(hasIconBefore) ? (openBlock(), createBlock(
1966
1932
  _sfc_main$9,
1967
- mergeProps({
1968
- key: 0,
1969
- class: "vv-select__icon"
1970
- }, unref(hasIcon)),
1933
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
1971
1934
  null,
1972
1935
  16
1973
1936
  /* FULL_PROPS */
@@ -2028,10 +1991,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2028
1991
  ]),
2029
1992
  unref(hasIconAfter) ? (openBlock(), createBlock(
2030
1993
  _sfc_main$9,
2031
- mergeProps({
2032
- key: 1,
2033
- class: "vv-select__icon vv-select__icon-after"
2034
- }, unref(hasIcon)),
1994
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
2035
1995
  null,
2036
1996
  16
2037
1997
  /* FULL_PROPS */
@@ -2280,10 +2240,7 @@ const VvButtonProps = {
2280
2240
  ...ModifiersProps,
2281
2241
  ...UnselectableProps,
2282
2242
  ...LoadingProps,
2283
- /**
2284
- * Button icon
2285
- */
2286
- icon: [String, Object],
2243
+ ...IconProps,
2287
2244
  /**
2288
2245
  * Button icon position
2289
2246
  */
@@ -2439,9 +2396,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2439
2396
  )
2440
2397
  }))
2441
2398
  );
2442
- const hasIconProps = computed(
2443
- () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
2444
- );
2399
+ const { hasIcon } = useComponentIcon(icon);
2445
2400
  const toggleValue = computed(() => {
2446
2401
  return props.value !== void 0 ? props.value : name.value;
2447
2402
  });
@@ -2504,12 +2459,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2504
2459
  { key: 1 },
2505
2460
  [
2506
2461
  renderSlot(_ctx.$slots, "before"),
2507
- unref(icon) ? (openBlock(), createBlock(
2462
+ unref(hasIcon) ? (openBlock(), createBlock(
2508
2463
  _sfc_main$9,
2509
- mergeProps({
2510
- key: 0,
2511
- class: "vv-button__icon"
2512
- }, unref(hasIconProps)),
2464
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
2513
2465
  null,
2514
2466
  16
2515
2467
  /* FULL_PROPS */
@@ -2668,10 +2620,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2668
2620
  const localLoading = ref(false);
2669
2621
  const isLoading = computed(() => localLoading.value || loading.value);
2670
2622
  const dropdownEl = ref();
2671
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
2672
- icon,
2673
- iconPosition
2674
- );
2623
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
2675
2624
  const isDirty = computed(() => !isEmpty(props.modelValue));
2676
2625
  const hasTabindex = computed(() => {
2677
2626
  return disabled.value || readonly.value ? -1 : props.tabindex;
@@ -2683,8 +2632,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2683
2632
  disabled: disabled.value,
2684
2633
  loading: isLoading.value,
2685
2634
  readonly: readonly.value,
2686
- "icon-before": Boolean(hasIconBefore.value),
2687
- "icon-after": Boolean(hasIconAfter.value),
2635
+ "icon-before": hasIconBefore.value !== void 0,
2636
+ "icon-after": hasIconAfter.value !== void 0,
2688
2637
  valid: valid.value,
2689
2638
  invalid: invalid.value,
2690
2639
  dirty: isDirty.value,
@@ -2873,10 +2822,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2873
2822
  createElementVNode("div", _hoisted_5, [
2874
2823
  unref(hasIconBefore) ? (openBlock(), createBlock(
2875
2824
  _sfc_main$9,
2876
- mergeProps({
2877
- key: 0,
2878
- class: "vv-select__icon"
2879
- }, unref(hasIcon)),
2825
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
2880
2826
  null,
2881
2827
  16
2882
2828
  /* FULL_PROPS */
@@ -2956,10 +2902,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2956
2902
  ], 16, _hoisted_6),
2957
2903
  unref(hasIconAfter) ? (openBlock(), createBlock(
2958
2904
  _sfc_main$9,
2959
- mergeProps({
2960
- key: 1,
2961
- class: "vv-select__icon vv-select__icon-after"
2962
- }, unref(hasIcon)),
2905
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
2963
2906
  null,
2964
2907
  16
2965
2908
  /* FULL_PROPS */