@volverjs/ui-vue 0.0.10-beta.5 → 0.0.10-beta.50

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 (496) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +148 -51
  3. package/auto-imports.d.ts +25 -12
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +28 -20
  6. package/dist/Volver.d.ts +11 -11
  7. package/dist/components/VvAccordion/VvAccordion.es.js +192 -104
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +29 -10
  10. package/dist/components/VvAccordion/index.d.ts +8 -9
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +485 -206
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +61 -18
  14. package/dist/components/VvAccordionGroup/index.d.ts +16 -8
  15. package/dist/components/VvAction/VvAction.es.js +84 -33
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +61 -28
  18. package/dist/components/VvAction/index.d.ts +26 -10
  19. package/dist/components/VvAlert/VvAlert.es.js +350 -318
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +25 -17
  22. package/dist/components/VvAlert/index.d.ts +20 -11
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +388 -327
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +22 -17
  26. package/dist/components/VvAlertGroup/index.d.ts +10 -18
  27. package/dist/components/VvAvatar/VvAvatar.es.js +66 -28
  28. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  29. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +13 -5
  30. package/dist/components/VvAvatar/index.d.ts +4 -1
  31. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +147 -74
  32. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  33. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +17 -10
  34. package/dist/components/VvAvatarGroup/index.d.ts +6 -3
  35. package/dist/components/VvBadge/VvBadge.es.js +78 -34
  36. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  37. package/dist/components/VvBadge/VvBadge.vue.d.ts +13 -5
  38. package/dist/components/VvBadge/index.d.ts +4 -1
  39. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +294 -83
  40. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  41. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +28 -8
  42. package/dist/components/VvBreadcrumb/index.d.ts +6 -10
  43. package/dist/components/VvButton/VvButton.es.js +510 -488
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +97 -45
  46. package/dist/components/VvButton/index.d.ts +52 -30
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +95 -45
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +35 -17
  50. package/dist/components/VvButtonGroup/index.d.ts +13 -4
  51. package/dist/components/VvCard/VvCard.es.js +87 -42
  52. package/dist/components/VvCard/VvCard.umd.js +1 -1
  53. package/dist/components/VvCard/VvCard.vue.d.ts +13 -5
  54. package/dist/components/VvCard/index.d.ts +4 -1
  55. package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -136
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -35
  58. package/dist/components/VvCheckbox/index.d.ts +52 -19
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +408 -322
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +103 -34
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +2304 -1992
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +258 -672
  66. package/dist/components/VvCombobox/index.d.ts +377 -135
  67. package/dist/components/VvDialog/VvDialog.es.js +177 -297
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +23 -7
  70. package/dist/components/VvDialog/index.d.ts +12 -0
  71. package/dist/components/VvDropdown/VvDropdown.es.js +172 -102
  72. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  73. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +110 -315
  74. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +77 -28
  75. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
  76. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +13 -5
  77. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +38 -10
  78. package/dist/components/VvDropdown/index.d.ts +52 -118
  79. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +165 -60
  80. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  81. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +337 -10
  82. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  83. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
  84. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  85. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
  86. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.es.js +24 -102
  88. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  89. package/dist/components/VvIcon/VvIcon.vue.d.ts +4 -68
  90. package/dist/components/VvIcon/index.d.ts +33 -48
  91. package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
  92. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  93. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +317 -0
  94. package/dist/components/VvInputFile/index.d.ts +193 -0
  95. package/dist/components/VvInputText/VvInputClearAction.d.ts +16 -10
  96. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +20 -14
  97. package/dist/components/VvInputText/VvInputStepAction.d.ts +11 -7
  98. package/dist/components/VvInputText/VvInputText.es.js +1491 -551
  99. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  100. package/dist/components/VvInputText/VvInputText.vue.d.ts +216 -68
  101. package/dist/components/VvInputText/index.d.ts +101 -31
  102. package/dist/components/VvNav/VvNav.es.js +155 -75
  103. package/dist/components/VvNav/VvNav.umd.js +1 -1
  104. package/dist/components/VvNav/VvNav.vue.d.ts +32 -11
  105. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  106. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  107. package/dist/components/VvNav/index.d.ts +5 -2
  108. package/dist/components/VvNavItem/VvNavItem.es.js +100 -39
  109. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  110. package/dist/components/VvProgress/VvProgress.es.js +73 -27
  111. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  112. package/dist/components/VvProgress/VvProgress.vue.d.ts +13 -6
  113. package/dist/components/VvProgress/index.d.ts +4 -1
  114. package/dist/components/VvRadio/VvRadio.es.js +175 -135
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -33
  117. package/dist/components/VvRadio/index.d.ts +50 -17
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +406 -321
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +103 -34
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +677 -611
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +107 -199
  125. package/dist/components/VvSelect/index.d.ts +196 -16
  126. package/dist/components/VvTab/VvTab.es.js +230 -110
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +34 -12
  129. package/dist/components/VvTab/index.d.ts +6 -3
  130. package/dist/components/VvTextarea/VvTextarea.es.js +606 -597
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +159 -54
  133. package/dist/components/VvTextarea/index.d.ts +69 -20
  134. package/dist/components/VvTooltip/VvTooltip.es.js +83 -30
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +16 -9
  137. package/dist/components/VvTooltip/index.d.ts +5 -2
  138. package/dist/components/common/HintSlot.d.ts +8 -9
  139. package/dist/components/index.d.ts +10 -0
  140. package/dist/components/index.es.js +4086 -2029
  141. package/dist/components/index.umd.js +1 -1
  142. package/dist/composables/alert/useAlerInject.d.ts +4 -0
  143. package/dist/composables/alert/useAlert.d.ts +71 -6
  144. package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
  145. package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
  146. package/dist/composables/dropdown/useDropdownInject.d.ts +12 -0
  147. package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -7
  148. package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
  149. package/dist/composables/group/useGroupStateInject.d.ts +9 -0
  150. package/dist/composables/group/useGroupStateProvide.d.ts +6 -0
  151. package/dist/composables/index.d.ts +3 -0
  152. package/dist/composables/index.es.js +178 -6
  153. package/dist/composables/index.umd.js +1 -1
  154. package/dist/composables/useBlurhash.d.ts +7 -0
  155. package/dist/composables/useComponentFocus.d.ts +2 -2
  156. package/dist/composables/useComponentIcon.d.ts +9 -8
  157. package/dist/composables/useOptions.d.ts +5 -5
  158. package/dist/composables/usePersistence.d.ts +3 -0
  159. package/dist/composables/useUniqueId.d.ts +2 -2
  160. package/dist/composables/useVolver.d.ts +1 -1
  161. package/dist/constants.d.ts +35 -33
  162. package/dist/directives/index.d.ts +3 -5
  163. package/dist/directives/index.es.js +247 -82
  164. package/dist/directives/index.umd.js +1 -1
  165. package/dist/directives/v-contextmenu.es.js +137 -31
  166. package/dist/directives/v-contextmenu.umd.js +1 -1
  167. package/dist/directives/v-tooltip.es.js +101 -39
  168. package/dist/directives/v-tooltip.umd.js +1 -1
  169. package/dist/icons.d.ts +17 -17
  170. package/dist/icons.es.js +516 -516
  171. package/dist/icons.umd.js +1 -1
  172. package/dist/index.d.ts +3 -1
  173. package/dist/index.es.js +74 -6
  174. package/dist/index.umd.js +1 -1
  175. package/dist/props/index.d.ts +277 -193
  176. package/dist/resolvers/unplugin.d.ts +6 -1
  177. package/dist/resolvers/unplugin.es.js +87 -10
  178. package/dist/resolvers/unplugin.umd.js +1 -1
  179. package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
  180. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
  181. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -127
  182. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1304 -538
  183. package/dist/stories/Alert/Alert.settings.d.ts +2 -109
  184. package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
  185. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  186. package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
  187. package/dist/stories/Badge/Badge.settings.d.ts +2 -26
  188. package/dist/stories/Badge/Badge.test.d.ts +1 -1
  189. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  190. package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
  191. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
  192. package/dist/stories/Button/Button.settings.d.ts +2 -194
  193. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
  194. package/dist/stories/Card/Card.settings.d.ts +2 -63
  195. package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
  196. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
  197. package/dist/stories/Combobox/Combobox.settings.d.ts +2 -609
  198. package/dist/stories/Combobox/Combobox.stories.d.ts +1 -0
  199. package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +1 -0
  200. package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
  201. package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
  202. package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
  203. package/dist/stories/Icon/Icon.settings.d.ts +3 -68
  204. package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
  205. package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
  206. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  207. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  208. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  209. package/dist/stories/InputText/InputText.settings.d.ts +2 -438
  210. package/dist/stories/Nav/Nav.settings.d.ts +2 -10
  211. package/dist/stories/Progress/Progress.settings.d.ts +2 -27
  212. package/dist/stories/Radio/Radio.settings.d.ts +1 -110
  213. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
  214. package/dist/stories/Select/Select.settings.d.ts +2 -246
  215. package/dist/stories/Select/Select.stories.d.ts +1 -0
  216. package/dist/stories/Tab/Tab.settings.d.ts +2 -15
  217. package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
  218. package/dist/stories/argTypes.d.ts +27 -866
  219. package/dist/test/expect.d.ts +1 -2
  220. package/dist/test/options.d.ts +1 -1
  221. package/dist/test/sleep.d.ts +1 -1
  222. package/dist/types/alert.d.ts +9 -7
  223. package/dist/types/blurhash.d.ts +12 -0
  224. package/dist/types/floating-ui.d.ts +1 -1
  225. package/dist/types/generic.d.ts +1 -2
  226. package/dist/types/group.d.ts +37 -15
  227. package/dist/types/index.d.ts +7 -0
  228. package/dist/types/input-file.d.ts +9 -0
  229. package/dist/types/nav.d.ts +2 -2
  230. package/dist/utils/DomUtilities.d.ts +1 -0
  231. package/dist/utils/ObjectUtilities.d.ts +8 -9
  232. package/dist/workers/blurhash.d.ts +1 -0
  233. package/package.json +238 -246
  234. package/src/Volver.ts +251 -246
  235. package/src/assets/icons/detailed.json +1 -1
  236. package/src/assets/icons/normal.json +1 -1
  237. package/src/assets/icons/simple.json +1 -1
  238. package/src/components/VvAccordion/VvAccordion.vue +163 -100
  239. package/src/components/VvAccordion/index.ts +65 -80
  240. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +224 -106
  241. package/src/components/VvAccordionGroup/index.ts +42 -42
  242. package/src/components/VvAction/VvAction.vue +144 -130
  243. package/src/components/VvAlert/VvAlert.vue +72 -70
  244. package/src/components/VvAlert/index.ts +149 -147
  245. package/src/components/VvAlertGroup/VvAlertGroup.vue +57 -56
  246. package/src/components/VvAlertGroup/index.ts +102 -118
  247. package/src/components/VvAvatar/VvAvatar.vue +20 -14
  248. package/src/components/VvAvatar/index.ts +5 -5
  249. package/src/components/VvAvatarGroup/VvAvatarGroup.vue +58 -53
  250. package/src/components/VvAvatarGroup/index.ts +21 -21
  251. package/src/components/VvBadge/VvBadge.vue +15 -14
  252. package/src/components/VvBadge/index.ts +2 -2
  253. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +50 -48
  254. package/src/components/VvBreadcrumb/index.ts +3 -9
  255. package/src/components/VvButton/VvButton.vue +163 -152
  256. package/src/components/VvButton/index.ts +104 -111
  257. package/src/components/VvButtonGroup/VvButtonGroup.vue +73 -65
  258. package/src/components/VvButtonGroup/index.ts +23 -22
  259. package/src/components/VvCard/VvCard.vue +30 -30
  260. package/src/components/VvCard/index.ts +2 -2
  261. package/src/components/VvCheckbox/VvCheckbox.vue +186 -184
  262. package/src/components/VvCheckbox/index.ts +45 -45
  263. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +88 -87
  264. package/src/components/VvCombobox/VvCombobox.vue +655 -619
  265. package/src/components/VvCombobox/index.ts +210 -168
  266. package/src/components/VvDialog/VvDialog.vue +139 -129
  267. package/src/components/VvDialog/index.ts +42 -36
  268. package/src/components/VvDropdown/VvDropdown.vue +466 -445
  269. package/src/components/VvDropdown/VvDropdownAction.vue +37 -39
  270. package/src/components/VvDropdown/VvDropdownItem.vue +30 -26
  271. package/src/components/VvDropdown/VvDropdownOptgroup.vue +13 -12
  272. package/src/components/VvDropdown/VvDropdownOption.vue +47 -64
  273. package/src/components/VvDropdown/index.ts +61 -27
  274. package/src/components/VvIcon/README.md +1 -1
  275. package/src/components/VvIcon/VvIcon.vue +133 -133
  276. package/src/components/VvIcon/index.ts +84 -97
  277. package/src/components/VvInputFile/VvInputFile.vue +413 -0
  278. package/src/components/VvInputFile/index.ts +143 -0
  279. package/src/components/VvInputText/VvInputClearAction.ts +51 -47
  280. package/src/components/VvInputText/VvInputPasswordAction.ts +66 -62
  281. package/src/components/VvInputText/VvInputStepAction.ts +43 -43
  282. package/src/components/VvInputText/VvInputText.vue +652 -516
  283. package/src/components/VvInputText/VvInputTextActions.ts +87 -87
  284. package/src/components/VvInputText/index.ts +201 -186
  285. package/src/components/VvNav/VvNav.vue +40 -36
  286. package/src/components/VvNav/VvNavItem.vue +12 -12
  287. package/src/components/VvNav/VvNavSeparator.vue +6 -6
  288. package/src/components/VvNav/index.ts +2 -2
  289. package/src/components/VvProgress/VvProgress.vue +27 -27
  290. package/src/components/VvProgress/index.ts +28 -28
  291. package/src/components/VvRadio/VvRadio.vue +115 -112
  292. package/src/components/VvRadio/index.ts +29 -29
  293. package/src/components/VvRadioGroup/VvRadioGroup.vue +91 -90
  294. package/src/components/VvSelect/VvSelect.vue +262 -241
  295. package/src/components/VvSelect/index.ts +88 -63
  296. package/src/components/VvTab/VvTab.vue +79 -69
  297. package/src/components/VvTab/index.ts +13 -13
  298. package/src/components/VvTextarea/VvTextarea.vue +218 -219
  299. package/src/components/VvTextarea/index.ts +35 -35
  300. package/src/components/VvTooltip/VvTooltip.vue +22 -16
  301. package/src/components/VvTooltip/index.ts +12 -12
  302. package/src/components/common/HintSlot.ts +151 -152
  303. package/src/components/index.ts +10 -0
  304. package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +1 -1
  305. package/src/composables/alert/useAlert.ts +76 -73
  306. package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +12 -12
  307. package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
  308. package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +6 -6
  309. package/src/composables/dropdown/useDropdownProvide.ts +94 -0
  310. package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
  311. package/src/composables/group/useGroupStateInject.ts +55 -0
  312. package/src/composables/group/useGroupStateProvide.ts +14 -0
  313. package/src/composables/index.ts +3 -0
  314. package/src/composables/useBlurhash.ts +68 -0
  315. package/src/composables/useComponentFocus.ts +9 -9
  316. package/src/composables/useComponentIcon.ts +36 -35
  317. package/src/composables/useDebouncedInput.ts +25 -25
  318. package/src/composables/useDefaults.ts +81 -80
  319. package/src/composables/useModifiers.ts +29 -29
  320. package/src/composables/useOptions.ts +51 -42
  321. package/src/composables/usePersistence.ts +74 -0
  322. package/src/composables/useTextCount.ts +46 -46
  323. package/src/composables/useUniqueId.ts +4 -4
  324. package/src/composables/useVolver.ts +1 -1
  325. package/src/constants.ts +98 -83
  326. package/src/directives/index.ts +3 -6
  327. package/src/directives/v-contextmenu.ts +26 -34
  328. package/src/directives/v-tooltip.ts +20 -11
  329. package/src/icons.ts +2 -2
  330. package/src/index.ts +6 -4
  331. package/src/props/index.ts +461 -384
  332. package/src/resolvers/unplugin.ts +154 -144
  333. package/src/shims.d.ts +4 -5
  334. package/src/stories/Accordion/Accordion.settings.ts +51 -50
  335. package/src/stories/Accordion/Accordion.stories.ts +21 -21
  336. package/src/stories/Accordion/Accordion.test.ts +56 -54
  337. package/src/stories/Accordion/AccordionSlots.stories.ts +13 -13
  338. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +70 -67
  339. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +41 -39
  340. package/src/stories/AccordionGroup/AccordionGroup.test.ts +49 -45
  341. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +36 -36
  342. package/src/stories/Alert/Alert.settings.ts +117 -116
  343. package/src/stories/Alert/Alert.stories.ts +30 -30
  344. package/src/stories/Alert/Alert.test.ts +78 -80
  345. package/src/stories/Alert/AlertModifiers.stories.ts +45 -45
  346. package/src/stories/Alert/AlertSlots.stories.ts +35 -35
  347. package/src/stories/AlertGroup/AlertGroup.settings.ts +107 -105
  348. package/src/stories/AlertGroup/AlertGroup.stories.ts +25 -25
  349. package/src/stories/AlertGroup/AlertGroup.test.ts +69 -71
  350. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +68 -68
  351. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +23 -23
  352. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +58 -58
  353. package/src/stories/Avatar/Avatar.settings.ts +29 -29
  354. package/src/stories/Avatar/Avatar.stories.ts +22 -22
  355. package/src/stories/Avatar/Avatar.test.ts +22 -24
  356. package/src/stories/Avatar/AvatarBadge.stories.ts +15 -15
  357. package/src/stories/Avatar/AvatarModifiers.stories.ts +60 -60
  358. package/src/stories/Avatar/AvatarSlots.stories.ts +17 -17
  359. package/src/stories/AvatarGroup/AvatarGroup.settings.ts +54 -53
  360. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +17 -17
  361. package/src/stories/AvatarGroup/AvatarGroup.test.ts +24 -26
  362. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +15 -15
  363. package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +17 -17
  364. package/src/stories/Badge/Badge.settings.ts +21 -20
  365. package/src/stories/Badge/Badge.stories.ts +24 -24
  366. package/src/stories/Badge/Badge.test.ts +8 -8
  367. package/src/stories/Badge/BadgeSlots.stories.ts +10 -10
  368. package/src/stories/Blurhash/BlurhashComposable.stories.ts +116 -0
  369. package/src/stories/Breadcrumb/Breadcrumb.settings.ts +35 -34
  370. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +23 -23
  371. package/src/stories/Breadcrumb/Breadcrumb.test.ts +44 -43
  372. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +19 -19
  373. package/src/stories/Button/Button.settings.ts +147 -151
  374. package/src/stories/Button/Button.stories.ts +19 -19
  375. package/src/stories/Button/Button.test.ts +41 -42
  376. package/src/stories/Button/ButtonIcon.stories.ts +42 -42
  377. package/src/stories/Button/ButtonLink.stories.ts +24 -24
  378. package/src/stories/Button/ButtonLoading.stories.ts +22 -22
  379. package/src/stories/Button/ButtonModifiers.stories.ts +91 -91
  380. package/src/stories/Button/ButtonSlots.stories.ts +47 -47
  381. package/src/stories/Button/ButtonState.stories.ts +23 -23
  382. package/src/stories/Button/ButtonToggle.stories.ts +30 -30
  383. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +33 -24
  384. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +19 -19
  385. package/src/stories/ButtonGroup/ButtonGroup.test.ts +23 -26
  386. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +20 -20
  387. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +17 -17
  388. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +22 -22
  389. package/src/stories/Card/Card.settings.ts +49 -48
  390. package/src/stories/Card/Card.stories.ts +22 -22
  391. package/src/stories/Card/Card.test.ts +14 -16
  392. package/src/stories/Card/CardSlots.stories.ts +42 -42
  393. package/src/stories/Checkbox/Checkbox.settings.ts +36 -35
  394. package/src/stories/Checkbox/Checkbox.stories.ts +57 -57
  395. package/src/stories/Checkbox/Checkbox.test.ts +63 -66
  396. package/src/stories/Checkbox/CheckboxBinary.stories.ts +18 -18
  397. package/src/stories/Checkbox/CheckboxSlots.stories.ts +15 -15
  398. package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +9 -9
  399. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +50 -50
  400. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +64 -68
  401. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +34 -34
  402. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +23 -23
  403. package/src/stories/Combobox/Combobox.settings.ts +408 -385
  404. package/src/stories/Combobox/Combobox.stories.ts +116 -107
  405. package/src/stories/Combobox/Combobox.test.ts +92 -92
  406. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +25 -24
  407. package/src/stories/Combobox/ComboboxMultiple.stories.ts +32 -22
  408. package/src/stories/Combobox/ComboboxOptions.stories.ts +81 -84
  409. package/src/stories/Combobox/ComboboxSlots.stories.ts +55 -54
  410. package/src/stories/Dialog/Dialog.settings.ts +49 -40
  411. package/src/stories/Dialog/Dialog.stories.ts +28 -28
  412. package/src/stories/Dialog/Dialog.test.ts +49 -54
  413. package/src/stories/Dialog/DialogModifiers.stories.ts +42 -0
  414. package/src/stories/Dialog/DialogSlots.stories.ts +20 -20
  415. package/src/stories/Dropdown/Dropdown.settings.ts +62 -61
  416. package/src/stories/Dropdown/Dropdown.stories.ts +60 -60
  417. package/src/stories/Dropdown/Dropdown.test.ts +9 -13
  418. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +18 -19
  419. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +19 -19
  420. package/src/stories/Dropdown/DropdownSlots.stories.ts +51 -51
  421. package/src/stories/Icon/Icon.settings.ts +66 -65
  422. package/src/stories/Icon/Icon.stories.ts +29 -30
  423. package/src/stories/Icon/IconsCollection.stories.ts +24 -24
  424. package/src/stories/InputFile/InputFile.settings.ts +37 -0
  425. package/src/stories/InputFile/InputFile.stories.ts +97 -0
  426. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  427. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  428. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  429. package/src/stories/InputText/InputText.settings.ts +248 -246
  430. package/src/stories/InputText/InputText.stories.ts +68 -68
  431. package/src/stories/InputText/InputText.test.ts +119 -122
  432. package/src/stories/InputText/InputTextIconPosition.stories.ts +24 -24
  433. package/src/stories/InputText/InputTextLength.stories.ts +33 -33
  434. package/src/stories/InputText/InputTextMask.stories.ts +91 -91
  435. package/src/stories/InputText/InputTextMinMax.stories.ts +30 -30
  436. package/src/stories/InputText/InputTextSlots.stories.ts +20 -20
  437. package/src/stories/InputText/InputTextType.stories.ts +70 -70
  438. package/src/stories/Nav/Nav.settings.ts +27 -27
  439. package/src/stories/Nav/Nav.stories.ts +18 -18
  440. package/src/stories/Nav/Nav.test.ts +10 -12
  441. package/src/stories/Nav/NavModifiers.stories.ts +25 -25
  442. package/src/stories/Progress/Progress.settings.ts +24 -23
  443. package/src/stories/Progress/Progress.stories.ts +23 -23
  444. package/src/stories/Progress/Progress.test.ts +5 -5
  445. package/src/stories/Radio/Radio.settings.ts +9 -9
  446. package/src/stories/Radio/Radio.stories.ts +47 -47
  447. package/src/stories/Radio/Radio.test.ts +54 -57
  448. package/src/stories/Radio/RadioSlots.stories.ts +15 -15
  449. package/src/stories/RadioGroup/RadioGroup.settings.ts +9 -9
  450. package/src/stories/RadioGroup/RadioGroup.stories.ts +51 -52
  451. package/src/stories/RadioGroup/RadioGroup.test.ts +64 -68
  452. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +35 -35
  453. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +23 -23
  454. package/src/stories/Select/Select.settings.ts +72 -71
  455. package/src/stories/Select/Select.stories.ts +75 -66
  456. package/src/stories/Select/Select.test.ts +67 -70
  457. package/src/stories/Select/SelectIconPosition.stories.ts +27 -26
  458. package/src/stories/Select/SelectOptions.stories.ts +55 -55
  459. package/src/stories/Select/SelectSlots.stories.ts +21 -20
  460. package/src/stories/Tab/Tab.settings.ts +34 -34
  461. package/src/stories/Tab/Tab.stories.ts +16 -16
  462. package/src/stories/Tab/Tab.test.ts +17 -19
  463. package/src/stories/Textarea/Textarea.settings.ts +80 -78
  464. package/src/stories/Textarea/Textarea.stories.ts +63 -63
  465. package/src/stories/Textarea/Textarea.test.ts +70 -73
  466. package/src/stories/Textarea/TextareaLength.stories.ts +33 -33
  467. package/src/stories/Textarea/TextareaSlots.stories.ts +20 -20
  468. package/src/stories/Textarea/TextareatIconPosition.stories.ts +24 -24
  469. package/src/stories/Tooltip/Tooltip.settings.ts +16 -17
  470. package/src/stories/Tooltip/Tooltip.stories.ts +18 -18
  471. package/src/stories/Tooltip/Tooltip.test.ts +53 -54
  472. package/src/stories/Tooltip/TooltipDirective.stories.ts +37 -37
  473. package/src/stories/argTypes.ts +506 -505
  474. package/src/test/expect.ts +74 -79
  475. package/src/test/options.ts +17 -16
  476. package/src/test/sleep.ts +3 -2
  477. package/src/test/types.d.ts +12 -12
  478. package/src/types/alert.ts +21 -17
  479. package/src/types/blurhash.ts +21 -0
  480. package/src/types/floating-ui.ts +1 -1
  481. package/src/types/generic.ts +2 -3
  482. package/src/types/group.ts +35 -27
  483. package/src/types/index.ts +7 -0
  484. package/src/types/input-file.ts +10 -0
  485. package/src/types/nav.ts +13 -14
  486. package/src/utils/DomUtilities.ts +15 -0
  487. package/src/utils/ObjectUtilities.ts +192 -188
  488. package/src/workers/blurhash.ts +9 -0
  489. package/dist/composables/alert/useInjectAlert.d.ts +0 -9
  490. package/dist/composables/dropdown/useInjectDropdown.d.ts +0 -32
  491. package/dist/composables/group/useInjectedGroupState.d.ts +0 -10
  492. package/dist/composables/group/useProvideGroupState.d.ts +0 -6
  493. package/src/composables/dropdown/useProvideDropdown.ts +0 -94
  494. package/src/composables/group/useInjectedGroupState.ts +0 -51
  495. package/src/composables/group/useProvideGroupState.ts +0 -20
  496. /package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
@@ -1,225 +1,11 @@
1
- import { unref, computed, isRef, defineComponent, h, inject, 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 VvIconProps = {
130
- /**
131
- * Color
132
- */
133
- color: String,
134
- /**
135
- * Width
136
- */
137
- width: {
138
- type: [String, Number]
139
- },
140
- /**
141
- * Height
142
- */
143
- height: {
144
- type: [String, Number]
145
- },
146
- /**
147
- * Icon name
148
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
149
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
150
- */
151
- name: {
152
- type: String,
153
- required: true
154
- },
155
- /**
156
- * By default 'vv'
157
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
158
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
159
- */
160
- provider: {
161
- type: String
162
- },
163
- /**
164
- * The name of icon set.
165
- * Icon default options prefix: simple | normal | detailed
166
- */
167
- prefix: {
168
- type: String,
169
- default: "normal"
170
- },
171
- /**
172
- * Url remote SVG icon
173
- */
174
- src: String,
175
- /**
176
- * Horizontal flip
177
- */
178
- horizontalFlip: Boolean,
179
- /**
180
- * Vertical flip
181
- */
182
- verticalFlip: Boolean,
183
- /**
184
- * String alternative to "horizontalFlip" and "verticalFlip".
185
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
186
- */
187
- flip: String,
188
- /**
189
- * Icon render mode
190
- * 'style' = 'bg' or 'mask', depending on icon content
191
- * 'bg' = span with style using `background`
192
- * 'mask' = span with style using `mask`
193
- * 'svg' = svg
194
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
195
- */
196
- mode: String,
197
- /**
198
- * Toggles inline or block mode
199
- * Example https://docs.iconify.design/icon-components/vue/inline.html
200
- */
201
- inline: Boolean,
202
- /**
203
- * rotates icon
204
- * Example https://docs.iconify.design/icon-components/vue/transform.html
205
- */
206
- rotate: [Number, String],
207
- /**
208
- * A callback that is called when icon data has been loaded
209
- */
210
- onLoad: Function,
211
- /**
212
- * SVG icon string
213
- */
214
- svg: String,
215
- /**
216
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
217
- * @values string | string[]
218
- */
219
- modifiers: {
220
- type: [String, Array]
221
- }
222
- };
4
+ var StorageType = /* @__PURE__ */ ((StorageType2) => {
5
+ StorageType2["local"] = "local";
6
+ StorageType2["session"] = "session";
7
+ return StorageType2;
8
+ })(StorageType || {});
223
9
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
224
10
  Strategy2["absolute"] = "absolute";
225
11
  Strategy2["fixed"] = "fixed";
@@ -254,136 +40,14 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
254
40
  ButtonType2["reset"] = "reset";
255
41
  return ButtonType2;
256
42
  })(ButtonType || {});
257
- var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
258
- AnchorTarget2["_blank"] = "_blank";
259
- AnchorTarget2["_self"] = "_self";
260
- AnchorTarget2["_parent"] = "_parent";
261
- AnchorTarget2["_top"] = "_top";
262
- return AnchorTarget2;
263
- })(AnchorTarget || {});
43
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
44
+ ActionTag2["nuxtLink"] = "nuxt-link";
45
+ ActionTag2["routerLink"] = "router-link";
46
+ ActionTag2["a"] = "a";
47
+ ActionTag2["button"] = "button";
48
+ return ActionTag2;
49
+ })(ActionTag || {});
264
50
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
265
- function useVolver() {
266
- return inject(INJECTION_KEY_VOLVER);
267
- }
268
- function useModifiers(prefix, modifiers, others) {
269
- return computed(() => {
270
- const toReturn = {
271
- [prefix]: true
272
- };
273
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
274
- if (modifiersArray) {
275
- if (Array.isArray(modifiersArray)) {
276
- modifiersArray.forEach((modifier) => {
277
- if (modifier) {
278
- toReturn[`${prefix}--${modifier}`] = true;
279
- }
280
- });
281
- }
282
- }
283
- if (others) {
284
- Object.keys(others.value).forEach((key) => {
285
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
286
- });
287
- }
288
- return toReturn;
289
- });
290
- }
291
- const __default__$1 = {
292
- name: "VvIcon"
293
- };
294
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
295
- ...__default__$1,
296
- props: VvIconProps,
297
- setup(__props) {
298
- const props = __props;
299
- const hasRotate = computed(() => {
300
- if (typeof props.rotate === "string") {
301
- return parseFloat(props.rotate);
302
- }
303
- return props.rotate;
304
- });
305
- const show = ref(true);
306
- const volver = useVolver();
307
- const { modifiers } = toRefs(props);
308
- const bemCssClasses = useModifiers("vv-icon", modifiers);
309
- const provider = computed(() => {
310
- return props.provider || (volver == null ? void 0 : volver.iconsProvider);
311
- });
312
- const icon = computed(() => {
313
- const name = props.name ?? "";
314
- const iconName = `@${provider.value}:${props.prefix}:${name}`;
315
- if (iconExists(iconName)) {
316
- return iconName;
317
- }
318
- const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
319
- (iconsCollection2) => {
320
- const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
321
- return iconExists(icon2);
322
- }
323
- );
324
- if (iconsCollection) {
325
- return `@${provider.value}:${iconsCollection.prefix}:${name}`;
326
- }
327
- return name;
328
- });
329
- function getSvgContent(svg) {
330
- let dom;
331
- if (typeof window === "undefined") {
332
- const { JSDOM } = require("jsdom");
333
- dom = new JSDOM().window;
334
- }
335
- const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
336
- const svgDomString = domParser.parseFromString(svg, "text/html");
337
- const svgEl = svgDomString.querySelector("svg");
338
- return svgEl;
339
- }
340
- function addIconFromSvg(svg) {
341
- const svgContentEl = getSvgContent(svg);
342
- const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
343
- if (svgContentEl && svgContent) {
344
- addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
345
- body: svgContent,
346
- // Set height and width from svg content
347
- height: svgContentEl.viewBox.baseVal.height,
348
- width: svgContentEl.viewBox.baseVal.width
349
- });
350
- }
351
- }
352
- if (volver) {
353
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
354
- show.value = false;
355
- volver.fetchIcon(props.src).then((svg) => {
356
- if (svg) {
357
- addIconFromSvg(svg);
358
- show.value = true;
359
- }
360
- }).catch((e) => {
361
- throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
362
- });
363
- }
364
- }
365
- if (props.svg) {
366
- addIconFromSvg(props.svg);
367
- }
368
- return (_ctx, _cache) => {
369
- return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
370
- key: 0,
371
- class: unref(bemCssClasses)
372
- }, {
373
- inline: _ctx.inline,
374
- width: _ctx.width,
375
- height: _ctx.height,
376
- horizontalFlip: _ctx.horizontalFlip,
377
- verticalFlip: _ctx.verticalFlip,
378
- flip: _ctx.flip,
379
- rotate: unref(hasRotate),
380
- color: _ctx.color,
381
- onLoad: _ctx.onLoad,
382
- icon: unref(icon)
383
- }), null, 16, ["class"])) : createCommentVNode("", true);
384
- };
385
- }
386
- });
387
51
  const LinkProps = {
388
52
  /**
389
53
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -399,10 +63,7 @@ const LinkProps = {
399
63
  /**
400
64
  * Anchor target
401
65
  */
402
- target: {
403
- type: String,
404
- validator: (value) => Object.values(AnchorTarget).includes(value)
405
- },
66
+ target: String,
406
67
  /**
407
68
  * Anchor rel
408
69
  */
@@ -415,27 +76,33 @@ const ValidProps = {
415
76
  /**
416
77
  * Valid status
417
78
  */
418
- valid: Boolean,
79
+ valid: { type: Boolean, default: false },
419
80
  /**
420
81
  * Valid label
421
82
  */
422
- validLabel: [String, Array]
83
+ validLabel: { type: [String, Array], default: void 0 }
423
84
  };
424
85
  const InvalidProps = {
425
86
  /**
426
87
  * Invalid status
427
88
  */
428
- invalid: Boolean,
89
+ invalid: {
90
+ type: Boolean,
91
+ default: false
92
+ },
429
93
  /**
430
94
  * Invalid label
431
95
  */
432
- invalidLabel: [String, Array]
96
+ invalidLabel: { type: [String, Array], default: void 0 }
433
97
  };
434
98
  const LoadingProps = {
435
99
  /**
436
100
  * Loading status
437
101
  */
438
- loading: Boolean,
102
+ loading: {
103
+ type: Boolean,
104
+ default: false
105
+ },
439
106
  /**
440
107
  * Loading label
441
108
  */
@@ -448,43 +115,64 @@ const DisabledProps = {
448
115
  /**
449
116
  * Whether the form control is disabled
450
117
  */
451
- disabled: Boolean
118
+ disabled: {
119
+ type: Boolean,
120
+ default: false
121
+ }
452
122
  };
453
123
  const ActiveProps = {
454
124
  /**
455
125
  * Whether the item is active
456
126
  */
457
- active: Boolean
127
+ active: {
128
+ type: Boolean,
129
+ default: false
130
+ }
458
131
  };
459
132
  const CurrentProps = {
460
133
  /**
461
134
  * Whether the item is current
462
135
  */
463
- current: Boolean
136
+ current: {
137
+ type: Boolean,
138
+ default: false
139
+ }
464
140
  };
465
141
  const PressedProps = {
466
142
  /**
467
143
  * Whether the item is pressed
468
144
  */
469
- pressed: Boolean
145
+ pressed: {
146
+ type: Boolean,
147
+ default: false
148
+ }
470
149
  };
471
150
  const LabelProps = {
472
151
  /**
473
152
  * The item label
474
153
  */
475
- label: [String, Number]
154
+ label: {
155
+ type: [String, Number],
156
+ default: void 0
157
+ }
476
158
  };
477
159
  const ReadonlyProps = {
478
160
  /**
479
161
  * The value is not editable
480
162
  */
481
- readonly: Boolean
163
+ readonly: {
164
+ type: Boolean,
165
+ default: false
166
+ }
482
167
  };
483
168
  const ModifiersProps = {
484
169
  /**
485
170
  * Component BEM modifiers
486
171
  */
487
- modifiers: [String, Array]
172
+ modifiers: {
173
+ type: [String, Array],
174
+ default: void 0
175
+ }
488
176
  };
489
177
  const HintProps = {
490
178
  hintLabel: { type: String, default: "" }
@@ -503,14 +191,20 @@ const DebounceProps = {
503
191
  /**
504
192
  * Milliseconds to wait before emitting the input event
505
193
  */
506
- debounce: [Number, String]
194
+ debounce: {
195
+ type: [Number, String],
196
+ default: void 0
197
+ }
507
198
  };
508
199
  const IconProps = {
509
200
  /**
510
201
  * VvIcon name or props
511
202
  * @see VVIcon
512
203
  */
513
- icon: { type: [String, Object] },
204
+ icon: {
205
+ type: [String, Object],
206
+ default: void 0
207
+ },
514
208
  /**
515
209
  * VvIcon position
516
210
  */
@@ -531,7 +225,10 @@ const FloatingLabelProps = {
531
225
  /**
532
226
  * If true the label will be floating
533
227
  */
534
- floating: Boolean
228
+ floating: {
229
+ type: Boolean,
230
+ default: false
231
+ }
535
232
  };
536
233
  const IdProps = {
537
234
  /**
@@ -561,7 +258,8 @@ const IdProps = {
561
258
  * Dropdown show / hide transition name
562
259
  */
563
260
  transitionName: {
564
- type: String
261
+ type: String,
262
+ default: void 0
565
263
  },
566
264
  /**
567
265
  * Offset of the dropdown from the trigger
@@ -629,7 +327,8 @@ const IdProps = {
629
327
  * Set dropdown width to the same as the trigger
630
328
  */
631
329
  triggerWidth: {
632
- type: Boolean
330
+ type: Boolean,
331
+ default: false
633
332
  }
634
333
  });
635
334
  const IdNameProps = {
@@ -646,7 +345,10 @@ const AutofocusProps = {
646
345
  * Global attribute autofocus
647
346
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
648
347
  */
649
- autofocus: Boolean
348
+ autofocus: {
349
+ type: Boolean,
350
+ default: false
351
+ }
650
352
  };
651
353
  const AutocompleteProps = {
652
354
  /**
@@ -655,117 +357,405 @@ const AutocompleteProps = {
655
357
  */
656
358
  autocomplete: { type: String, default: "off" }
657
359
  };
658
- const InputTextareaProps = {
659
- ...IdNameProps,
660
- ...AutofocusProps,
661
- ...AutocompleteProps,
662
- ...TabindexProps,
663
- ...DisabledProps,
664
- ...ReadonlyProps,
665
- ...ValidProps,
666
- ...InvalidProps,
667
- ...HintProps,
668
- ...LoadingProps,
669
- ...ModifiersProps,
670
- ...CountProps,
671
- ...DebounceProps,
672
- ...IconProps,
673
- ...FloatingLabelProps,
674
- ...LabelProps,
675
- /**
676
- * Input / Textarea minlength
677
- * Minimum length (number of characters) of value
678
- * Available for input types: text, search, url, tel, email, password
679
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
680
- */
681
- minlength: [String, Number],
682
- /**
683
- * Input / Textarea maxlength
684
- * Maximum length (number of characters) of value
685
- * Available for input types: text, search, url, tel, email, password
686
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
687
- */
688
- maxlength: [String, Number],
689
- /**
690
- * Input / Textarea placeholder
691
- * Text that appears in the form control when it has no value set
692
- * Available for input types: text, search, url, tel, email, password, number
693
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
694
- */
695
- placeholder: String,
696
- /**
697
- * Input / Textarea required
698
- * A value is required or must be check for the form to be submittable
699
- * Available for all input types except color
700
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
701
- */
702
- required: Boolean
360
+ const InputTextareaProps = {
361
+ ...IdNameProps,
362
+ ...AutofocusProps,
363
+ ...AutocompleteProps,
364
+ ...TabindexProps,
365
+ ...DisabledProps,
366
+ ...ReadonlyProps,
367
+ ...ValidProps,
368
+ ...InvalidProps,
369
+ ...HintProps,
370
+ ...LoadingProps,
371
+ ...ModifiersProps,
372
+ ...CountProps,
373
+ ...DebounceProps,
374
+ ...IconProps,
375
+ ...FloatingLabelProps,
376
+ ...LabelProps,
377
+ /**
378
+ * Input / Textarea minlength
379
+ * Minimum length (number of characters) of value
380
+ * Available for input types: text, search, url, tel, email, password
381
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
382
+ */
383
+ minlength: { type: [String, Number], default: void 0 },
384
+ /**
385
+ * Input / Textarea maxlength
386
+ * Maximum length (number of characters) of value
387
+ * Available for input types: text, search, url, tel, email, password
388
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
389
+ */
390
+ maxlength: { type: [String, Number], default: void 0 },
391
+ /**
392
+ * Input / Textarea placeholder
393
+ * Text that appears in the form control when it has no value set
394
+ * Available for input types: text, search, url, tel, email, password, number
395
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
396
+ */
397
+ placeholder: {
398
+ type: String,
399
+ default: void 0
400
+ },
401
+ /**
402
+ * Input / Textarea required
403
+ * A value is required or must be check for the form to be submittable
404
+ * Available for all input types except color
405
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
406
+ */
407
+ required: {
408
+ type: Boolean,
409
+ default: false
410
+ }
411
+ };
412
+ ({
413
+ ...DisabledProps,
414
+ ...LabelProps,
415
+ ...PressedProps,
416
+ ...ActiveProps,
417
+ ...CurrentProps,
418
+ ...LinkProps,
419
+ /**
420
+ * Button type
421
+ */
422
+ type: {
423
+ type: String,
424
+ default: ButtonType.button,
425
+ validator: (value) => Object.values(ButtonType).includes(value)
426
+ },
427
+ /**
428
+ * Button aria-label
429
+ */
430
+ ariaLabel: {
431
+ type: String,
432
+ default: void 0
433
+ },
434
+ /**
435
+ * Default tag for the action
436
+ */
437
+ defaultTag: {
438
+ type: String,
439
+ default: ActionTag.button
440
+ }
441
+ });
442
+ ({
443
+ storageType: {
444
+ type: String,
445
+ default: StorageType.local,
446
+ validator: (value) => Object.values(StorageType).includes(value)
447
+ },
448
+ storageKey: String
449
+ });
450
+ const WRAP = {
451
+ hard: "hard",
452
+ soft: "soft"
453
+ };
454
+ const SPELLCHECK = {
455
+ true: true,
456
+ false: false,
457
+ default: "default"
458
+ };
459
+ const VvTextareaEvents = ["update:modelValue", "focus", "blur", "keyup"];
460
+ const VvTextareaProps = {
461
+ ...InputTextareaProps,
462
+ /**
463
+ * Textarea value
464
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
465
+ */
466
+ modelValue: String,
467
+ /**
468
+ * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
469
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
470
+ */
471
+ cols: { type: [String, Number], default: 20 },
472
+ /**
473
+ * The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
474
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
475
+ */
476
+ rows: { type: [String, Number], default: 2 },
477
+ /**
478
+ * Indicates how the control should wrap the value for form submission.
479
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
480
+ */
481
+ wrap: { type: String, default: WRAP.soft },
482
+ /**
483
+ * Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
484
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
485
+ */
486
+ spellcheck: { type: [Boolean, String], default: SPELLCHECK.default },
487
+ /**
488
+ * If true, the textarea will be resizable
489
+ */
490
+ resizable: Boolean
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"
703
648
  };
704
- ({
705
- ...DisabledProps,
706
- ...LabelProps,
707
- ...PressedProps,
708
- ...ActiveProps,
709
- ...CurrentProps,
710
- ...LinkProps,
711
- /**
712
- * Button type
713
- */
714
- type: {
715
- type: String,
716
- default: ButtonType.button,
717
- validator: (value) => Object.values(ButtonType).includes(value)
718
- },
719
- /**
720
- * Button aria-label
721
- */
722
- ariaLabel: {
723
- type: String,
724
- default: void 0
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
+ };
725
757
  }
726
758
  });
727
- const WRAP = {
728
- hard: "hard",
729
- soft: "soft"
730
- };
731
- const SPELLCHECK = {
732
- true: true,
733
- false: false,
734
- default: "default"
735
- };
736
- const VvTextareaEvents = ["update:modelValue", "focus", "blur", "keyup"];
737
- const VvTextareaProps = {
738
- ...InputTextareaProps,
739
- /**
740
- * Textarea value
741
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
742
- */
743
- modelValue: String,
744
- /**
745
- * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
746
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
747
- */
748
- cols: { type: [String, Number], default: 20 },
749
- /**
750
- * The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
751
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
752
- */
753
- rows: { type: [String, Number], default: 2 },
754
- /**
755
- * Indicates how the control should wrap the value for form submission.
756
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
757
- */
758
- wrap: { type: String, default: WRAP.soft },
759
- /**
760
- * Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
761
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
762
- */
763
- spellcheck: { type: [Boolean, String], default: SPELLCHECK.default },
764
- /**
765
- * If true, the textarea will be resizable
766
- */
767
- resizable: Boolean
768
- };
769
759
  function useDefaults(componentName, propsDefinition, props) {
770
760
  const volver = useVolver();
771
761
  const volverComponentDefaults = computed(() => {
@@ -819,14 +809,16 @@ function useDefaults(componentName, propsDefinition, props) {
819
809
  }, {});
820
810
  });
821
811
  }
822
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
812
+ function useUniqueId(id) {
813
+ return computed(() => String((id == null ? void 0 : id.value) || useId()));
814
+ }
823
815
  function useDebouncedInput(modelValue, emit, ms = 0, {
824
816
  getter = (value) => value,
825
817
  setter = (value) => value
826
818
  } = {}) {
827
819
  let timeout;
828
820
  if (typeof ms === "string") {
829
- ms = parseInt(ms);
821
+ ms = Number.parseInt(ms);
830
822
  }
831
823
  return computed({
832
824
  get: () => getter(modelValue == null ? void 0 : modelValue.value),
@@ -841,30 +833,30 @@ function useDebouncedInput(modelValue, emit, ms = 0, {
841
833
  });
842
834
  }
843
835
  function useComponentIcon(icon, iconPosition) {
836
+ const hasIcon = computed(() => {
837
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
838
+ return { name: icon == null ? void 0 : icon.value };
839
+ }
840
+ return icon == null ? void 0 : icon.value;
841
+ });
844
842
  const hasIconBefore = computed(
845
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
843
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
846
844
  );
847
845
  const hasIconAfter = computed(
848
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
846
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
849
847
  );
850
848
  const hasIconLeft = computed(
851
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
849
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
852
850
  );
853
851
  const hasIconRight = computed(
854
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
852
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
855
853
  );
856
854
  const hasIconTop = computed(
857
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
855
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
858
856
  );
859
857
  const hasIconBottom = computed(
860
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
858
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
861
859
  );
862
- const hasIcon = computed(() => {
863
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
864
- return { name: icon == null ? void 0 : icon.value };
865
- }
866
- return icon == null ? void 0 : icon.value;
867
- });
868
860
  return {
869
861
  hasIcon,
870
862
  hasIconLeft,
@@ -941,8 +933,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
941
933
  ...__default__,
942
934
  props: VvTextareaProps,
943
935
  emits: VvTextareaEvents,
944
- setup(__props, { emit }) {
936
+ setup(__props, { emit: __emit }) {
945
937
  const props = __props;
938
+ const emit = __emit;
946
939
  const slots = useSlots();
947
940
  const propsDefaults = useDefaults(
948
941
  "VvTextarea",
@@ -971,10 +964,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
971
964
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
972
965
  );
973
966
  const localModelValue = useDebouncedInput(modelValue, emit, debounce == null ? void 0 : debounce.value);
974
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
975
- icon,
976
- iconPosition
977
- );
967
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
978
968
  const { focused } = useComponentFocus(textarea, emit);
979
969
  const isVisible = useElementVisibility(textarea);
980
970
  watch(isVisible, (newValue) => {
@@ -1011,34 +1001,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1011
1001
  "vv-textarea",
1012
1002
  modifiers,
1013
1003
  computed(() => ({
1014
- valid: valid.value,
1015
- invalid: invalid.value,
1016
- loading: loading.value,
1017
- disabled: props.disabled,
1018
- readonly: props.readonly,
1019
- "icon-before": hasIconBefore.value,
1020
- "icon-after": hasIconAfter.value,
1021
- floating: props.floating && !isEmpty(props.label),
1022
- dirty: isDirty.value,
1023
- focused: focused.value,
1024
- resizable: props.resizable
1004
+ "valid": valid.value,
1005
+ "invalid": invalid.value,
1006
+ "loading": loading.value,
1007
+ "disabled": props.disabled,
1008
+ "readonly": props.readonly,
1009
+ "icon-before": hasIconBefore.value !== void 0,
1010
+ "icon-after": hasIconAfter.value !== void 0,
1011
+ "floating": props.floating && !isEmpty(props.label),
1012
+ "dirty": isDirty.value,
1013
+ "focus": focused.value,
1014
+ "resizable": props.resizable
1025
1015
  }))
1026
1016
  );
1027
1017
  const hasAttrs = computed(
1028
1018
  () => ({
1029
- name: props.name,
1030
- placeholder: hasPlaceholder.value,
1031
- tabindex: hasTabindex.value,
1032
- disabled: props.disabled,
1033
- readonly: props.readonly,
1034
- required: props.required,
1035
- autocomplete: props.autocomplete,
1036
- minlength: props.minlength,
1037
- maxlength: props.maxlength,
1038
- cols: props.cols,
1039
- rows: props.rows,
1040
- wrap: props.wrap,
1041
- spellcheck: props.spellcheck,
1019
+ "name": props.name,
1020
+ "placeholder": hasPlaceholder.value,
1021
+ "tabindex": hasTabindex.value,
1022
+ "disabled": props.disabled,
1023
+ "readonly": props.readonly,
1024
+ "required": props.required,
1025
+ "autocomplete": props.autocomplete,
1026
+ "minlength": props.minlength,
1027
+ "maxlength": props.maxlength,
1028
+ "cols": props.cols,
1029
+ "rows": props.rows,
1030
+ "wrap": props.wrap,
1031
+ "spellcheck": props.spellcheck,
1042
1032
  "aria-invalid": isInvalid.value,
1043
1033
  "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
1044
1034
  "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
@@ -1053,85 +1043,104 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1053
1043
  minlength: props.minlength,
1054
1044
  clear: onClear
1055
1045
  }));
1056
- const onClear = () => {
1046
+ function onClear() {
1057
1047
  localModelValue.value = void 0;
1058
- };
1048
+ }
1059
1049
  return (_ctx, _cache) => {
1060
- return openBlock(), createElementBlock("div", {
1061
- class: normalizeClass(unref(bemCssClasses))
1062
- }, [
1063
- unref(label) ? (openBlock(), createElementBlock("label", {
1064
- key: 0,
1065
- for: unref(hasId),
1066
- class: "vv-textarea__label"
1067
- }, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("", true),
1068
- createElementVNode("div", _hoisted_2, [
1069
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
1070
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1071
- ])) : createCommentVNode("", true),
1072
- createElementVNode("div", _hoisted_4, [
1073
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
1074
- key: 0,
1075
- class: "vv-textarea__icon"
1076
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
1077
- withDirectives(createElementVNode("textarea", mergeProps({
1078
- id: unref(hasId),
1079
- ref_key: "textarea",
1080
- ref: textarea,
1081
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1082
- }, unref(hasAttrs), {
1083
- onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
1084
- }), null, 16, _hoisted_5), [
1085
- [vModelText, unref(localModelValue)]
1050
+ return openBlock(), createElementBlock(
1051
+ "div",
1052
+ {
1053
+ class: normalizeClass(unref(bemCssClasses))
1054
+ },
1055
+ [
1056
+ unref(label) ? (openBlock(), createElementBlock("label", {
1057
+ key: 0,
1058
+ for: unref(hasId),
1059
+ class: "vv-textarea__label"
1060
+ }, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("v-if", true),
1061
+ createElementVNode("div", _hoisted_2, [
1062
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
1063
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1064
+ ])) : createCommentVNode("v-if", true),
1065
+ createElementVNode("div", _hoisted_4, [
1066
+ unref(hasIconBefore) ? (openBlock(), createBlock(
1067
+ _sfc_main$1,
1068
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-textarea__icon" }),
1069
+ null,
1070
+ 16
1071
+ /* FULL_PROPS */
1072
+ )) : createCommentVNode("v-if", true),
1073
+ withDirectives(createElementVNode("textarea", mergeProps({
1074
+ id: unref(hasId),
1075
+ ref_key: "textarea",
1076
+ ref: textarea,
1077
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1078
+ }, unref(hasAttrs), {
1079
+ onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
1080
+ }), null, 16, _hoisted_5), [
1081
+ [vModelText, unref(localModelValue)]
1082
+ ]),
1083
+ unref(hasIconAfter) ? (openBlock(), createBlock(
1084
+ _sfc_main$1,
1085
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-textarea__icon vv-textarea__icon-after" }),
1086
+ null,
1087
+ 16
1088
+ /* FULL_PROPS */
1089
+ )) : createCommentVNode("v-if", true)
1086
1090
  ]),
1087
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
1088
- key: 1,
1089
- class: "vv-textarea__icon vv-textarea__icon-after"
1090
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
1091
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6, [
1092
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1093
+ ])) : createCommentVNode("v-if", true),
1094
+ unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7, [
1095
+ renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
1096
+ createTextVNode(
1097
+ toDisplayString(unref(countFormatted)),
1098
+ 1
1099
+ /* TEXT */
1100
+ )
1101
+ ])
1102
+ ])) : createCommentVNode("v-if", true)
1091
1103
  ]),
1092
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6, [
1093
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1094
- ])) : createCommentVNode("", true),
1095
- unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7, [
1096
- renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
1097
- createTextVNode(toDisplayString(unref(countFormatted)), 1)
1098
- ])
1099
- ])) : createCommentVNode("", true)
1100
- ]),
1101
- createVNode(unref(HintSlot), {
1102
- id: unref(hasHintId),
1103
- class: "vv-textarea__hint"
1104
- }, createSlots({ _: 2 }, [
1105
- _ctx.$slots.hint ? {
1106
- name: "hint",
1107
- fn: withCtx(() => [
1108
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1109
- ]),
1110
- key: "0"
1111
- } : void 0,
1112
- _ctx.$slots.loading ? {
1113
- name: "loading",
1114
- fn: withCtx(() => [
1115
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1116
- ]),
1117
- key: "1"
1118
- } : void 0,
1119
- _ctx.$slots.valid ? {
1120
- name: "valid",
1121
- fn: withCtx(() => [
1122
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1123
- ]),
1124
- key: "2"
1125
- } : void 0,
1126
- _ctx.$slots.invalid ? {
1127
- name: "invalid",
1128
- fn: withCtx(() => [
1129
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1130
- ]),
1131
- key: "3"
1132
- } : void 0
1133
- ]), 1032, ["id"])
1134
- ], 2);
1104
+ createVNode(unref(HintSlot), {
1105
+ id: unref(hasHintId),
1106
+ class: "vv-textarea__hint"
1107
+ }, createSlots({
1108
+ _: 2
1109
+ /* DYNAMIC */
1110
+ }, [
1111
+ _ctx.$slots.hint ? {
1112
+ name: "hint",
1113
+ fn: withCtx(() => [
1114
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1115
+ ]),
1116
+ key: "0"
1117
+ } : void 0,
1118
+ _ctx.$slots.loading ? {
1119
+ name: "loading",
1120
+ fn: withCtx(() => [
1121
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1122
+ ]),
1123
+ key: "1"
1124
+ } : void 0,
1125
+ _ctx.$slots.valid ? {
1126
+ name: "valid",
1127
+ fn: withCtx(() => [
1128
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1129
+ ]),
1130
+ key: "2"
1131
+ } : void 0,
1132
+ _ctx.$slots.invalid ? {
1133
+ name: "invalid",
1134
+ fn: withCtx(() => [
1135
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1136
+ ]),
1137
+ key: "3"
1138
+ } : void 0
1139
+ ]), 1032, ["id"])
1140
+ ],
1141
+ 2
1142
+ /* CLASS */
1143
+ );
1135
1144
  };
1136
1145
  }
1137
1146
  });