@volverjs/ui-vue 0.0.10-beta.46 → 0.0.10-beta.48

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 +661 -656
  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 +2761 -2758
  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 +41 -41
  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 +17 -11
  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,135 +1,6 @@
1
- import { unref, computed, isRef, defineComponent, h, inject, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
1
+ import { unref, computed, isRef, defineComponent, h, inject, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, useId, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
- import { uid } from "uid";
4
3
  import { useFocus, useElementVisibility } from "@vueuse/core";
5
- function isEmpty(value) {
6
- return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
7
- }
8
- function isString(value) {
9
- return typeof value === "string" || value instanceof String;
10
- }
11
- function joinLines(items) {
12
- if (Array.isArray(items)) {
13
- return items.filter((item) => isString(item)).join(" ");
14
- }
15
- return items;
16
- }
17
- function HintSlotFactory(propsOrRef, slots) {
18
- const props = computed(() => {
19
- if (isRef(propsOrRef)) {
20
- return propsOrRef.value;
21
- }
22
- return propsOrRef;
23
- });
24
- const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
25
- const validLabel = computed(() => joinLines(props.value.validLabel));
26
- const loadingLabel = computed(() => props.value.loadingLabel);
27
- const hintLabel = computed(() => props.value.hintLabel);
28
- const hasLoadingLabelOrSlot = computed(
29
- () => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
30
- );
31
- const hasInvalidLabelOrSlot = computed(
32
- () => !hasLoadingLabelOrSlot.value && Boolean(
33
- props.value.invalid && (slots.invalid || invalidLabel.value)
34
- )
35
- );
36
- const hasValidLabelOrSlot = computed(
37
- () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
38
- );
39
- const hasHintLabelOrSlot = computed(
40
- () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
41
- );
42
- const isVisible = computed(
43
- () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
44
- );
45
- const hintSlotScope = computed(() => ({
46
- modelValue: props.value.modelValue,
47
- valid: props.value.valid,
48
- invalid: props.value.invalid,
49
- loading: props.value.loading
50
- }));
51
- const HintSlot = defineComponent({
52
- name: "HintSlot",
53
- props: {
54
- tag: {
55
- type: String,
56
- default: "small"
57
- }
58
- },
59
- setup() {
60
- return {
61
- isVisible,
62
- invalidLabel,
63
- validLabel,
64
- loadingLabel,
65
- hintLabel,
66
- hasInvalidLabelOrSlot,
67
- hasValidLabelOrSlot,
68
- hasLoadingLabelOrSlot,
69
- hasHintLabelOrSlot
70
- };
71
- },
72
- render() {
73
- var _a, _b, _c, _d, _e, _f, _g, _h;
74
- if (this.isVisible) {
75
- let role;
76
- if (this.hasInvalidLabelOrSlot) {
77
- role = "alert";
78
- }
79
- if (this.hasValidLabelOrSlot) {
80
- role = "status";
81
- }
82
- if (this.hasLoadingLabelOrSlot) {
83
- return h(
84
- this.tag,
85
- {
86
- role
87
- },
88
- ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
89
- );
90
- }
91
- if (this.hasInvalidLabelOrSlot) {
92
- return h(
93
- this.tag,
94
- {
95
- role
96
- },
97
- ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
98
- );
99
- }
100
- if (this.hasValidLabelOrSlot) {
101
- return h(
102
- this.tag,
103
- {
104
- role
105
- },
106
- ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
107
- );
108
- }
109
- return h(
110
- this.tag,
111
- {
112
- role
113
- },
114
- ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
115
- );
116
- }
117
- return null;
118
- }
119
- });
120
- return {
121
- hasInvalidLabelOrSlot,
122
- hasHintLabelOrSlot,
123
- hasValidLabelOrSlot,
124
- hasLoadingLabelOrSlot,
125
- hintSlotScope,
126
- HintSlot
127
- };
128
- }
129
- const VvIconPropsDefaults = {
130
- prefix: "normal"
131
- /* normal */
132
- };
133
4
  var StorageType = /* @__PURE__ */ ((StorageType2) => {
134
5
  StorageType2["local"] = "local";
135
6
  StorageType2["session"] = "session";
@@ -177,168 +48,29 @@ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
177
48
  return ActionTag2;
178
49
  })(ActionTag || {});
179
50
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
180
- function useVolver() {
181
- return inject(INJECTION_KEY_VOLVER);
182
- }
183
- function useModifiers(prefix, modifiers, others) {
184
- return computed(() => {
185
- const toReturn = {
186
- [prefix]: true
187
- };
188
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
189
- if (modifiersArray) {
190
- if (Array.isArray(modifiersArray)) {
191
- modifiersArray.forEach((modifier) => {
192
- if (modifier) {
193
- toReturn[`${prefix}--${modifier}`] = true;
194
- }
195
- });
196
- }
197
- }
198
- if (others) {
199
- Object.keys(others.value).forEach((key) => {
200
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
201
- });
202
- }
203
- return toReturn;
204
- });
205
- }
206
- const __default__$1 = {
207
- name: "VvIcon"
208
- };
209
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
210
- ...__default__$1,
211
- props: /* @__PURE__ */ mergeDefaults({
212
- name: {},
213
- color: {},
214
- width: {},
215
- height: {},
216
- provider: {},
217
- prefix: {},
218
- src: {},
219
- horizontalFlip: { type: Boolean },
220
- verticalFlip: { type: Boolean },
221
- flip: {},
222
- mode: {},
223
- inline: { type: Boolean },
224
- rotate: {},
225
- onLoad: { type: Function },
226
- svg: {},
227
- modifiers: {}
228
- }, VvIconPropsDefaults),
229
- setup(__props) {
230
- const props = __props;
231
- const hasRotate = computed(() => {
232
- if (typeof props.rotate === "string") {
233
- return Number.parseFloat(props.rotate);
234
- }
235
- return props.rotate;
236
- });
237
- const show = ref(true);
238
- const volver = useVolver();
239
- const { modifiers } = toRefs(props);
240
- const bemCssClasses = useModifiers("vv-icon", modifiers);
241
- const provider = computed(() => {
242
- return props.provider || (volver == null ? void 0 : volver.iconsProvider);
243
- });
244
- const icon = computed(() => {
245
- const name = props.name ?? "";
246
- const iconName = `@${provider.value}:${props.prefix}:${name}`;
247
- if (iconExists(iconName)) {
248
- return iconName;
249
- }
250
- const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
251
- (iconsCollection2) => {
252
- const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
253
- return iconExists(icon2);
254
- }
255
- );
256
- if (iconsCollection) {
257
- return `@${provider.value}:${iconsCollection.prefix}:${name}`;
258
- }
259
- return name;
260
- });
261
- function getSvgContent(svg) {
262
- let dom;
263
- if (typeof window === "undefined") {
264
- const { JSDOM } = require("jsdom");
265
- dom = new JSDOM().window;
266
- }
267
- const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
268
- const svgDomString = domParser.parseFromString(svg, "text/html");
269
- const svgEl = svgDomString.querySelector("svg");
270
- return svgEl;
271
- }
272
- function addIconFromSvg(svg) {
273
- const svgContentEl = getSvgContent(svg);
274
- const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
275
- if (svgContentEl && svgContent) {
276
- addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
277
- body: svgContent,
278
- // Set height and width from svg content
279
- height: svgContentEl.viewBox.baseVal.height,
280
- width: svgContentEl.viewBox.baseVal.width
281
- });
282
- }
283
- }
284
- if (volver) {
285
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
286
- show.value = false;
287
- volver.fetchIcon(props.src).then((svg) => {
288
- if (svg) {
289
- addIconFromSvg(svg);
290
- show.value = true;
291
- }
292
- }).catch((e) => {
293
- throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
294
- });
295
- }
296
- }
297
- if (props.svg) {
298
- addIconFromSvg(props.svg);
299
- }
300
- return (_ctx, _cache) => {
301
- return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
302
- key: 0,
303
- class: unref(bemCssClasses)
304
- }, {
305
- inline: _ctx.inline,
306
- width: _ctx.width,
307
- height: _ctx.height,
308
- horizontalFlip: _ctx.horizontalFlip,
309
- verticalFlip: _ctx.verticalFlip,
310
- flip: _ctx.flip,
311
- rotate: unref(hasRotate),
312
- color: _ctx.color,
313
- onLoad: _ctx.onLoad,
314
- icon: unref(icon)
315
- }), null, 16, ["class"])) : createCommentVNode("v-if", true);
316
- };
317
- }
318
- });
319
- const LinkProps = {
320
- /**
321
- * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
322
- * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
323
- */
324
- to: {
325
- type: [String, Object]
326
- },
327
- /**
328
- * Anchor href
329
- */
330
- href: String,
331
- /**
332
- * Anchor target
333
- */
334
- target: String,
335
- /**
336
- * Anchor rel
337
- */
338
- rel: {
339
- type: String,
340
- default: "noopener noreferrer"
341
- }
51
+ const LinkProps = {
52
+ /**
53
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
54
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
55
+ */
56
+ to: {
57
+ type: [String, Object]
58
+ },
59
+ /**
60
+ * Anchor href
61
+ */
62
+ href: String,
63
+ /**
64
+ * Anchor target
65
+ */
66
+ target: String,
67
+ /**
68
+ * Anchor rel
69
+ */
70
+ rel: {
71
+ type: String,
72
+ default: "noopener noreferrer"
73
+ }
342
74
  };
343
75
  const ValidProps = {
344
76
  /**
@@ -757,6 +489,273 @@ const VvTextareaProps = {
757
489
  */
758
490
  resizable: Boolean
759
491
  };
492
+ function isEmpty(value) {
493
+ return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
494
+ }
495
+ function isString(value) {
496
+ return typeof value === "string" || value instanceof String;
497
+ }
498
+ function joinLines(items) {
499
+ if (Array.isArray(items)) {
500
+ return items.filter((item) => isString(item)).join(" ");
501
+ }
502
+ return items;
503
+ }
504
+ function HintSlotFactory(propsOrRef, slots) {
505
+ const props = computed(() => {
506
+ if (isRef(propsOrRef)) {
507
+ return propsOrRef.value;
508
+ }
509
+ return propsOrRef;
510
+ });
511
+ const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
512
+ const validLabel = computed(() => joinLines(props.value.validLabel));
513
+ const loadingLabel = computed(() => props.value.loadingLabel);
514
+ const hintLabel = computed(() => props.value.hintLabel);
515
+ const hasLoadingLabelOrSlot = computed(
516
+ () => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
517
+ );
518
+ const hasInvalidLabelOrSlot = computed(
519
+ () => !hasLoadingLabelOrSlot.value && Boolean(
520
+ props.value.invalid && (slots.invalid || invalidLabel.value)
521
+ )
522
+ );
523
+ const hasValidLabelOrSlot = computed(
524
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
525
+ );
526
+ const hasHintLabelOrSlot = computed(
527
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
528
+ );
529
+ const isVisible = computed(
530
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
531
+ );
532
+ const hintSlotScope = computed(() => ({
533
+ modelValue: props.value.modelValue,
534
+ valid: props.value.valid,
535
+ invalid: props.value.invalid,
536
+ loading: props.value.loading
537
+ }));
538
+ const HintSlot = defineComponent({
539
+ name: "HintSlot",
540
+ props: {
541
+ tag: {
542
+ type: String,
543
+ default: "small"
544
+ }
545
+ },
546
+ setup() {
547
+ return {
548
+ isVisible,
549
+ invalidLabel,
550
+ validLabel,
551
+ loadingLabel,
552
+ hintLabel,
553
+ hasInvalidLabelOrSlot,
554
+ hasValidLabelOrSlot,
555
+ hasLoadingLabelOrSlot,
556
+ hasHintLabelOrSlot
557
+ };
558
+ },
559
+ render() {
560
+ var _a, _b, _c, _d, _e, _f, _g, _h;
561
+ if (this.isVisible) {
562
+ let role;
563
+ if (this.hasInvalidLabelOrSlot) {
564
+ role = "alert";
565
+ }
566
+ if (this.hasValidLabelOrSlot) {
567
+ role = "status";
568
+ }
569
+ if (this.hasLoadingLabelOrSlot) {
570
+ return h(
571
+ this.tag,
572
+ {
573
+ role
574
+ },
575
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
576
+ );
577
+ }
578
+ if (this.hasInvalidLabelOrSlot) {
579
+ return h(
580
+ this.tag,
581
+ {
582
+ role
583
+ },
584
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
585
+ );
586
+ }
587
+ if (this.hasValidLabelOrSlot) {
588
+ return h(
589
+ this.tag,
590
+ {
591
+ role
592
+ },
593
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
594
+ );
595
+ }
596
+ return h(
597
+ this.tag,
598
+ {
599
+ role
600
+ },
601
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
602
+ );
603
+ }
604
+ return null;
605
+ }
606
+ });
607
+ return {
608
+ hasInvalidLabelOrSlot,
609
+ hasHintLabelOrSlot,
610
+ hasValidLabelOrSlot,
611
+ hasLoadingLabelOrSlot,
612
+ hintSlotScope,
613
+ HintSlot
614
+ };
615
+ }
616
+ const VvIconPropsDefaults = {
617
+ prefix: "normal"
618
+ /* normal */
619
+ };
620
+ function useVolver() {
621
+ return inject(INJECTION_KEY_VOLVER);
622
+ }
623
+ function useModifiers(prefix, modifiers, others) {
624
+ return computed(() => {
625
+ const toReturn = {
626
+ [prefix]: true
627
+ };
628
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
629
+ if (modifiersArray) {
630
+ if (Array.isArray(modifiersArray)) {
631
+ modifiersArray.forEach((modifier) => {
632
+ if (modifier) {
633
+ toReturn[`${prefix}--${modifier}`] = true;
634
+ }
635
+ });
636
+ }
637
+ }
638
+ if (others) {
639
+ Object.keys(others.value).forEach((key) => {
640
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
641
+ });
642
+ }
643
+ return toReturn;
644
+ });
645
+ }
646
+ const __default__$1 = {
647
+ name: "VvIcon"
648
+ };
649
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
650
+ ...__default__$1,
651
+ props: /* @__PURE__ */ mergeDefaults({
652
+ name: {},
653
+ color: {},
654
+ width: {},
655
+ height: {},
656
+ provider: {},
657
+ prefix: {},
658
+ src: {},
659
+ horizontalFlip: { type: Boolean },
660
+ verticalFlip: { type: Boolean },
661
+ flip: {},
662
+ mode: {},
663
+ inline: { type: Boolean },
664
+ rotate: {},
665
+ onLoad: { type: Function },
666
+ svg: {},
667
+ modifiers: {}
668
+ }, VvIconPropsDefaults),
669
+ setup(__props) {
670
+ const props = __props;
671
+ const hasRotate = computed(() => {
672
+ if (typeof props.rotate === "string") {
673
+ return Number.parseFloat(props.rotate);
674
+ }
675
+ return props.rotate;
676
+ });
677
+ const show = ref(true);
678
+ const volver = useVolver();
679
+ const { modifiers } = toRefs(props);
680
+ const bemCssClasses = useModifiers("vv-icon", modifiers);
681
+ const provider = computed(() => {
682
+ return props.provider || (volver == null ? void 0 : volver.iconsProvider);
683
+ });
684
+ const icon = computed(() => {
685
+ const name = props.name ?? "";
686
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
687
+ if (iconExists(iconName)) {
688
+ return iconName;
689
+ }
690
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
691
+ (iconsCollection2) => {
692
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
693
+ return iconExists(icon2);
694
+ }
695
+ );
696
+ if (iconsCollection) {
697
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
698
+ }
699
+ return name;
700
+ });
701
+ function getSvgContent(svg) {
702
+ let dom;
703
+ if (typeof window === "undefined") {
704
+ const { JSDOM } = require("jsdom");
705
+ dom = new JSDOM().window;
706
+ }
707
+ const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
708
+ const svgDomString = domParser.parseFromString(svg, "text/html");
709
+ const svgEl = svgDomString.querySelector("svg");
710
+ return svgEl;
711
+ }
712
+ function addIconFromSvg(svg) {
713
+ const svgContentEl = getSvgContent(svg);
714
+ const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
715
+ if (svgContentEl && svgContent) {
716
+ addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
717
+ body: svgContent,
718
+ // Set height and width from svg content
719
+ height: svgContentEl.viewBox.baseVal.height,
720
+ width: svgContentEl.viewBox.baseVal.width
721
+ });
722
+ }
723
+ }
724
+ if (volver) {
725
+ if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
726
+ show.value = false;
727
+ volver.fetchIcon(props.src).then((svg) => {
728
+ if (svg) {
729
+ addIconFromSvg(svg);
730
+ show.value = true;
731
+ }
732
+ }).catch((e) => {
733
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
734
+ });
735
+ }
736
+ }
737
+ if (props.svg) {
738
+ addIconFromSvg(props.svg);
739
+ }
740
+ return (_ctx, _cache) => {
741
+ return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
742
+ key: 0,
743
+ class: unref(bemCssClasses)
744
+ }, {
745
+ inline: _ctx.inline,
746
+ width: _ctx.width,
747
+ height: _ctx.height,
748
+ horizontalFlip: _ctx.horizontalFlip,
749
+ verticalFlip: _ctx.verticalFlip,
750
+ flip: _ctx.flip,
751
+ rotate: unref(hasRotate),
752
+ color: _ctx.color,
753
+ onLoad: _ctx.onLoad,
754
+ icon: unref(icon)
755
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
756
+ };
757
+ }
758
+ });
760
759
  function useDefaults(componentName, propsDefinition, props) {
761
760
  const volver = useVolver();
762
761
  const volverComponentDefaults = computed(() => {
@@ -811,7 +810,7 @@ function useDefaults(componentName, propsDefinition, props) {
811
810
  });
812
811
  }
813
812
  function useUniqueId(id) {
814
- return computed(() => String((id == null ? void 0 : id.value) || uid()));
813
+ return computed(() => String((id == null ? void 0 : id.value) || useId()));
815
814
  }
816
815
  function useDebouncedInput(modelValue, emit, ms = 0, {
817
816
  getter = (value) => value,
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("uid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.uid,e.core)}(this,(function(e,t,l,o){"use strict";function a(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const n={prefix:"normal"};var r=(e=>(e.local="local",e.session="session",e))(r||{}),u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),s=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(s||{}),v=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(v||{});const c=Symbol.for("volver");function f(){return e.inject(c)}function p(t,l,o){return e.computed((()=>{const a={[t]:!0},i="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return i&&Array.isArray(i)&&i.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const m=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:{}},n),setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),i=e.ref(!0),n=f(),{modifiers:r}=e.toRefs(o),u=p("vv-icon",r),d=e.computed((()=>o.provider||(null==n?void 0:n.iconsProvider))),s=e.computed((()=>{const e=o.name??"",l=`@${d.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==n?void 0:n.iconsCollections.find((l=>{const o=`@${d.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return n&&o.src&&!t.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(i.value=!1,n.fetchIcon(o.src).then((e=>{e&&(v(e),i.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(l,o)=>e.unref(i)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),h={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},g={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},b={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},y={disabled:{type:Boolean,default:!1}},S=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),L={readonly:{type:Boolean,default:!1}},B={modifiers:{type:[String,Array],default:void 0}},x={hintLabel:{type:String,default:""}},$={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},k={debounce:{type:[Number,String],default:void 0}},w={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},V={tabindex:{type:[String,Number],default:0}},N={floating:{type:Boolean,default:!1}},O={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...{...O,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...V,...y,...L,...h,...g,...x,...b,...B,...$,...k,...w,...N,...S,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},required:{type:Boolean,default:!1}};s.button,v.button,r.local;const _={...P,modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},resizable:Boolean};const I=["for"],C={class:"vv-textarea__wrapper"},E={key:0,class:"vv-textarea__input-before"},z={class:"vv-textarea__inner"},A=["id"],j={key:1,class:"vv-textarea__input-after"},R={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:_,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:n}){const r=t,s=n,v=e.useSlots(),c=function(t,l,o){const a=f(),i=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===i.value)return o;const e=i.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const i=a[o];if(l[o]=i,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===i&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===i&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(i)&&(l[o]=e[o]):a===i&&(l[o]=e[o])}}return l}),{})}))}("VvTextarea",_,r),h=e.ref(),{id:g,icon:b,iconPosition:y,label:S,modelValue:L,count:B,valid:x,invalid:$,loading:k,modifiers:w,debounce:V,minlength:N,maxlength:O}=e.toRefs(r),P=function(t){return e.computed((()=>String((null==t?void 0:t.value)||l.uid())))}(g),T=e.computed((()=>`${P.value}-hint`)),q=e.computed((()=>r.floating&&a(r.placeholder)?" ":r.placeholder)),F=function(t,l,o=0,{getter:a=e=>e,setter:i=e=>e}={}){let n;return"string"==typeof o&&(o=Number.parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{n&&clearTimeout(n),n=setTimeout((()=>{l("update:modelValue",i(e))}),o)}})}(L,s,null==V?void 0:V.value),{hasIconBefore:D,hasIconAfter:H}=function(t,l){const o=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==l?void 0:l.value)===d.before?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===d.after?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===u.left?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===u.right?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===u.top?o.value:void 0)),v=e.computed((()=>(null==l?void 0:l.value)===u.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:n,hasIconRight:r,hasIconTop:s,hasIconBottom:v,hasIconBefore:a,hasIconAfter:i}}(b,y),{focused:M}=function(t,l){const{focused:a}=o.useFocus(t);return e.watch(a,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:a}}(h,s),J=o.useElementVisibility(h);e.watch(J,(e=>{e&&r.autofocus&&(M.value=!0)}));const{formatted:K}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),i=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:i}}(F,{mode:null==B?void 0:B.value,upperLimit:Number(null==O?void 0:O.value),lowerLimit:Number(null==N?void 0:N.value)}),U=e.computed((()=>!r.disabled&&!r.readonly)),G=e.computed((()=>U.value?r.tabindex:-1)),Q=e.computed((()=>!a(L))),W=e.computed((()=>!0===r.invalid||!0!==r.valid&&void 0)),{HintSlot:X,hasHintLabelOrSlot:Y,hasInvalidLabelOrSlot:Z,hintSlotScope:ee}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>i(o.value.invalidLabel))),n=e.computed((()=>i(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),u=e.computed((()=>o.value.hintLabel)),d=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),s=e.computed((()=>!d.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),v=e.computed((()=>!d.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!d.value&&!s.value&&!v.value&&Boolean(l.hint||u.value))),f=e.computed((()=>s.value||v.value||d.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:f,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:c}),render(){var t,l,o,a,i,n,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==(l=(t=this.$slots).loading)?void 0:l.call(t))??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==(n=(i=this.$slots).valid)?void 0:n.call(i))??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:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hintSlotScope:p,HintSlot:m}}(c,v),te=p("vv-textarea",w,e.computed((()=>({valid:x.value,invalid:$.value,loading:k.value,disabled:r.disabled,readonly:r.readonly,"icon-before":void 0!==D.value,"icon-after":void 0!==H.value,floating:r.floating&&!a(r.label),dirty:Q.value,focus:M.value,resizable:r.resizable})))),le=e.computed((()=>({name:r.name,placeholder:q.value,tabindex:G.value,disabled:r.disabled,readonly:r.readonly,required:r.required,autocomplete:r.autocomplete,minlength:r.minlength,maxlength:r.maxlength,cols:r.cols,rows:r.rows,wrap:r.wrap,spellcheck:r.spellcheck,"aria-invalid":W.value,"aria-describedby":Y.value?T.value:void 0,"aria-errormessage":Z.value?T.value:void 0}))),oe=e.computed((()=>({valid:r.valid,invalid:r.invalid,modelValue:r.modelValue,hintLabel:r.hintLabel,maxlength:r.maxlength,minlength:r.minlength,clear:ae})));function ae(){F.value=void 0}return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(te))},[e.unref(S)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(P),class:"vv-textarea__label"},e.toDisplayString(e.unref(S)),9,I)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",C,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",E,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(oe))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",z,[e.unref(D)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0},e.unref(D),{class:"vv-textarea__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(P),ref_key:"textarea",ref:h,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(F)?F.value=t:null)},e.unref(le),{onKeyup:l[1]||(l[1]=e=>s("keyup",e))}),null,16,A),[[e.vModelText,e.unref(F)]]),e.unref(H)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1},e.unref(H),{class:"vv-textarea__icon vv-textarea__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(oe))))])):e.createCommentVNode("v-if",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("span",R,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(oe))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(K)),1)]))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(X),{id:e.unref(T),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.core)}(this,(function(e,t,l){"use strict";var o=(e=>(e.local="local",e.session="session",e))(o||{}),a=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(a||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});const u=Symbol.for("volver"),d={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},s={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},v={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},c={disabled:{type:Boolean,default:!1}},f=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),p={readonly:{type:Boolean,default:!1}},m={modifiers:{type:[String,Array],default:void 0}},h={hintLabel:{type:String,default:""}},g={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},b={debounce:{type:[Number,String],default:void 0}},y={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:i.before,validation:e=>Object.values(i).includes(e)}},S={tabindex:{type:[String,Number],default:0}},L={floating:{type:Boolean,default:!1}},B={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const x={...{...B,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...S,...c,...p,...d,...s,...h,...v,...m,...g,...b,...y,...L,...f,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},required:{type:Boolean,default:!1}};n.button,r.button,o.local;const $={...x,modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},resizable:Boolean};function k(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function w(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const V={prefix:"normal"};function N(){return e.inject(u)}function O(t,l,o){return e.computed((()=>{const a={[t]:!0},i="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return i&&Array.isArray(i)&&i.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const P=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:{}},V),setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),i=e.ref(!0),n=N(),{modifiers:r}=e.toRefs(o),u=O("vv-icon",r),d=e.computed((()=>o.provider||(null==n?void 0:n.iconsProvider))),s=e.computed((()=>{const e=o.name??"",l=`@${d.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==n?void 0:n.iconsCollections.find((l=>{const o=`@${d.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return n&&o.src&&!t.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(i.value=!1,n.fetchIcon(o.src).then((e=>{e&&(v(e),i.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(l,o)=>e.unref(i)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});const _=["for"],I={class:"vv-textarea__wrapper"},C={key:0,class:"vv-textarea__input-before"},E={class:"vv-textarea__inner"},z=["id"],A={key:1,class:"vv-textarea__input-after"},j={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:$,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:o}){const n=t,r=o,u=e.useSlots(),d=function(t,l,o){const a=N(),i=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===i.value)return o;const e=i.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const i=a[o];if(l[o]=i,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===i&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===i&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(i)&&(l[o]=e[o]):a===i&&(l[o]=e[o])}}return l}),{})}))}("VvTextarea",$,n),s=e.ref(),{id:v,icon:c,iconPosition:f,label:p,modelValue:m,count:h,valid:g,invalid:b,loading:y,modifiers:S,debounce:L,minlength:B,maxlength:x}=e.toRefs(n),V=function(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}(v),R=e.computed((()=>`${V.value}-hint`)),T=e.computed((()=>n.floating&&k(n.placeholder)?" ":n.placeholder)),F=function(t,l,o=0,{getter:a=e=>e,setter:i=e=>e}={}){let n;return"string"==typeof o&&(o=Number.parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{n&&clearTimeout(n),n=setTimeout((()=>{l("update:modelValue",i(e))}),o)}})}(m,r,null==L?void 0:L.value),{hasIconBefore:q,hasIconAfter:D}=function(t,l){const o=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),n=e.computed((()=>(null==l?void 0:l.value)===i.before?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===i.after?o.value:void 0)),u=e.computed((()=>(null==l?void 0:l.value)===a.left?o.value:void 0)),d=e.computed((()=>(null==l?void 0:l.value)===a.right?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===a.top?o.value:void 0)),v=e.computed((()=>(null==l?void 0:l.value)===a.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:u,hasIconRight:d,hasIconTop:s,hasIconBottom:v,hasIconBefore:n,hasIconAfter:r}}(c,f),{focused:H}=function(t,o){const{focused:a}=l.useFocus(t);return e.watch(a,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:a}}(s,r),M=l.useElementVisibility(s);e.watch(M,(e=>{e&&n.autofocus&&(H.value=!0)}));const{formatted:J}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),i=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:i}}(F,{mode:null==h?void 0:h.value,upperLimit:Number(null==x?void 0:x.value),lowerLimit:Number(null==B?void 0:B.value)}),K=e.computed((()=>!n.disabled&&!n.readonly)),U=e.computed((()=>K.value?n.tabindex:-1)),G=e.computed((()=>!k(m))),Q=e.computed((()=>!0===n.invalid||!0!==n.valid&&void 0)),{HintSlot:W,hasHintLabelOrSlot:X,hasInvalidLabelOrSlot:Y,hintSlotScope:Z}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>w(o.value.invalidLabel))),i=e.computed((()=>w(o.value.validLabel))),n=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||n.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(l.valid||i.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||r.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:i,loadingLabel:n,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,o,a,i,n,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==(l=(t=this.$slots).loading)?void 0:l.call(t))??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==(n=(i=this.$slots).valid)?void 0:n.call(i))??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:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(d,u),ee=O("vv-textarea",S,e.computed((()=>({valid:g.value,invalid:b.value,loading:y.value,disabled:n.disabled,readonly:n.readonly,"icon-before":void 0!==q.value,"icon-after":void 0!==D.value,floating:n.floating&&!k(n.label),dirty:G.value,focus:H.value,resizable:n.resizable})))),te=e.computed((()=>({name:n.name,placeholder:T.value,tabindex:U.value,disabled:n.disabled,readonly:n.readonly,required:n.required,autocomplete:n.autocomplete,minlength:n.minlength,maxlength:n.maxlength,cols:n.cols,rows:n.rows,wrap:n.wrap,spellcheck:n.spellcheck,"aria-invalid":Q.value,"aria-describedby":X.value?R.value:void 0,"aria-errormessage":Y.value?R.value:void 0}))),le=e.computed((()=>({valid:n.valid,invalid:n.invalid,modelValue:n.modelValue,hintLabel:n.hintLabel,maxlength:n.maxlength,minlength:n.minlength,clear:oe})));function oe(){F.value=void 0}return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(ee))},[e.unref(p)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(V),class:"vv-textarea__label"},e.toDisplayString(e.unref(p)),9,_)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",I,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",E,[e.unref(q)?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0},e.unref(q),{class:"vv-textarea__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(V),ref_key:"textarea",ref:s,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(F)?F.value=t:null)},e.unref(te),{onKeyup:l[1]||(l[1]=e=>r("keyup",e))}),null,16,z),[[e.vModelText,e.unref(F)]]),e.unref(D)?(e.openBlock(),e.createBlock(P,e.mergeProps({key:1},e.unref(D),{class:"vv-textarea__icon vv-textarea__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",A,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("span",j,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(le))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(J)),1)]))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(W),{id:e.unref(R),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(Z))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(Z))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(Z))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(Z))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));