@volverjs/ui-vue 0.0.10-beta.47 → 0.0.10-beta.49

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 (357) hide show
  1. package/README.md +2 -2
  2. package/auto-imports.d.ts +19 -11
  3. package/bin/icons.js +1 -0
  4. package/dist/components/VvAccordion/VvAccordion.es.js +4 -5
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -11
  7. package/dist/components/VvAccordion/index.d.ts +2 -2
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +45 -46
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +11 -13
  11. package/dist/components/VvAccordionGroup/index.d.ts +2 -2
  12. package/dist/components/VvAction/VvAction.vue.d.ts +8 -10
  13. package/dist/components/VvAction/index.d.ts +1 -1
  14. package/dist/components/VvAlert/VvAlert.es.js +158 -161
  15. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  16. package/dist/components/VvAlert/VvAlert.vue.d.ts +20 -22
  17. package/dist/components/VvAlert/index.d.ts +1 -1
  18. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +271 -274
  19. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  20. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -11
  21. package/dist/components/VvAlertGroup/index.d.ts +2 -2
  22. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +6 -6
  23. package/dist/components/VvAvatar/index.d.ts +1 -1
  24. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +21 -22
  25. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  26. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
  27. package/dist/components/VvAvatarGroup/index.d.ts +1 -1
  28. package/dist/components/VvBadge/VvBadge.vue.d.ts +6 -6
  29. package/dist/components/VvBadge/index.d.ts +1 -1
  30. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +23 -23
  31. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  32. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +19 -19
  33. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  34. package/dist/components/VvButton/VvButton.es.js +313 -314
  35. package/dist/components/VvButton/VvButton.umd.js +1 -1
  36. package/dist/components/VvButton/VvButton.vue.d.ts +14 -16
  37. package/dist/components/VvButton/index.d.ts +9 -9
  38. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -2
  39. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -8
  40. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  41. package/dist/components/VvCard/VvCard.vue.d.ts +6 -6
  42. package/dist/components/VvCard/index.d.ts +1 -1
  43. package/dist/components/VvCheckbox/VvCheckbox.es.js +186 -187
  44. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  45. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +11 -13
  46. package/dist/components/VvCheckbox/index.d.ts +7 -7
  47. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -191
  48. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  49. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +11 -13
  50. package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
  51. package/dist/components/VvCombobox/VvCombobox.es.js +1864 -1865
  52. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  53. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +72 -291
  54. package/dist/components/VvCombobox/index.d.ts +1 -1
  55. package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -9
  56. package/dist/components/VvDialog/index.d.ts +1 -1
  57. package/dist/components/VvDropdown/VvDropdown.es.js +9 -10
  58. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  59. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +51 -51
  60. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +22 -16
  61. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +4 -4
  62. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +4 -4
  63. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +6 -6
  64. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -2
  65. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +2 -2
  66. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +2 -2
  67. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -23
  68. package/dist/components/VvInputFile/VvInputFile.es.js +651 -652
  69. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  70. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
  71. package/dist/components/VvInputFile/index.d.ts +4 -4
  72. package/dist/components/VvInputText/VvInputClearAction.d.ts +10 -6
  73. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +11 -7
  74. package/dist/components/VvInputText/VvInputStepAction.d.ts +10 -6
  75. package/dist/components/VvInputText/VvInputText.es.js +715 -716
  76. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  77. package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -32
  78. package/dist/components/VvInputText/index.d.ts +1 -1
  79. package/dist/components/VvNav/VvNav.es.js +5 -5
  80. package/dist/components/VvNav/VvNav.umd.js +1 -1
  81. package/dist/components/VvNav/VvNav.vue.d.ts +8 -10
  82. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  83. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  84. package/dist/components/VvNav/index.d.ts +2 -2
  85. package/dist/components/VvProgress/VvProgress.vue.d.ts +6 -6
  86. package/dist/components/VvProgress/index.d.ts +1 -1
  87. package/dist/components/VvRadio/VvRadio.es.js +186 -187
  88. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  89. package/dist/components/VvRadio/VvRadio.vue.d.ts +10 -12
  90. package/dist/components/VvRadio/index.d.ts +5 -5
  91. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -191
  92. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  93. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +11 -13
  94. package/dist/components/VvRadioGroup/index.d.ts +2 -2
  95. package/dist/components/VvSelect/VvSelect.es.js +337 -338
  96. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  97. package/dist/components/VvSelect/VvSelect.vue.d.ts +20 -131
  98. package/dist/components/VvSelect/index.d.ts +7 -7
  99. package/dist/components/VvTab/VvTab.es.js +18 -18
  100. package/dist/components/VvTab/VvTab.umd.js +1 -1
  101. package/dist/components/VvTab/VvTab.vue.d.ts +6 -8
  102. package/dist/components/VvTab/index.d.ts +1 -1
  103. package/dist/components/VvTextarea/VvTextarea.es.js +292 -293
  104. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  105. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +14 -16
  106. package/dist/components/VvTextarea/index.d.ts +3 -3
  107. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +8 -8
  108. package/dist/components/common/HintSlot.d.ts +6 -6
  109. package/dist/components/index.d.ts +1 -1
  110. package/dist/components/index.es.js +2760 -2763
  111. package/dist/components/index.umd.js +1 -1
  112. package/dist/composables/alert/useAlert.d.ts +4 -4
  113. package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
  114. package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
  115. package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -6
  116. package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
  117. package/dist/composables/group/{useInjectedGroupState.d.ts → useGroupStateInject.d.ts} +1 -1
  118. package/dist/composables/group/{useProvideGroupState.d.ts → useGroupStateProvide.d.ts} +2 -2
  119. package/dist/composables/index.d.ts +2 -0
  120. package/dist/composables/index.es.js +87 -3
  121. package/dist/composables/index.umd.js +1 -1
  122. package/dist/composables/useComponentFocus.d.ts +1 -1
  123. package/dist/composables/useOptions.d.ts +1 -1
  124. package/dist/composables/usePersistence.d.ts +1 -1
  125. package/dist/composables/useUniqueId.d.ts +1 -1
  126. package/dist/constants.d.ts +3 -3
  127. package/dist/directives/index.d.ts +2 -2
  128. package/dist/directives/index.es.js +145 -39
  129. package/dist/directives/index.umd.js +1 -1
  130. package/dist/directives/v-contextmenu.es.js +137 -31
  131. package/dist/directives/v-contextmenu.umd.js +1 -1
  132. package/dist/icons.d.ts +17 -17
  133. package/dist/icons.es.js +424 -424
  134. package/dist/icons.umd.js +1 -1
  135. package/dist/index.d.ts +1 -1
  136. package/dist/index.umd.js +1 -1
  137. package/dist/props/index.d.ts +4 -4
  138. package/dist/resolvers/unplugin.umd.js +1 -1
  139. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +178 -474
  140. package/dist/stories/Alert/Alert.settings.d.ts +1 -1
  141. package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
  142. package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
  143. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
  144. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
  145. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  146. package/dist/stories/Button/Button.settings.d.ts +1 -1
  147. package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
  148. package/dist/stories/Nav/Nav.settings.d.ts +1 -1
  149. package/dist/stories/Tab/Tab.settings.d.ts +1 -1
  150. package/dist/types/floating-ui.d.ts +1 -1
  151. package/dist/types/group.d.ts +1 -1
  152. package/dist/types/index.d.ts +2 -2
  153. package/dist/utils/DomUtilities.d.ts +1 -0
  154. package/package.json +43 -43
  155. package/src/Volver.ts +3 -3
  156. package/src/assets/icons/detailed.json +1 -1
  157. package/src/assets/icons/normal.json +1 -1
  158. package/src/assets/icons/simple.json +1 -1
  159. package/src/components/VvAccordion/VvAccordion.vue +5 -5
  160. package/src/components/VvAccordion/index.ts +2 -2
  161. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +5 -5
  162. package/src/components/VvAction/VvAction.vue +1 -1
  163. package/src/components/VvAlert/VvAlert.vue +1 -1
  164. package/src/components/VvAlert/index.ts +1 -1
  165. package/src/components/VvAlertGroup/VvAlertGroup.vue +1 -1
  166. package/src/components/VvAlertGroup/index.ts +3 -3
  167. package/src/components/VvAvatarGroup/VvAvatarGroup.vue +1 -1
  168. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +2 -2
  169. package/src/components/VvBreadcrumb/index.ts +1 -1
  170. package/src/components/VvButton/VvButton.vue +3 -3
  171. package/src/components/VvButton/index.ts +4 -4
  172. package/src/components/VvButtonGroup/VvButtonGroup.vue +3 -3
  173. package/src/components/VvCheckbox/VvCheckbox.vue +2 -2
  174. package/src/components/VvCheckbox/index.ts +2 -2
  175. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +2 -2
  176. package/src/components/VvCombobox/VvCombobox.vue +9 -9
  177. package/src/components/VvCombobox/index.ts +15 -15
  178. package/src/components/VvDropdown/VvDropdown.vue +19 -19
  179. package/src/components/VvDropdown/VvDropdownAction.vue +1 -1
  180. package/src/components/VvDropdown/VvDropdownItem.vue +1 -1
  181. package/src/components/VvDropdown/VvDropdownOption.vue +1 -1
  182. package/src/components/VvDropdown/index.ts +2 -2
  183. package/src/components/VvIcon/VvIcon.vue +2 -2
  184. package/src/components/VvInputFile/VvInputFile.vue +7 -7
  185. package/src/components/VvInputFile/index.ts +7 -7
  186. package/src/components/VvInputText/VvInputPasswordAction.ts +1 -1
  187. package/src/components/VvInputText/VvInputText.vue +19 -19
  188. package/src/components/VvInputText/VvInputTextActions.ts +4 -4
  189. package/src/components/VvInputText/index.ts +2 -2
  190. package/src/components/VvNav/VvNav.vue +1 -1
  191. package/src/components/VvRadio/VvRadio.vue +1 -1
  192. package/src/components/VvRadio/index.ts +2 -2
  193. package/src/components/VvRadioGroup/VvRadioGroup.vue +2 -2
  194. package/src/components/VvSelect/VvSelect.vue +6 -6
  195. package/src/components/VvSelect/index.ts +12 -12
  196. package/src/components/VvTab/VvTab.vue +2 -2
  197. package/src/components/VvTab/index.ts +1 -1
  198. package/src/components/VvTextarea/VvTextarea.vue +1 -1
  199. package/src/components/common/HintSlot.ts +14 -14
  200. package/src/components/index.ts +1 -1
  201. package/src/composables/alert/useAlert.ts +2 -2
  202. package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +2 -2
  203. package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
  204. package/src/composables/dropdown/{useProvideDropdown.ts → useDropdownProvide.ts} +9 -9
  205. package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
  206. package/src/composables/group/{useInjectedGroupState.ts → useGroupStateInject.ts} +2 -2
  207. package/src/composables/group/{useProvideGroupState.ts → useGroupStateProvide.ts} +2 -2
  208. package/src/composables/index.ts +2 -0
  209. package/src/composables/useBlurhash.ts +2 -2
  210. package/src/composables/useOptions.ts +1 -1
  211. package/src/composables/usePersistence.ts +1 -1
  212. package/src/composables/useTextCount.ts +2 -2
  213. package/src/composables/useUniqueId.ts +2 -3
  214. package/src/constants.ts +5 -5
  215. package/src/directives/index.ts +2 -2
  216. package/src/directives/v-contextmenu.ts +21 -29
  217. package/src/directives/v-tooltip.ts +2 -2
  218. package/src/icons.ts +2 -2
  219. package/src/index.ts +1 -1
  220. package/src/props/index.ts +7 -7
  221. package/src/resolvers/unplugin.ts +5 -5
  222. package/src/stories/Accordion/Accordion.stories.ts +2 -2
  223. package/src/stories/Accordion/Accordion.test.ts +1 -1
  224. package/src/stories/Accordion/AccordionSlots.stories.ts +2 -2
  225. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +2 -2
  226. package/src/stories/AccordionGroup/AccordionGroup.test.ts +1 -1
  227. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +3 -3
  228. package/src/stories/Alert/Alert.settings.ts +1 -1
  229. package/src/stories/Alert/Alert.stories.ts +2 -2
  230. package/src/stories/Alert/Alert.test.ts +1 -1
  231. package/src/stories/Alert/AlertModifiers.stories.ts +2 -2
  232. package/src/stories/Alert/AlertSlots.stories.ts +2 -2
  233. package/src/stories/AlertGroup/AlertGroup.stories.ts +2 -2
  234. package/src/stories/AlertGroup/AlertGroup.test.ts +3 -3
  235. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +2 -2
  236. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +2 -2
  237. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  238. package/src/stories/Avatar/Avatar.stories.ts +2 -2
  239. package/src/stories/Avatar/Avatar.test.ts +1 -1
  240. package/src/stories/Avatar/AvatarBadge.stories.ts +1 -1
  241. package/src/stories/Avatar/AvatarModifiers.stories.ts +2 -2
  242. package/src/stories/Avatar/AvatarSlots.stories.ts +2 -2
  243. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +2 -2
  244. package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
  245. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +2 -2
  246. package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +3 -3
  247. package/src/stories/Badge/Badge.stories.ts +2 -2
  248. package/src/stories/Badge/Badge.test.ts +1 -1
  249. package/src/stories/Badge/BadgeSlots.stories.ts +2 -2
  250. package/src/stories/Blurhash/BlurhashComposable.stories.ts +37 -117
  251. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +2 -2
  252. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +5 -5
  253. package/src/stories/Button/Button.settings.ts +3 -3
  254. package/src/stories/Button/Button.stories.ts +2 -2
  255. package/src/stories/Button/Button.test.ts +1 -1
  256. package/src/stories/Button/ButtonIcon.stories.ts +2 -2
  257. package/src/stories/Button/ButtonLink.stories.ts +2 -2
  258. package/src/stories/Button/ButtonLoading.stories.ts +2 -2
  259. package/src/stories/Button/ButtonModifiers.stories.ts +2 -2
  260. package/src/stories/Button/ButtonSlots.stories.ts +3 -3
  261. package/src/stories/Button/ButtonState.stories.ts +2 -2
  262. package/src/stories/Button/ButtonToggle.stories.ts +2 -2
  263. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +2 -2
  264. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +2 -2
  265. package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
  266. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +2 -2
  267. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +2 -2
  268. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +2 -2
  269. package/src/stories/Card/Card.stories.ts +2 -2
  270. package/src/stories/Card/Card.test.ts +1 -1
  271. package/src/stories/Card/CardSlots.stories.ts +2 -2
  272. package/src/stories/Checkbox/Checkbox.stories.ts +2 -2
  273. package/src/stories/Checkbox/Checkbox.test.ts +1 -1
  274. package/src/stories/Checkbox/CheckboxBinary.stories.ts +2 -2
  275. package/src/stories/Checkbox/CheckboxSlots.stories.ts +2 -2
  276. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +2 -2
  277. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -2
  278. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +2 -2
  279. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +3 -3
  280. package/src/stories/Combobox/Combobox.settings.ts +9 -9
  281. package/src/stories/Combobox/Combobox.stories.ts +2 -2
  282. package/src/stories/Combobox/Combobox.test.ts +2 -2
  283. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +2 -2
  284. package/src/stories/Combobox/ComboboxMultiple.stories.ts +2 -2
  285. package/src/stories/Combobox/ComboboxOptions.stories.ts +2 -2
  286. package/src/stories/Combobox/ComboboxSlots.stories.ts +3 -3
  287. package/src/stories/Dialog/Dialog.stories.ts +2 -2
  288. package/src/stories/Dialog/Dialog.test.ts +1 -1
  289. package/src/stories/Dialog/DialogModifiers.stories.ts +2 -2
  290. package/src/stories/Dialog/DialogSlots.stories.ts +2 -2
  291. package/src/stories/Dropdown/Dropdown.settings.ts +1 -1
  292. package/src/stories/Dropdown/Dropdown.stories.ts +4 -4
  293. package/src/stories/Dropdown/Dropdown.test.ts +1 -1
  294. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +3 -4
  295. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +4 -4
  296. package/src/stories/Dropdown/DropdownSlots.stories.ts +4 -4
  297. package/src/stories/Icon/Icon.settings.ts +1 -1
  298. package/src/stories/Icon/Icon.stories.ts +2 -2
  299. package/src/stories/Icon/IconsCollection.stories.ts +3 -3
  300. package/src/stories/InputFile/InputFile.settings.ts +1 -1
  301. package/src/stories/InputFile/InputFile.stories.ts +1 -1
  302. package/src/stories/InputFile/InputFileDropArea.stories.ts +2 -2
  303. package/src/stories/InputFile/InputFileIconPosition.stories.ts +2 -2
  304. package/src/stories/InputFile/InputFileSlots.stories.ts +2 -2
  305. package/src/stories/InputText/InputText.settings.ts +2 -2
  306. package/src/stories/InputText/InputText.stories.ts +2 -2
  307. package/src/stories/InputText/InputText.test.ts +2 -2
  308. package/src/stories/InputText/InputTextIconPosition.stories.ts +2 -2
  309. package/src/stories/InputText/InputTextLength.stories.ts +2 -2
  310. package/src/stories/InputText/InputTextMask.stories.ts +2 -2
  311. package/src/stories/InputText/InputTextMinMax.stories.ts +2 -2
  312. package/src/stories/InputText/InputTextSlots.stories.ts +2 -2
  313. package/src/stories/InputText/InputTextType.stories.ts +2 -2
  314. package/src/stories/Nav/Nav.settings.ts +1 -1
  315. package/src/stories/Nav/Nav.stories.ts +2 -2
  316. package/src/stories/Nav/Nav.test.ts +1 -1
  317. package/src/stories/Nav/NavModifiers.stories.ts +2 -2
  318. package/src/stories/Progress/Progress.stories.ts +2 -2
  319. package/src/stories/Progress/Progress.test.ts +2 -2
  320. package/src/stories/Radio/Radio.stories.ts +2 -2
  321. package/src/stories/Radio/Radio.test.ts +1 -1
  322. package/src/stories/Radio/RadioSlots.stories.ts +2 -2
  323. package/src/stories/RadioGroup/RadioGroup.stories.ts +2 -2
  324. package/src/stories/RadioGroup/RadioGroup.test.ts +2 -2
  325. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +2 -2
  326. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +3 -3
  327. package/src/stories/Select/Select.settings.ts +10 -10
  328. package/src/stories/Select/Select.stories.ts +2 -2
  329. package/src/stories/Select/Select.test.ts +1 -1
  330. package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
  331. package/src/stories/Select/SelectOptions.stories.ts +2 -2
  332. package/src/stories/Select/SelectSlots.stories.ts +2 -2
  333. package/src/stories/Tab/Tab.settings.ts +1 -1
  334. package/src/stories/Tab/Tab.stories.ts +1 -1
  335. package/src/stories/Tab/Tab.test.ts +1 -1
  336. package/src/stories/Textarea/Textarea.settings.ts +1 -1
  337. package/src/stories/Textarea/Textarea.stories.ts +2 -2
  338. package/src/stories/Textarea/Textarea.test.ts +1 -1
  339. package/src/stories/Textarea/TextareaLength.stories.ts +2 -2
  340. package/src/stories/Textarea/TextareaSlots.stories.ts +2 -2
  341. package/src/stories/Textarea/TextareatIconPosition.stories.ts +2 -2
  342. package/src/stories/Tooltip/Tooltip.stories.ts +3 -3
  343. package/src/stories/Tooltip/Tooltip.test.ts +1 -1
  344. package/src/stories/Tooltip/TooltipDirective.stories.ts +3 -3
  345. package/src/test/expect.ts +3 -3
  346. package/src/test/types.d.ts +2 -2
  347. package/src/types/floating-ui.ts +1 -1
  348. package/src/types/group.ts +1 -1
  349. package/src/types/index.ts +2 -2
  350. package/src/utils/DomUtilities.ts +15 -0
  351. package/src/utils/ObjectUtilities.ts +4 -4
  352. package/src/workers/blurhash.ts +1 -1
  353. package/dist/composables/alert/{useInjectAlert.d.ts → useAlerInject.d.ts} +0 -0
  354. package/dist/composables/dropdown/{useInjectDropdown.d.ts → useDropdownInject.d.ts} +0 -0
  355. package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
  356. package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +0 -0
  357. package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +1 -1
@@ -1,10 +1,5 @@
1
- import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, getCurrentInstance, watch, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, toRef, useAttrs, useSlots, createElementBlock, Fragment } from "vue";
1
+ import { inject, computed, toRef, toRefs, defineComponent, getCurrentInstance, ref, watch, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, mergeDefaults, createCommentVNode, useId, useAttrs, useSlots, createElementBlock, Fragment } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
- import { uid } from "uid";
4
- const VvIconPropsDefaults = {
5
- prefix: "normal"
6
- /* normal */
7
- };
8
3
  var StorageType = /* @__PURE__ */ ((StorageType2) => {
9
4
  StorageType2["local"] = "local";
10
5
  StorageType2["session"] = "session";
@@ -61,145 +56,6 @@ const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
61
56
  const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
62
57
  "dropdownAction"
63
58
  );
64
- function useVolver() {
65
- return inject(INJECTION_KEY_VOLVER);
66
- }
67
- function useModifiers(prefix, modifiers, others) {
68
- return computed(() => {
69
- const toReturn = {
70
- [prefix]: true
71
- };
72
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
73
- if (modifiersArray) {
74
- if (Array.isArray(modifiersArray)) {
75
- modifiersArray.forEach((modifier) => {
76
- if (modifier) {
77
- toReturn[`${prefix}--${modifier}`] = true;
78
- }
79
- });
80
- }
81
- }
82
- if (others) {
83
- Object.keys(others.value).forEach((key) => {
84
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
85
- });
86
- }
87
- return toReturn;
88
- });
89
- }
90
- const __default__$2 = {
91
- name: "VvIcon"
92
- };
93
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
94
- ...__default__$2,
95
- props: /* @__PURE__ */ mergeDefaults({
96
- name: {},
97
- color: {},
98
- width: {},
99
- height: {},
100
- provider: {},
101
- prefix: {},
102
- src: {},
103
- horizontalFlip: { type: Boolean },
104
- verticalFlip: { type: Boolean },
105
- flip: {},
106
- mode: {},
107
- inline: { type: Boolean },
108
- rotate: {},
109
- onLoad: { type: Function },
110
- svg: {},
111
- modifiers: {}
112
- }, VvIconPropsDefaults),
113
- setup(__props) {
114
- const props = __props;
115
- const hasRotate = computed(() => {
116
- if (typeof props.rotate === "string") {
117
- return Number.parseFloat(props.rotate);
118
- }
119
- return props.rotate;
120
- });
121
- const show = ref(true);
122
- const volver = useVolver();
123
- const { modifiers } = toRefs(props);
124
- const bemCssClasses = useModifiers("vv-icon", modifiers);
125
- const provider = computed(() => {
126
- return props.provider || (volver == null ? void 0 : volver.iconsProvider);
127
- });
128
- const icon = computed(() => {
129
- const name = props.name ?? "";
130
- const iconName = `@${provider.value}:${props.prefix}:${name}`;
131
- if (iconExists(iconName)) {
132
- return iconName;
133
- }
134
- const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
135
- (iconsCollection2) => {
136
- const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
137
- return iconExists(icon2);
138
- }
139
- );
140
- if (iconsCollection) {
141
- return `@${provider.value}:${iconsCollection.prefix}:${name}`;
142
- }
143
- return name;
144
- });
145
- function getSvgContent(svg) {
146
- let dom;
147
- if (typeof window === "undefined") {
148
- const { JSDOM } = require("jsdom");
149
- dom = new JSDOM().window;
150
- }
151
- const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
152
- const svgDomString = domParser.parseFromString(svg, "text/html");
153
- const svgEl = svgDomString.querySelector("svg");
154
- return svgEl;
155
- }
156
- function addIconFromSvg(svg) {
157
- const svgContentEl = getSvgContent(svg);
158
- const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
159
- if (svgContentEl && svgContent) {
160
- addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
161
- body: svgContent,
162
- // Set height and width from svg content
163
- height: svgContentEl.viewBox.baseVal.height,
164
- width: svgContentEl.viewBox.baseVal.width
165
- });
166
- }
167
- }
168
- if (volver) {
169
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
170
- show.value = false;
171
- volver.fetchIcon(props.src).then((svg) => {
172
- if (svg) {
173
- addIconFromSvg(svg);
174
- show.value = true;
175
- }
176
- }).catch((e) => {
177
- throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
178
- });
179
- }
180
- }
181
- if (props.svg) {
182
- addIconFromSvg(props.svg);
183
- }
184
- return (_ctx, _cache) => {
185
- return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
186
- key: 0,
187
- class: unref(bemCssClasses)
188
- }, {
189
- inline: _ctx.inline,
190
- width: _ctx.width,
191
- height: _ctx.height,
192
- horizontalFlip: _ctx.horizontalFlip,
193
- verticalFlip: _ctx.verticalFlip,
194
- flip: _ctx.flip,
195
- rotate: unref(hasRotate),
196
- color: _ctx.color,
197
- onLoad: _ctx.onLoad,
198
- icon: unref(icon)
199
- }), null, 16, ["class"])) : createCommentVNode("v-if", true);
200
- };
201
- }
202
- });
203
59
  const LinkProps = {
204
60
  /**
205
61
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -457,170 +313,29 @@ const ActionProps = {
457
313
  },
458
314
  storageKey: String
459
315
  });
460
- const VvActionEvents = ["click", "mouseover", "mouseleave"];
461
- const VvActionProps = ActionProps;
462
- function useInjectedDropdownTrigger() {
463
- return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
464
- }
465
- function useInjectedDropdownAction() {
466
- return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
467
- }
468
- const __default__$1 = {
469
- name: "VvAction"
470
- };
471
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
472
- ...__default__$1,
473
- props: VvActionProps,
474
- emits: VvActionEvents,
475
- setup(__props, { expose: __expose, emit: __emit }) {
476
- const props = __props;
477
- const emit = __emit;
478
- const instance = getCurrentInstance();
479
- const volver = useVolver();
480
- const element = ref(null);
481
- __expose({ $el: element });
482
- const {
483
- reference: dropdownTriggerReference,
484
- bus: dropdownEventBus,
485
- aria: dropdownAria,
486
- expanded: dropdownExpanded
487
- } = useInjectedDropdownTrigger();
488
- watch(
489
- () => element.value,
490
- (newValue) => {
491
- if (dropdownTriggerReference) {
492
- dropdownTriggerReference.value = newValue;
493
- }
494
- }
495
- );
496
- const pressed = computed(() => {
497
- return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
498
- });
499
- const { role } = useInjectedDropdownAction();
500
- const hasTag = computed(() => {
501
- switch (true) {
502
- case props.disabled:
503
- return ActionTag.button;
504
- case props.to !== void 0:
505
- return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
506
- case props.href !== void 0:
507
- return ActionTag.a;
508
- default:
509
- return props.defaultTag;
510
- }
511
- });
512
- const hasProps = computed(() => {
513
- const toReturn = {
514
- ...dropdownAria == null ? void 0 : dropdownAria.value,
515
- ariaPressed: pressed.value ? true : void 0,
516
- ariaLabel: props.ariaLabel,
517
- role: role == null ? void 0 : role.value
518
- };
519
- switch (hasTag.value) {
520
- case ActionTag.a:
521
- return {
522
- ...toReturn,
523
- href: props.href,
524
- target: props.target,
525
- rel: props.rel
526
- };
527
- case ActionTag.routerLink:
528
- case ActionTag.nuxtLink:
529
- return {
530
- ...toReturn,
531
- to: props.to,
532
- target: props.target
533
- };
534
- case ActionTag.button:
535
- return {
536
- ...toReturn,
537
- type: props.type,
538
- disabled: props.disabled
539
- };
540
- default:
541
- return toReturn;
542
- }
543
- });
544
- function onClick(e) {
545
- var _a;
546
- if (props.disabled) {
547
- e.preventDefault();
548
- return;
549
- }
550
- if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
551
- emit("click", e);
552
- return;
553
- }
554
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
555
- }
556
- function onMouseover(e) {
557
- var _a;
558
- if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
559
- emit("mouseover", e);
560
- return;
561
- }
562
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
563
- }
564
- function onMouseleave(e) {
565
- var _a;
566
- if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
567
- emit("mouseleave", e);
568
- return;
569
- }
570
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
571
- }
572
- return (_ctx, _cache) => {
573
- return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
574
- ref_key: "element",
575
- ref: element,
576
- class: {
577
- active: _ctx.active,
578
- pressed: unref(pressed),
579
- disabled: _ctx.disabled,
580
- current: _ctx.current
581
- },
582
- onClickPassive: onClick,
583
- onMouseoverPassive: onMouseover,
584
- onMouseleavePassive: onMouseleave
585
- }), {
586
- default: withCtx(() => [
587
- renderSlot(_ctx.$slots, "default", {}, () => [
588
- createTextVNode(
589
- toDisplayString(_ctx.label),
590
- 1
591
- /* TEXT */
592
- )
593
- ])
594
- ]),
595
- _: 3
596
- /* FORWARDED */
597
- }, 16, ["class"]);
598
- };
599
- }
600
- });
601
- function useInjectedGroupState(groupKey) {
602
- const group = inject(groupKey, void 0);
603
- const isInGroup = computed(() => group !== void 0);
604
- function getGroupOrLocalRef(propName, props, emit) {
605
- const groupPropValue = group == null ? void 0 : group[propName];
606
- if (groupPropValue) {
607
- return computed({
608
- get() {
609
- return groupPropValue.value;
610
- },
611
- set(value) {
612
- groupPropValue.value = value;
613
- }
614
- });
615
- }
616
- const propRef = toRef(props, propName);
617
- return computed({
618
- get() {
619
- return propRef.value;
620
- },
621
- set(value) {
622
- if (emit) {
623
- emit(`update:${propName}`, value);
316
+ function useGroupStateInject(groupKey) {
317
+ const group = inject(groupKey, void 0);
318
+ const isInGroup = computed(() => group !== void 0);
319
+ function getGroupOrLocalRef(propName, props, emit) {
320
+ const groupPropValue = group == null ? void 0 : group[propName];
321
+ if (groupPropValue) {
322
+ return computed({
323
+ get() {
324
+ return groupPropValue.value;
325
+ },
326
+ set(value) {
327
+ groupPropValue.value = value;
328
+ }
329
+ });
330
+ }
331
+ const propRef = toRef(props, propName);
332
+ return computed({
333
+ get() {
334
+ return propRef.value;
335
+ },
336
+ set(value) {
337
+ if (emit) {
338
+ emit(`update:${propName}`, value);
624
339
  }
625
340
  }
626
341
  });
@@ -681,7 +396,7 @@ const VvButtonProps = {
681
396
  }
682
397
  };
683
398
  function useGroupProps(props, emit) {
684
- const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_BUTTON_GROUP);
399
+ const { group, isInGroup, getGroupOrLocalRef } = useGroupStateInject(INJECTION_KEY_BUTTON_GROUP);
685
400
  const { id, iconPosition, icon, label, pressed } = toRefs(props);
686
401
  const modelValue = getGroupOrLocalRef("modelValue", props, emit);
687
402
  const toggle = getGroupOrLocalRef("toggle", props);
@@ -726,8 +441,292 @@ function useGroupProps(props, emit) {
726
441
  label
727
442
  };
728
443
  }
444
+ const VvActionEvents = ["click", "mouseover", "mouseleave"];
445
+ const VvActionProps = ActionProps;
446
+ function useVolver() {
447
+ return inject(INJECTION_KEY_VOLVER);
448
+ }
449
+ function useInjectedDropdownTrigger() {
450
+ return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
451
+ }
452
+ function useInjectedDropdownAction() {
453
+ return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
454
+ }
455
+ const __default__$2 = {
456
+ name: "VvAction"
457
+ };
458
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
459
+ ...__default__$2,
460
+ props: VvActionProps,
461
+ emits: VvActionEvents,
462
+ setup(__props, { expose: __expose, emit: __emit }) {
463
+ const props = __props;
464
+ const emit = __emit;
465
+ const instance = getCurrentInstance();
466
+ const volver = useVolver();
467
+ const element = ref(null);
468
+ __expose({ $el: element });
469
+ const {
470
+ reference: dropdownTriggerReference,
471
+ bus: dropdownEventBus,
472
+ aria: dropdownAria,
473
+ expanded: dropdownExpanded
474
+ } = useInjectedDropdownTrigger();
475
+ watch(
476
+ () => element.value,
477
+ (newValue) => {
478
+ if (dropdownTriggerReference) {
479
+ dropdownTriggerReference.value = newValue;
480
+ }
481
+ }
482
+ );
483
+ const pressed = computed(() => {
484
+ return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
485
+ });
486
+ const { role } = useInjectedDropdownAction();
487
+ const hasTag = computed(() => {
488
+ switch (true) {
489
+ case props.disabled:
490
+ return ActionTag.button;
491
+ case props.to !== void 0:
492
+ return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
493
+ case props.href !== void 0:
494
+ return ActionTag.a;
495
+ default:
496
+ return props.defaultTag;
497
+ }
498
+ });
499
+ const hasProps = computed(() => {
500
+ const toReturn = {
501
+ ...dropdownAria == null ? void 0 : dropdownAria.value,
502
+ ariaPressed: pressed.value ? true : void 0,
503
+ ariaLabel: props.ariaLabel,
504
+ role: role == null ? void 0 : role.value
505
+ };
506
+ switch (hasTag.value) {
507
+ case ActionTag.a:
508
+ return {
509
+ ...toReturn,
510
+ href: props.href,
511
+ target: props.target,
512
+ rel: props.rel
513
+ };
514
+ case ActionTag.routerLink:
515
+ case ActionTag.nuxtLink:
516
+ return {
517
+ ...toReturn,
518
+ to: props.to,
519
+ target: props.target
520
+ };
521
+ case ActionTag.button:
522
+ return {
523
+ ...toReturn,
524
+ type: props.type,
525
+ disabled: props.disabled
526
+ };
527
+ default:
528
+ return toReturn;
529
+ }
530
+ });
531
+ function onClick(e) {
532
+ var _a;
533
+ if (props.disabled) {
534
+ e.preventDefault();
535
+ return;
536
+ }
537
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
538
+ emit("click", e);
539
+ return;
540
+ }
541
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
542
+ }
543
+ function onMouseover(e) {
544
+ var _a;
545
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
546
+ emit("mouseover", e);
547
+ return;
548
+ }
549
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
550
+ }
551
+ function onMouseleave(e) {
552
+ var _a;
553
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
554
+ emit("mouseleave", e);
555
+ return;
556
+ }
557
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
558
+ }
559
+ return (_ctx, _cache) => {
560
+ return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
561
+ ref_key: "element",
562
+ ref: element,
563
+ class: {
564
+ active: _ctx.active,
565
+ pressed: unref(pressed),
566
+ disabled: _ctx.disabled,
567
+ current: _ctx.current
568
+ },
569
+ onClickPassive: onClick,
570
+ onMouseoverPassive: onMouseover,
571
+ onMouseleavePassive: onMouseleave
572
+ }), {
573
+ default: withCtx(() => [
574
+ renderSlot(_ctx.$slots, "default", {}, () => [
575
+ createTextVNode(
576
+ toDisplayString(_ctx.label),
577
+ 1
578
+ /* TEXT */
579
+ )
580
+ ])
581
+ ]),
582
+ _: 3
583
+ /* FORWARDED */
584
+ }, 16, ["class"]);
585
+ };
586
+ }
587
+ });
588
+ const VvIconPropsDefaults = {
589
+ prefix: "normal"
590
+ /* normal */
591
+ };
592
+ function useModifiers(prefix, modifiers, others) {
593
+ return computed(() => {
594
+ const toReturn = {
595
+ [prefix]: true
596
+ };
597
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
598
+ if (modifiersArray) {
599
+ if (Array.isArray(modifiersArray)) {
600
+ modifiersArray.forEach((modifier) => {
601
+ if (modifier) {
602
+ toReturn[`${prefix}--${modifier}`] = true;
603
+ }
604
+ });
605
+ }
606
+ }
607
+ if (others) {
608
+ Object.keys(others.value).forEach((key) => {
609
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
610
+ });
611
+ }
612
+ return toReturn;
613
+ });
614
+ }
615
+ const __default__$1 = {
616
+ name: "VvIcon"
617
+ };
618
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
619
+ ...__default__$1,
620
+ props: /* @__PURE__ */ mergeDefaults({
621
+ name: {},
622
+ color: {},
623
+ width: {},
624
+ height: {},
625
+ provider: {},
626
+ prefix: {},
627
+ src: {},
628
+ horizontalFlip: { type: Boolean },
629
+ verticalFlip: { type: Boolean },
630
+ flip: {},
631
+ mode: {},
632
+ inline: { type: Boolean },
633
+ rotate: {},
634
+ onLoad: { type: Function },
635
+ svg: {},
636
+ modifiers: {}
637
+ }, VvIconPropsDefaults),
638
+ setup(__props) {
639
+ const props = __props;
640
+ const hasRotate = computed(() => {
641
+ if (typeof props.rotate === "string") {
642
+ return Number.parseFloat(props.rotate);
643
+ }
644
+ return props.rotate;
645
+ });
646
+ const show = ref(true);
647
+ const volver = useVolver();
648
+ const { modifiers } = toRefs(props);
649
+ const bemCssClasses = useModifiers("vv-icon", modifiers);
650
+ const provider = computed(() => {
651
+ return props.provider || (volver == null ? void 0 : volver.iconsProvider);
652
+ });
653
+ const icon = computed(() => {
654
+ const name = props.name ?? "";
655
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
656
+ if (iconExists(iconName)) {
657
+ return iconName;
658
+ }
659
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
660
+ (iconsCollection2) => {
661
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
662
+ return iconExists(icon2);
663
+ }
664
+ );
665
+ if (iconsCollection) {
666
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
667
+ }
668
+ return name;
669
+ });
670
+ function getSvgContent(svg) {
671
+ let dom;
672
+ if (typeof window === "undefined") {
673
+ const { JSDOM } = require("jsdom");
674
+ dom = new JSDOM().window;
675
+ }
676
+ const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
677
+ const svgDomString = domParser.parseFromString(svg, "text/html");
678
+ const svgEl = svgDomString.querySelector("svg");
679
+ return svgEl;
680
+ }
681
+ function addIconFromSvg(svg) {
682
+ const svgContentEl = getSvgContent(svg);
683
+ const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
684
+ if (svgContentEl && svgContent) {
685
+ addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
686
+ body: svgContent,
687
+ // Set height and width from svg content
688
+ height: svgContentEl.viewBox.baseVal.height,
689
+ width: svgContentEl.viewBox.baseVal.width
690
+ });
691
+ }
692
+ }
693
+ if (volver) {
694
+ if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
695
+ show.value = false;
696
+ volver.fetchIcon(props.src).then((svg) => {
697
+ if (svg) {
698
+ addIconFromSvg(svg);
699
+ show.value = true;
700
+ }
701
+ }).catch((e) => {
702
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
703
+ });
704
+ }
705
+ }
706
+ if (props.svg) {
707
+ addIconFromSvg(props.svg);
708
+ }
709
+ return (_ctx, _cache) => {
710
+ return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
711
+ key: 0,
712
+ class: unref(bemCssClasses)
713
+ }, {
714
+ inline: _ctx.inline,
715
+ width: _ctx.width,
716
+ height: _ctx.height,
717
+ horizontalFlip: _ctx.horizontalFlip,
718
+ verticalFlip: _ctx.verticalFlip,
719
+ flip: _ctx.flip,
720
+ rotate: unref(hasRotate),
721
+ color: _ctx.color,
722
+ onLoad: _ctx.onLoad,
723
+ icon: unref(icon)
724
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
725
+ };
726
+ }
727
+ });
729
728
  function useUniqueId(id) {
730
- return computed(() => String((id == null ? void 0 : id.value) || uid()));
729
+ return computed(() => String((id == null ? void 0 : id.value) || useId()));
731
730
  }
732
731
  function equals(obj1, obj2, field) {
733
732
  return deepEquals(obj1, obj2);
@@ -923,7 +922,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
923
922
  }
924
923
  }
925
924
  return (_ctx, _cache) => {
926
- return openBlock(), createBlock(_sfc_main$1, mergeProps({
925
+ return openBlock(), createBlock(_sfc_main$2, mergeProps({
927
926
  ...unref(attrs),
928
927
  ...unref(hasListeners),
929
928
  disabled: unref(disabled),
@@ -944,7 +943,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
944
943
  default: withCtx(() => [
945
944
  renderSlot(_ctx.$slots, "default", {}, () => [
946
945
  _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
947
- _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$2, {
946
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$1, {
948
947
  key: 0,
949
948
  class: "vv-button__loading-icon",
950
949
  name: _ctx.loadingIcon
@@ -962,7 +961,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
962
961
  [
963
962
  renderSlot(_ctx.$slots, "before"),
964
963
  unref(hasIcon) ? (openBlock(), createBlock(
965
- _sfc_main$2,
964
+ _sfc_main$1,
966
965
  mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
967
966
  null,
968
967
  16