@volverjs/ui-vue 0.0.5 → 0.0.6-beta.15

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 (478) hide show
  1. package/README.md +3 -4
  2. package/auto-imports.d.ts +11 -0
  3. package/dist/Volver.d.ts +1 -1
  4. package/dist/components/VvAccordion/VvAccordion.es.js +238 -5
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -8
  7. package/dist/components/VvAccordion/index.d.ts +3 -6
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -10
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +10 -62
  11. package/dist/components/VvAccordionGroup/index.d.ts +4 -33
  12. package/dist/components/VvAction/VvAction.es.js +12 -8
  13. package/dist/components/VvAction/VvAction.umd.js +1 -1
  14. package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
  15. package/dist/components/VvAction/index.d.ts +1 -1
  16. package/dist/components/VvAlert/VvAlert.es.js +661 -0
  17. package/dist/components/VvAlert/VvAlert.umd.js +1 -0
  18. package/dist/components/VvAlert/VvAlert.vue.d.ts +104 -0
  19. package/dist/components/VvAlert/index.d.ts +95 -0
  20. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +799 -0
  21. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -0
  22. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +89 -0
  23. package/dist/components/VvAlertGroup/index.d.ts +55 -0
  24. package/dist/components/VvAvatar/VvAvatar.es.js +279 -0
  25. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -0
  26. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +15 -0
  27. package/dist/components/VvAvatar/index.d.ts +7 -0
  28. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +363 -0
  29. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -0
  30. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +42 -0
  31. package/dist/components/VvAvatarGroup/index.d.ts +25 -0
  32. package/dist/components/VvBadge/VvBadge.es.js +3 -3
  33. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  34. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -3
  35. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +5 -31
  36. package/dist/components/VvBreadcrumb/index.d.ts +1 -14
  37. package/dist/components/VvButton/VvButton.es.js +90 -49
  38. package/dist/components/VvButton/VvButton.umd.js +1 -1
  39. package/dist/components/VvButton/VvButton.vue.d.ts +38 -13
  40. package/dist/components/VvButton/index.d.ts +27 -4
  41. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +13 -7
  42. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  43. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +10 -62
  44. package/dist/components/VvButtonGroup/index.d.ts +3 -29
  45. package/dist/components/VvCard/VvCard.es.js +221 -2
  46. package/dist/components/VvCard/VvCard.umd.js +1 -1
  47. package/dist/components/VvCard/VvCard.vue.d.ts +7 -7
  48. package/dist/components/VvCard/index.d.ts +1 -1
  49. package/dist/components/VvCheckbox/VvCheckbox.es.js +154 -101
  50. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  51. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +47 -11
  52. package/dist/components/VvCheckbox/index.d.ts +9 -4
  53. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -104
  54. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  55. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +44 -8
  56. package/dist/components/VvCheckboxGroup/index.d.ts +8 -3
  57. package/dist/components/VvCombobox/VvCombobox.es.js +272 -175
  58. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  59. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +73 -37
  60. package/dist/components/VvCombobox/index.d.ts +13 -7
  61. package/dist/components/VvDialog/VvDialog.es.js +45 -34
  62. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  63. package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -7
  64. package/dist/components/VvDialog/index.d.ts +2 -2
  65. package/dist/components/VvDropdown/VvDropdown.es.js +39 -25
  66. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  67. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +24 -20
  68. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +4 -4
  69. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -2
  70. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
  71. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -4
  72. package/dist/components/VvDropdown/index.d.ts +2 -2
  73. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -11
  74. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  75. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +9 -5
  76. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  77. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +3 -3
  78. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +12 -8
  79. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  80. package/dist/components/VvIcon/VvIcon.es.js +26 -20
  81. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  82. package/dist/components/VvIcon/VvIcon.vue.d.ts +3 -3
  83. package/dist/components/VvIcon/index.d.ts +3 -3
  84. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  85. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  86. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  87. package/dist/components/VvInputText/VvInputText.es.js +166 -142
  88. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  89. package/dist/components/VvInputText/VvInputText.vue.d.ts +46 -22
  90. package/dist/components/VvInputText/index.d.ts +5 -5
  91. package/dist/components/VvNav/VvNav.es.js +454 -0
  92. package/dist/components/VvNav/VvNav.umd.js +1 -0
  93. package/dist/components/VvNav/VvNav.vue.d.ts +21 -0
  94. package/dist/components/VvNav/index.d.ts +19 -0
  95. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +19 -0
  96. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +1 -0
  97. package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +6 -0
  98. package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +2 -0
  99. package/dist/components/VvProgress/VvProgress.es.js +3 -3
  100. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  101. package/dist/components/VvRadio/VvRadio.es.js +154 -101
  102. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  103. package/dist/components/VvRadio/VvRadio.vue.d.ts +47 -11
  104. package/dist/components/VvRadio/index.d.ts +9 -4
  105. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -104
  106. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  107. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +44 -8
  108. package/dist/components/VvRadioGroup/index.d.ts +8 -3
  109. package/dist/components/VvSelect/VvSelect.es.js +167 -141
  110. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  111. package/dist/components/VvSelect/VvSelect.vue.d.ts +42 -18
  112. package/dist/components/VvSelect/index.d.ts +4 -4
  113. package/dist/components/VvTab/VvTab.es.js +509 -0
  114. package/dist/components/VvTab/VvTab.umd.js +1 -0
  115. package/dist/components/VvTab/VvTab.vue.d.ts +26 -0
  116. package/dist/components/VvTab/index.d.ts +10 -0
  117. package/dist/components/VvTextarea/VvTextarea.es.js +164 -140
  118. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  119. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +40 -16
  120. package/dist/components/VvTextarea/index.d.ts +3 -3
  121. package/dist/components/VvTooltip/VvTooltip.es.js +3 -3
  122. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
  123. package/dist/components/common/HintSlot.d.ts +38 -12
  124. package/dist/components/index.es.js +1336 -981
  125. package/dist/components/index.umd.js +1 -1
  126. package/dist/composables/alert/useInjectAlert.d.ts +9 -0
  127. package/dist/composables/alert/useProvideAlert.d.ts +10 -0
  128. package/dist/composables/dropdown/useInjectDropdown.d.ts +17 -16
  129. package/dist/composables/dropdown/useProvideDropdown.d.ts +7 -3
  130. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  131. package/dist/composables/useOptions.d.ts +2 -2
  132. package/dist/composables/useVolver.d.ts +1 -2
  133. package/dist/constants.d.ts +33 -4
  134. package/dist/directives/index.d.ts +2 -2
  135. package/dist/directives/index.es.js +3 -3
  136. package/dist/directives/v-tooltip.es.js +3 -3
  137. package/dist/icons.es.js +3 -3
  138. package/dist/icons.umd.js +1 -1
  139. package/dist/props/index.d.ts +38 -16
  140. package/dist/resolvers/unplugin.es.js +6 -3
  141. package/dist/resolvers/unplugin.umd.js +1 -1
  142. package/dist/stories/Accordion/Accordion.settings.d.ts +18 -17
  143. package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
  144. package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
  145. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +23 -4
  146. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +134 -0
  147. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +894 -0
  148. package/dist/stories/Alert/Alert.settings.d.ts +105 -0
  149. package/dist/stories/Alert/Alert.stories.d.ts +9 -0
  150. package/dist/stories/Alert/Alert.test.d.ts +2 -0
  151. package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
  152. package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
  153. package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +97 -0
  154. package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
  155. package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
  156. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
  157. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
  158. package/dist/stories/Avatar/Avatar.settings.d.ts +5 -0
  159. package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
  160. package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
  161. package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
  162. package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
  163. package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
  164. package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +50 -0
  165. package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
  166. package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
  167. package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
  168. package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
  169. package/dist/stories/Badge/Badge.settings.d.ts +0 -3
  170. package/dist/stories/Badge/Badge.stories.d.ts +7 -0
  171. package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
  172. package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
  173. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
  174. package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
  175. package/dist/stories/Button/Button.settings.d.ts +17 -9
  176. package/dist/stories/Button/Button.stories.d.ts +6 -0
  177. package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
  178. package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
  179. package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
  180. package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
  181. package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
  182. package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
  183. package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
  184. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +0 -4
  185. package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
  186. package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
  187. package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
  188. package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
  189. package/dist/stories/Card/Card.settings.d.ts +0 -3
  190. package/dist/stories/Card/Card.stories.d.ts +6 -0
  191. package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
  192. package/dist/stories/Checkbox/Checkbox.settings.d.ts +1 -21
  193. package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
  194. package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
  195. package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
  196. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -27
  197. package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
  198. package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
  199. package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
  200. package/dist/stories/Combobox/Combobox.settings.d.ts +2 -54
  201. package/dist/stories/Combobox/Combobox.stories.d.ts +21 -0
  202. package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
  203. package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +8 -0
  204. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +9 -0
  205. package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
  206. package/dist/stories/Dialog/Dialog.settings.d.ts +1 -1
  207. package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
  208. package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
  209. package/dist/stories/Dropdown/Dropdown.settings.d.ts +1 -1
  210. package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
  211. package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
  212. package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
  213. package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
  214. package/dist/stories/Icon/Icon.settings.d.ts +1 -3
  215. package/dist/stories/Icon/Icon.stories.d.ts +8 -0
  216. package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
  217. package/dist/stories/InputText/InputText.settings.d.ts +1 -74
  218. package/dist/stories/InputText/InputText.stories.d.ts +15 -0
  219. package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
  220. package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
  221. package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
  222. package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
  223. package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
  224. package/dist/stories/Nav/Nav.settings.d.ts +30 -0
  225. package/dist/stories/Nav/Nav.stories.d.ts +6 -0
  226. package/dist/stories/Nav/Nav.test.d.ts +2 -0
  227. package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
  228. package/dist/stories/Progress/Progress.settings.d.ts +0 -6
  229. package/dist/stories/Progress/Progress.stories.d.ts +7 -0
  230. package/dist/stories/Radio/Radio.settings.d.ts +1 -19
  231. package/dist/stories/Radio/Radio.stories.d.ts +11 -0
  232. package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
  233. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -27
  234. package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
  235. package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
  236. package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
  237. package/dist/stories/Select/Select.settings.d.ts +1 -47
  238. package/dist/stories/Select/Select.stories.d.ts +15 -0
  239. package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
  240. package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
  241. package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
  242. package/dist/stories/Tab/Tab.settings.d.ts +37 -0
  243. package/dist/stories/Tab/Tab.stories.d.ts +6 -0
  244. package/dist/stories/Tab/Tab.test.d.ts +2 -0
  245. package/dist/stories/Textarea/Textarea.settings.d.ts +1 -43
  246. package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
  247. package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
  248. package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
  249. package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
  250. package/dist/stories/Tooltip/Tooltip.settings.d.ts +2 -39
  251. package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
  252. package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
  253. package/dist/stories/argTypes.d.ts +5 -125
  254. package/dist/test/expect.d.ts +3 -0
  255. package/package.json +112 -56
  256. package/src/assets/icons/detailed.json +1 -1
  257. package/src/assets/icons/normal.json +1 -1
  258. package/src/assets/icons/simple.json +1 -1
  259. package/src/components/VvAccordion/index.ts +22 -7
  260. package/src/components/VvAccordionGroup/index.ts +8 -6
  261. package/src/components/VvAction/VvAction.vue +1 -1
  262. package/src/components/VvAlert/VvAlert.vue +54 -0
  263. package/src/components/VvAlert/index.ts +162 -0
  264. package/src/components/VvAlertGroup/VvAlertGroup.vue +34 -0
  265. package/src/components/VvAlertGroup/index.ts +122 -0
  266. package/src/components/VvAvatar/VvAvatar.vue +21 -0
  267. package/src/components/VvAvatar/index.ts +9 -0
  268. package/src/components/VvAvatarGroup/VvAvatarGroup.vue +65 -0
  269. package/src/components/VvAvatarGroup/index.ts +28 -0
  270. package/src/components/VvBreadcrumb/index.ts +1 -1
  271. package/src/components/VvButton/VvButton.vue +9 -6
  272. package/src/components/VvButton/index.ts +44 -21
  273. package/src/components/VvButtonGroup/VvButtonGroup.vue +2 -2
  274. package/src/components/VvButtonGroup/index.ts +14 -2
  275. package/src/components/VvCard/index.ts +3 -1
  276. package/src/components/VvCheckbox/VvCheckbox.vue +23 -2
  277. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +15 -2
  278. package/src/components/VvCombobox/VvCombobox.vue +41 -24
  279. package/src/components/VvCombobox/index.ts +11 -5
  280. package/src/components/VvDialog/VvDialog.vue +11 -7
  281. package/src/components/VvDialog/index.ts +2 -2
  282. package/src/components/VvDropdown/VvDropdown.vue +23 -5
  283. package/src/components/VvDropdown/VvDropdownItem.vue +2 -2
  284. package/src/components/VvIcon/VvIcon.vue +37 -34
  285. package/src/components/VvIcon/index.ts +3 -3
  286. package/src/components/VvInputText/VvInputText.vue +26 -9
  287. package/src/components/VvNav/VvNav.vue +66 -0
  288. package/src/components/VvNav/index.ts +21 -0
  289. package/src/components/VvNavItemTitle/VvNavItemTitle.vue +11 -0
  290. package/src/components/VvNavSeparator/VvNavSeparator.ts +8 -0
  291. package/src/components/VvRadio/VvRadio.vue +23 -2
  292. package/src/components/VvRadioGroup/VvRadioGroup.vue +15 -2
  293. package/src/components/VvSelect/VvSelect.vue +26 -9
  294. package/src/components/VvTab/VvTab.vue +53 -0
  295. package/src/components/VvTab/index.ts +13 -0
  296. package/src/components/VvTextarea/VvTextarea.vue +26 -9
  297. package/src/components/common/HintSlot.ts +129 -170
  298. package/src/composables/alert/useInjectAlert.ts +8 -0
  299. package/src/composables/alert/useProvideAlert.ts +23 -0
  300. package/src/composables/dropdown/useInjectDropdown.ts +3 -28
  301. package/src/composables/dropdown/useProvideDropdown.ts +14 -15
  302. package/src/composables/useOptions.ts +9 -7
  303. package/src/composables/useVolver.ts +1 -2
  304. package/src/constants.ts +42 -4
  305. package/src/props/index.ts +7 -5
  306. package/src/resolvers/unplugin.ts +6 -3
  307. package/src/stories/Accordion/Accordion.settings.ts +18 -7
  308. package/src/stories/Accordion/Accordion.stories.ts +45 -0
  309. package/src/stories/Accordion/AccordionSlots.stories.ts +29 -0
  310. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +22 -0
  311. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +62 -0
  312. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +53 -0
  313. package/src/stories/Alert/Alert.settings.ts +110 -0
  314. package/src/stories/Alert/Alert.stories.ts +60 -0
  315. package/src/stories/Alert/Alert.test.ts +95 -0
  316. package/src/stories/Alert/AlertModifiers.stories.ts +77 -0
  317. package/src/stories/Alert/AlertSlots.stories.ts +74 -0
  318. package/src/stories/AlertGroup/AlertGroup.settings.ts +110 -0
  319. package/src/stories/AlertGroup/AlertGroup.stories.ts +50 -0
  320. package/src/stories/AlertGroup/AlertGroup.test.ts +76 -0
  321. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +103 -0
  322. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +67 -0
  323. package/src/stories/Avatar/Avatar.settings.ts +37 -0
  324. package/src/stories/Avatar/Avatar.stories.ts +42 -0
  325. package/src/stories/Avatar/Avatar.test.ts +34 -0
  326. package/src/stories/Avatar/AvatarBadge.stories.ts +36 -0
  327. package/src/stories/Avatar/AvatarModifiers.stories.ts +100 -0
  328. package/src/stories/Avatar/AvatarSlots.stories.ts +34 -0
  329. package/src/stories/AvatarGroup/AvatarGroup.settings.ts +60 -0
  330. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
  331. package/src/stories/AvatarGroup/AvatarGroup.test.ts +36 -0
  332. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
  333. package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +39 -0
  334. package/src/stories/Badge/Badge.stories.ts +43 -0
  335. package/src/stories/Badge/BadgeSlots.stories.ts +23 -0
  336. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +41 -0
  337. package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
  338. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +37 -0
  339. package/src/stories/Button/Button.settings.ts +14 -2
  340. package/src/stories/Button/Button.stories.ts +38 -0
  341. package/src/stories/Button/ButtonIcon.stories.ts +67 -0
  342. package/src/stories/Button/ButtonLink.stories.ts +40 -0
  343. package/src/stories/Button/ButtonLoading.stories.ts +41 -0
  344. package/src/stories/Button/ButtonModifiers.stories.ts +158 -0
  345. package/src/stories/Button/ButtonSlots.stories.ts +87 -0
  346. package/src/stories/Button/ButtonState.stories.ts +42 -0
  347. package/src/stories/Button/ButtonToggle.stories.ts +52 -0
  348. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +39 -0
  349. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +39 -0
  350. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +38 -0
  351. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +41 -0
  352. package/src/stories/Card/Card.stories.ts +46 -0
  353. package/src/stories/Card/CardSlots.stories.ts +81 -0
  354. package/src/stories/Checkbox/Checkbox.settings.ts +0 -2
  355. package/src/stories/Checkbox/Checkbox.stories.ts +97 -0
  356. package/src/stories/Checkbox/CheckboxBinary.stories.ts +33 -0
  357. package/src/stories/Checkbox/CheckboxSlots.stories.ts +31 -0
  358. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +87 -0
  359. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +53 -0
  360. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +47 -0
  361. package/src/stories/Combobox/Combobox.settings.ts +3 -23
  362. package/src/stories/Combobox/Combobox.stories.ts +176 -0
  363. package/src/stories/Combobox/Combobox.test.ts +2 -2
  364. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +43 -0
  365. package/src/stories/Combobox/ComboboxMultiple.stories.ts +41 -0
  366. package/src/stories/Combobox/ComboboxOptions.stories.ts +78 -0
  367. package/src/stories/Combobox/ComboboxSlots.stories.ts +104 -0
  368. package/src/stories/Dialog/Dialog.settings.ts +1 -1
  369. package/src/stories/Dialog/Dialog.stories.ts +51 -0
  370. package/src/stories/Dialog/Dialog.test.ts +2 -2
  371. package/src/stories/Dialog/DialogSlots.stories.ts +39 -0
  372. package/src/stories/Dropdown/Dropdown.stories.ts +107 -0
  373. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +49 -0
  374. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +61 -0
  375. package/src/stories/Dropdown/DropdownSlots.stories.ts +95 -0
  376. package/src/stories/Icon/Icon.settings.ts +1 -0
  377. package/src/stories/Icon/Icon.stories.ts +48 -0
  378. package/src/stories/Icon/IconsCollection.stories.ts +53 -0
  379. package/src/stories/InputText/InputText.settings.ts +3 -39
  380. package/src/stories/InputText/InputText.stories.ts +121 -0
  381. package/src/stories/InputText/InputTextIconPosition.stories.ts +43 -0
  382. package/src/stories/InputText/InputTextLength.stories.ts +58 -0
  383. package/src/stories/InputText/InputTextMinMax.stories.ts +51 -0
  384. package/src/stories/InputText/InputTextSlots.stories.ts +39 -0
  385. package/src/stories/InputText/InputTextType.stories.ts +119 -0
  386. package/src/stories/Nav/Nav.settings.ts +34 -0
  387. package/src/stories/Nav/Nav.stories.ts +33 -0
  388. package/src/stories/Nav/Nav.test.ts +32 -0
  389. package/src/stories/Nav/NavModifiers.stories.ts +47 -0
  390. package/src/stories/Progress/Progress.settings.ts +0 -3
  391. package/src/stories/Progress/Progress.stories.ts +41 -0
  392. package/src/stories/Radio/Radio.stories.ts +81 -0
  393. package/src/stories/Radio/RadioSlots.stories.ts +31 -0
  394. package/src/stories/RadioGroup/RadioGroup.stories.ts +88 -0
  395. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +53 -0
  396. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +47 -0
  397. package/src/stories/Select/Select.settings.ts +0 -5
  398. package/src/stories/Select/Select.stories.ts +113 -0
  399. package/src/stories/Select/SelectIconPosition.stories.ts +43 -0
  400. package/src/stories/Select/SelectOptions.stories.ts +77 -0
  401. package/src/stories/Select/SelectSlots.stories.ts +39 -0
  402. package/src/stories/Tab/Tab.settings.ts +41 -0
  403. package/src/stories/Tab/Tab.stories.ts +70 -0
  404. package/src/stories/Tab/Tab.test.ts +37 -0
  405. package/src/stories/Textarea/Textarea.settings.ts +0 -8
  406. package/src/stories/Textarea/Textarea.stories.ts +107 -0
  407. package/src/stories/Textarea/TextareaLength.stories.ts +58 -0
  408. package/src/stories/Textarea/TextareaSlots.stories.ts +39 -0
  409. package/src/stories/Textarea/TextareatIconPosition.stories.ts +43 -0
  410. package/src/stories/Tooltip/Tooltip.settings.ts +4 -4
  411. package/src/stories/Tooltip/Tooltip.stories.ts +40 -0
  412. package/src/stories/Tooltip/TooltipDirective.stories.ts +68 -0
  413. package/src/stories/argTypes.ts +5 -59
  414. package/src/test/expect.ts +15 -0
  415. package/src/types/group.d.ts +5 -3
  416. package/src/stories/Accordion/Accordion.stories.mdx +0 -45
  417. package/src/stories/Accordion/AccordionSlots.stories.mdx +0 -58
  418. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +0 -58
  419. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +0 -59
  420. package/src/stories/Badge/Badge.stories.mdx +0 -51
  421. package/src/stories/Badge/BadgeSlots.stories.mdx +0 -20
  422. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +0 -50
  423. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +0 -43
  424. package/src/stories/Button/Button.stories.mdx +0 -35
  425. package/src/stories/Button/ButtonIcon.stories.mdx +0 -153
  426. package/src/stories/Button/ButtonLink.stories.mdx +0 -72
  427. package/src/stories/Button/ButtonLoading.stories.mdx +0 -108
  428. package/src/stories/Button/ButtonModifiers.stories.mdx +0 -257
  429. package/src/stories/Button/ButtonSlots.stories.mdx +0 -116
  430. package/src/stories/Button/ButtonState.stories.mdx +0 -66
  431. package/src/stories/Button/ButtonToggle.stories.mdx +0 -50
  432. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +0 -37
  433. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +0 -52
  434. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +0 -37
  435. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +0 -73
  436. package/src/stories/Card/Card.stories.mdx +0 -40
  437. package/src/stories/Card/CardSlots.stories.mdx +0 -98
  438. package/src/stories/Checkbox/Checkbox.stories.mdx +0 -164
  439. package/src/stories/Checkbox/CheckboxBinary.stories.mdx +0 -68
  440. package/src/stories/Checkbox/CheckboxSlots.stories.mdx +0 -46
  441. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +0 -135
  442. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +0 -100
  443. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +0 -68
  444. package/src/stories/Combobox/Combobox.stories.mdx +0 -324
  445. package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +0 -78
  446. package/src/stories/Combobox/ComboboxMultiple.stories.mdx +0 -73
  447. package/src/stories/Combobox/ComboboxOptions.stories.mdx +0 -135
  448. package/src/stories/Combobox/ComboboxSlots.stories.mdx +0 -153
  449. package/src/stories/Dialog/Dialog.stories.mdx +0 -56
  450. package/src/stories/Dialog/DialogSlots.stories.mdx +0 -63
  451. package/src/stories/Dropdown/Dropdown.stories.mdx +0 -124
  452. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +0 -41
  453. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +0 -56
  454. package/src/stories/Dropdown/DropdownSlots.stories.mdx +0 -114
  455. package/src/stories/Icon/Icon.stories.mdx +0 -91
  456. package/src/stories/Icon/IconsCollection.stories.mdx +0 -69
  457. package/src/stories/InputText/InputText.stories.mdx +0 -211
  458. package/src/stories/InputText/InputTextIconPosition.stories.mdx +0 -78
  459. package/src/stories/InputText/InputTextLength.stories.mdx +0 -110
  460. package/src/stories/InputText/InputTextMinMax.stories.mdx +0 -112
  461. package/src/stories/InputText/InputTextSlots.stories.mdx +0 -69
  462. package/src/stories/InputText/InputTextType.stories.mdx +0 -259
  463. package/src/stories/Progress/Progress.stories.mdx +0 -30
  464. package/src/stories/Radio/Radio.stories.mdx +0 -128
  465. package/src/stories/Radio/RadioSlots.stories.mdx +0 -46
  466. package/src/stories/RadioGroup/RadioGroup.stories.mdx +0 -135
  467. package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +0 -100
  468. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +0 -68
  469. package/src/stories/Select/Select.stories.mdx +0 -196
  470. package/src/stories/Select/SelectIconPosition.stories.mdx +0 -78
  471. package/src/stories/Select/SelectOptions.stories.mdx +0 -135
  472. package/src/stories/Select/SelectSlots.stories.mdx +0 -48
  473. package/src/stories/Textarea/Textarea.stories.mdx +0 -187
  474. package/src/stories/Textarea/TextareaLength.stories.mdx +0 -110
  475. package/src/stories/Textarea/TextareaSlots.stories.mdx +0 -69
  476. package/src/stories/Textarea/TextareatIconPosition.stories.mdx +0 -78
  477. package/src/stories/Tooltip/Tooltip.stories.mdx +0 -102
  478. package/src/stories/Tooltip/TooltipDirective.stories.mdx +0 -99
@@ -1,137 +1,121 @@
1
- import { unref, toRefs, computed, h, inject, defineComponent, ref, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, isRef, vModelText, createTextVNode, createVNode } from "vue";
2
- import { toReactive, useFocus, useElementVisibility } from "@vueuse/core";
1
+ import { unref, computed, defineComponent, h, inject, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, isRef, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
3
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
4
3
  import { nanoid } from "nanoid";
5
- function resolveFieldData(data, field) {
6
- if (data && Object.keys(data).length && field) {
7
- if (field.indexOf(".") === -1) {
8
- return data[field];
9
- } else {
10
- const fields = field.split(".");
11
- let value = data;
12
- for (let i = 0, len = fields.length; i < len; ++i) {
13
- if (data == null) {
14
- return null;
15
- }
16
- value = value[fields[i]];
17
- }
18
- return value;
19
- }
20
- } else {
21
- return null;
22
- }
23
- }
4
+ import { useFocus, useElementVisibility } from "@vueuse/core";
24
5
  function isEmpty(value) {
25
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));
26
7
  }
27
8
  function isString(value) {
28
9
  return typeof value === "string" || value instanceof String;
29
10
  }
30
- function joinLines(errors) {
31
- if (Array.isArray(errors)) {
32
- return errors.filter((e) => isString(e)).join(" ");
11
+ function joinLines(items) {
12
+ if (Array.isArray(items)) {
13
+ return items.filter((item) => isString(item)).join(" ");
33
14
  }
34
- return errors;
15
+ return items;
35
16
  }
36
- function HintSlotFactory(parentProps, parentSlots) {
37
- const {
38
- invalid: invalidSlot,
39
- valid: validSlot,
40
- hint: hintSlot,
41
- loading: loadingSlot
42
- } = parentSlots;
43
- const {
44
- hintLabel,
45
- modelValue,
46
- valid,
47
- validLabel,
48
- invalid,
49
- invalidLabel,
50
- ...otherProps
51
- } = toRefs(parentProps);
52
- const loading = resolveFieldData(otherProps, "loading");
53
- const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
54
- const hasInvalid = computed(() => {
55
- if (!invalid.value) {
56
- return false;
57
- }
58
- if (invalid.value && invalidSlot) {
59
- return true;
60
- }
61
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
62
- return true;
63
- }
64
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
65
- return true;
66
- }
67
- return false;
68
- });
69
- const hasHint = computed(
70
- () => !!(hintLabel && hintLabel.value || hintSlot)
17
+ function HintSlotFactory(props, slots) {
18
+ const invalidLabel = computed(() => joinLines(props.invalidLabel));
19
+ const validLabel = computed(() => joinLines(props.validLabel));
20
+ const loadingLabel = computed(() => props.loadingLabel);
21
+ const hintLabel = computed(() => props.hintLabel);
22
+ const hasLoadingLabelOrSlot = computed(
23
+ () => Boolean(props.loading && (slots.loading || loadingLabel.value))
24
+ );
25
+ const hasInvalidLabelOrSlot = computed(
26
+ () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
71
27
  );
72
- const hasValid = computed(
73
- () => !!(validLabel && validLabel.value || validSlot)
28
+ const hasValidLabelOrSlot = computed(
29
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
74
30
  );
75
- const hasLoading = computed(
76
- () => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
31
+ const hasHintLabelOrSlot = computed(
32
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
77
33
  );
78
34
  const isVisible = computed(
79
- () => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
35
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
80
36
  );
81
- return {
82
- hasInvalid,
83
- hasHint,
84
- hasValid,
85
- hasLoading,
86
- HintSlot: {
87
- name: "HintSlot",
88
- props: {
89
- params: {
90
- type: Object,
91
- default: () => ({})
37
+ const hintSlotScope = computed(() => ({
38
+ modelValue: props.modelValue,
39
+ valid: props.valid,
40
+ invalid: props.invalid,
41
+ loading: props.loading
42
+ }));
43
+ const HintSlot = defineComponent({
44
+ name: "HintSlot",
45
+ props: {
46
+ tag: {
47
+ type: String,
48
+ default: "small"
49
+ }
50
+ },
51
+ setup() {
52
+ return {
53
+ isVisible,
54
+ invalidLabel,
55
+ validLabel,
56
+ loadingLabel,
57
+ hintLabel,
58
+ hasInvalidLabelOrSlot,
59
+ hasValidLabelOrSlot,
60
+ hasLoadingLabelOrSlot,
61
+ hasHintLabelOrSlot
62
+ };
63
+ },
64
+ render() {
65
+ var _a, _b, _c, _d, _e, _f, _g, _h;
66
+ if (this.isVisible) {
67
+ let role;
68
+ if (this.hasInvalidLabelOrSlot) {
69
+ role = "alert";
92
70
  }
93
- },
94
- setup(props) {
95
- const hintContent = computed(() => {
96
- const slotProps = toReactive({
97
- hintLabel,
98
- modelValue,
99
- valid,
100
- validLabel,
101
- invalid,
102
- invalidLabel,
103
- loading,
104
- loadingLabel,
105
- ...props.params
106
- });
107
- if (invalid == null ? void 0 : invalid.value) {
108
- return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
109
- }
110
- if (valid == null ? void 0 : valid.value)
111
- return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
112
- if (loading == null ? void 0 : loading.value)
113
- return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
114
- return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
115
- });
116
- return {
117
- isVisible,
118
- hasInvalid,
119
- hasValid,
120
- hintContent
121
- };
122
- },
123
- render() {
124
- if (this.isVisible) {
71
+ if (this.hasValidLabelOrSlot) {
72
+ role = "status";
73
+ }
74
+ if (this.hasLoadingLabelOrSlot) {
75
+ return h(
76
+ this.tag,
77
+ {
78
+ role
79
+ },
80
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
81
+ );
82
+ }
83
+ if (this.hasInvalidLabelOrSlot) {
125
84
  return h(
126
- "small",
85
+ this.tag,
127
86
  {
128
- role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
87
+ role
129
88
  },
130
- this.hintContent
89
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
131
90
  );
132
91
  }
92
+ if (this.hasValidLabelOrSlot) {
93
+ return h(
94
+ this.tag,
95
+ {
96
+ role
97
+ },
98
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
99
+ );
100
+ }
101
+ return h(
102
+ this.tag,
103
+ {
104
+ role
105
+ },
106
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
107
+ );
133
108
  }
109
+ return null;
134
110
  }
111
+ });
112
+ return {
113
+ hasInvalidLabelOrSlot,
114
+ hasHintLabelOrSlot,
115
+ hasValidLabelOrSlot,
116
+ hasLoadingLabelOrSlot,
117
+ hintSlotScope,
118
+ HintSlot
135
119
  };
136
120
  }
137
121
  const VvIconProps = {
@@ -222,7 +206,7 @@ const VvIconProps = {
222
206
  svg: String,
223
207
  /**
224
208
  * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
225
- * @values string | Array<string>
209
+ * @values string | string[]
226
210
  */
227
211
  modifiers: {
228
212
  type: [String, Array]
@@ -299,6 +283,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
299
283
  props: VvIconProps,
300
284
  setup(__props) {
301
285
  const props = __props;
286
+ const hasRotate = computed(() => {
287
+ if (typeof props.rotate === "string") {
288
+ return parseFloat(props.rotate);
289
+ }
290
+ return props.rotate;
291
+ });
302
292
  const show = ref(true);
303
293
  const volver = useVolver();
304
294
  const { modifiers } = toRefs(props);
@@ -307,25 +297,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
307
297
  return props.provider || (volver == null ? void 0 : volver.iconsProvider);
308
298
  });
309
299
  const icon = computed(() => {
310
- const _name = props.name ?? "";
311
- const iconName = `@${provider.value}:${props.prefix}:${props.name}`;
312
- if (iconExists(_name)) {
313
- return _name;
314
- } else if (iconExists(iconName)) {
300
+ const name = props.name ?? "";
301
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
302
+ if (iconExists(iconName)) {
315
303
  return iconName;
316
- } else {
317
- return (volver == null ? void 0 : volver.iconsCollections.find(
318
- (iconsCollection) => {
319
- const icon2 = `@${provider.value}:${iconsCollection.prefix}:${_name}`;
320
- if (iconExists(icon2)) {
321
- return icon2;
322
- }
323
- }
324
- )) || _name;
325
304
  }
305
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
306
+ (iconsCollection2) => {
307
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
308
+ return iconExists(icon2);
309
+ }
310
+ );
311
+ if (iconsCollection) {
312
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
313
+ }
314
+ return name;
326
315
  });
327
316
  function getSvgContent(svg) {
328
- let dom = null;
317
+ let dom;
329
318
  if (typeof window === "undefined") {
330
319
  const { JSDOM } = require("jsdom");
331
320
  dom = new JSDOM().window;
@@ -356,12 +345,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
356
345
  show.value = true;
357
346
  }
358
347
  }).catch((e) => {
359
- throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
348
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
360
349
  });
361
- } else if (props.svg) {
362
- addIconFromSvg(props.svg);
363
350
  }
364
351
  }
352
+ if (props.svg) {
353
+ addIconFromSvg(props.svg);
354
+ }
365
355
  return (_ctx, _cache) => {
366
356
  return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
367
357
  key: 0,
@@ -373,7 +363,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
373
363
  horizontalFlip: _ctx.horizontalFlip,
374
364
  verticalFlip: _ctx.verticalFlip,
375
365
  flip: _ctx.flip,
376
- rotate: _ctx.rotate,
366
+ rotate: unref(hasRotate),
377
367
  color: _ctx.color,
378
368
  onLoad: _ctx.onLoad,
379
369
  icon: unref(icon)
@@ -607,11 +597,11 @@ const IdProps = {
607
597
  default: false
608
598
  },
609
599
  /**
610
- * Close dropdown on click outside
600
+ * Keep open dropdown on click outside
611
601
  */
612
- autoClose: {
602
+ keepOpen: {
613
603
  type: Boolean,
614
- default: true
604
+ default: false
615
605
  },
616
606
  /**
617
607
  * Autofocus first item on dropdown open
@@ -892,7 +882,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
892
882
  modifiers
893
883
  } = toRefs(props);
894
884
  const hasId = useUniqueId(id);
895
- const hasDescribedBy = computed(() => `${hasId.value}-hint`);
885
+ const hasHintId = computed(() => `${hasId.value}-hint`);
896
886
  const hasPlaceholder = computed(
897
887
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
898
888
  );
@@ -927,7 +917,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
927
917
  }
928
918
  return void 0;
929
919
  });
930
- const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
920
+ const {
921
+ HintSlot,
922
+ hasHintLabelOrSlot,
923
+ hasInvalidLabelOrSlot,
924
+ hintSlotScope
925
+ } = HintSlotFactory(props, slots);
931
926
  const bemCssClasses = useModifiers(
932
927
  "vv-textarea",
933
928
  modifiers,
@@ -961,8 +956,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
961
956
  wrap: props.wrap,
962
957
  spellcheck: props.spellcheck,
963
958
  "aria-invalid": isInvalid.value,
964
- "aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
965
- "aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
959
+ "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
960
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
966
961
  })
967
962
  );
968
963
  const slotProps = computed(() => ({
@@ -1020,9 +1015,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1020
1015
  ])) : createCommentVNode("", true)
1021
1016
  ]),
1022
1017
  createVNode(unref(HintSlot), {
1023
- id: unref(hasDescribedBy),
1018
+ id: unref(hasHintId),
1024
1019
  class: "vv-textarea__hint"
1025
- }, null, 8, ["id"])
1020
+ }, createSlots({ _: 2 }, [
1021
+ _ctx.$slots.hint ? {
1022
+ name: "hint",
1023
+ fn: withCtx(() => [
1024
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1025
+ ]),
1026
+ key: "0"
1027
+ } : void 0,
1028
+ _ctx.$slots.loading ? {
1029
+ name: "loading",
1030
+ fn: withCtx(() => [
1031
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1032
+ ]),
1033
+ key: "1"
1034
+ } : void 0,
1035
+ _ctx.$slots.valid ? {
1036
+ name: "valid",
1037
+ fn: withCtx(() => [
1038
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1039
+ ]),
1040
+ key: "2"
1041
+ } : void 0,
1042
+ _ctx.$slots.invalid ? {
1043
+ name: "invalid",
1044
+ fn: withCtx(() => [
1045
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1046
+ ]),
1047
+ key: "3"
1048
+ } : void 0
1049
+ ]), 1032, ["id"])
1026
1050
  ], 2);
1027
1051
  };
1028
1052
  }
@@ -1 +1 @@
1
- !function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("@iconify/vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","@iconify/vue","nanoid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=l(e.vue,e.core,e.vue$1,e.nanoid)}(this,(function(e,l,o,t){"use strict";function n(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const o=l.split(".");let t=e;for(let l=0,n=o.length;l<n;++l){if(null==e)return null;t=t[o[l]]}return t}}return null}function a(l){return null==(o=e.unref(l))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const r={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var 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||{}),v=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(v||{});const c=Symbol.for("volver");function s(l,o,t){return e.computed((()=>{const n={[l]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(n[`${l}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((o=>{n[`${l}--${o}`]=e.unref(t.value[o])})),n}))}const m=e.defineComponent({name:"VvIcon",props:r,setup(l){const t=l,n=e.ref(!0),a=e.inject(c),{modifiers:i}=e.toRefs(t),r=s("vv-icon",i),u=e.computed((()=>t.provider||(null==a?void 0:a.iconsProvider))),d=e.computed((()=>{const e=t.name??"",l=`@${u.value}:${t.prefix}:${t.name}`;return o.iconExists(e)?e:o.iconExists(l)?l:(null==a?void 0:a.iconsCollections.find((l=>{const t=`@${u.value}:${l.prefix}:${e}`;if(o.iconExists(t))return t})))||e}));function v(e){const l=function(e){let l=null;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),n=(null==l?void 0:l.innerHTML.trim())||"";l&&n&&o.addIcon(`@${u.value}:${t.prefix}:${t.name}`,{body:n,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return a&&(t.src&&!o.iconExists(`@${u.value}:${t.prefix}:${t.name}`)?(n.value=!1,a.fetchIcon(t.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`During fetch icon: ${null==e?void 0:e.message}`)}))):t.svg&&v(t.svg)),(l,t)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(r)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:l.rotate,color:l.color,onLoad:l.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),f={valid:Boolean,validLabel:[String,Array]},p={invalid:Boolean,invalidLabel:[String,Array]},g={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},h={disabled:Boolean},b=(Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},B={modifiers:[String,Array]},S={hintLabel:{type:String,default:""}},x={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},w={debounce:[Number,String]},L={icon:{type:[String,Object]},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},k={tabindex:{type:[String,Number],default:0}},V={floating:Boolean},$={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const N={...{...$,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...k,...h,...y,...f,...p,...S,...g,...B,...x,...w,...L,...V,...b,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};v.button;const _={...N,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"],E={class:"vv-textarea__wrapper"},P={key:0,class:"vv-textarea__input-before"},A={class:"vv-textarea__inner"},C=["id"],j={key:1,class:"vv-textarea__input-after"},q={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:_,emits:["update:modelValue","focus","blur","keyup"],setup(o,{emit:r}){const v=o,c=e.useSlots(),f=e.ref(),{id:p,icon:g,iconPosition:h,label:b,modelValue:y,count:B,valid:S,invalid:x,loading:w,modifiers:L}=e.toRefs(v),k=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.nanoid()))))(p),V=e.computed((()=>`${k.value}-hint`)),$=e.computed((()=>v.floating&&a(v.placeholder)?" ":v.placeholder)),N=function(l,o,t=0,{getter:n=(e=>e),setter:a=(e=>e)}={}){let i;return"string"==typeof t&&(t=parseInt(t)),e.computed({get:()=>n(null==l?void 0:l.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",a(e))}),t)}})}(y,r,v.debounce),{hasIcon:_,hasIconBefore:z,hasIconAfter:O}=function(l,o){const t=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===d.before))),n=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===d.after))),a=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===u.left))),i=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===u.right))),r=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===u.top))),v=e.computed((()=>Boolean((null==l?void 0:l.value)&&o.value===u.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),hasIconLeft:a,hasIconRight:i,hasIconTop:r,hasIconBottom:v,hasIconBefore:t,hasIconAfter:n}}(g,h),{focused:T}=function(o,t){const{focused:n}=l.useFocus(o);return e.watch(n,(l=>{t(l?"focus":"blur",e.unref(o))})),{focused:n}}(f,r),F=l.useElementVisibility(f);e.watch(F,(e=>{e&&v.autofocus&&(T.value=!0)}));const{formatted:R}=function(l,o){const t=e.computed((()=>(e.unref(l)??"").length)),n=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&t.value<(null==o?void 0:o.lowerLimit)?t.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&t.value<(null==o?void 0:o.upperLimit)?o.upperLimit-t.value:0)),a=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${t.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===n.value)return;return n}return t.value}));return{length:t,gap:n,formatted:a}}(N,{mode:v.count,upperLimit:Number(v.maxlength),lowerLimit:Number(v.minlength)}),D=e.computed((()=>!v.disabled&&!v.readonly)),H=e.computed((()=>D.value?v.tabindex:-1)),M=e.computed((()=>!a(y))),J=e.computed((()=>!0===v.invalid||!0!==v.valid&&void 0)),{HintSlot:K,hasHint:U,hasInvalid:G}=function(o,t){const{invalid:r,valid:u,hint:d,loading:v}=t,{hintLabel:c,modelValue:s,valid:m,validLabel:f,invalid:p,invalidLabel:g,...h}=e.toRefs(o),b=n(h,"loading"),y=n(h,"loadingLabel"),B=e.computed((()=>!(!p.value||(!p.value||!r)&&!((null==g?void 0:g.value)&&Array.isArray(g.value)&&g.value.length>0)&&(!(null==g?void 0:g.value)||a(g))))),S=e.computed((()=>!!(c&&c.value||d))),x=e.computed((()=>!!(f&&f.value||u))),w=e.computed((()=>!!((null==b?void 0:b.value)&&v||(null==b?void 0:b.value)&&(null==y?void 0:y.value)))),L=e.computed((()=>S.value||x.value||B.value||w.value));return{hasInvalid:B,hasHint:S,hasValid:x,hasLoading:w,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(o){const t=e.computed((()=>{const e=l.toReactive({hintLabel:c,modelValue:s,valid:m,validLabel:f,invalid:p,invalidLabel:g,loading:b,loadingLabel:y,...o.params});return(null==p?void 0:p.value)?(null==r?void 0:r(e))||i(null==g?void 0:g.value)||(null==c?void 0:c.value):(null==m?void 0:m.value)?(null==u?void 0:u(e))||i(null==f?void 0:f.value)||(null==c?void 0:c.value):(null==b?void 0:b.value)?(null==v?void 0:v(e))||i(null==y?void 0:y.value)||(null==c?void 0:c.value):(null==d?void 0:d(e))||i(null==c?void 0:c.value)||(null==c?void 0:c.value)}));return{isVisible:L,hasInvalid:B,hasValid:x,hintContent:t}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}(v,c),Q=s("vv-textarea",L,e.computed((()=>({valid:S.value,invalid:x.value,loading:w.value,disabled:v.disabled,readonly:v.readonly,"icon-before":z.value,"icon-after":O.value,floating:v.floating&&!a(v.label),dirty:M.value,focused:T.value,resizable:v.resizable})))),W=e.computed((()=>({name:v.name,placeholder:$.value,tabindex:H.value,disabled:v.disabled,readonly:v.readonly,required:v.required,autocomplete:v.autocomplete,minlength:v.minlength,maxlength:v.maxlength,cols:v.cols,rows:v.rows,wrap:v.wrap,spellcheck:v.spellcheck,"aria-invalid":J.value,"aria-describedby":!G.value&&U.value?V.value:void 0,"aria-errormessage":G.value?V.value:void 0}))),X=e.computed((()=>({valid:v.valid,invalid:v.invalid,modelValue:v.modelValue,hintLabel:v.hintLabel,maxlength:v.maxlength,minlength:v.minlength,clear:Y}))),Y=()=>{N.value=void 0};return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Q))},[e.unref(b)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(k),class:"vv-textarea__label"},e.toDisplayString(e.unref(b)),9,I)):e.createCommentVNode("",!0),e.createElementVNode("div",E,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",P,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])):e.createCommentVNode("",!0),e.createElementVNode("div",A,[e.unref(z)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"vv-textarea__icon"},e.unref(_)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(k),ref_key:"textarea",ref:f,"onUpdate:modelValue":o[0]||(o[0]=l=>e.isRef(N)?N.value=l:null)},e.unref(W),{onKeyup:o[1]||(o[1]=e=>r("keyup",e))}),null,16,C),[[e.vModelText,e.unref(N)]]),e.unref(O)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1,class:"vv-textarea__icon vv-textarea__icon-after"},e.unref(_)),null,16)):e.createCommentVNode("",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("span",q,[e.renderSlot(l.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(X))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(R)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(K),{id:e.unref(V),class:"vv-textarea__hint"},null,8,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,o,l){"use strict";function a(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function n(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const i={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const s=Symbol.for("volver");function c(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const v=e.defineComponent({name:"VvIcon",props:i,setup(o){const l=o,a=e.computed((()=>"string"==typeof l.rotate?parseFloat(l.rotate):l.rotate)),n=e.ref(!0),i=e.inject(s),{modifiers:r}=e.toRefs(l),u=c("vv-icon",r),d=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),v=e.computed((()=>{const e=l.name??"",o=`@${d.value}:${l.prefix}:${e}`;if(t.iconExists(o))return o;const a=null==i?void 0:i.iconsCollections.find((o=>{const l=`@${d.value}:${o.prefix}:${e}`;return t.iconExists(l)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function m(e){const o=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==o?void 0:o.innerHTML.trim())||"";o&&a&&t.addIcon(`@${d.value}:${l.prefix}:${l.name}`,{body:a,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return i&&l.src&&!t.iconExists(`@${d.value}:${l.prefix}:${l.name}`)&&(n.value=!1,i.fetchIcon(l.src).then((e=>{e&&(m(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&m(l.svg),(o,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:e.unref(a),color:o.color,onLoad:o.onLoad,icon:e.unref(v)}),null,16,["class"])):e.createCommentVNode("",!0)}}),m={valid:Boolean,validLabel:[String,Array]},p={invalid:Boolean,invalidLabel:[String,Array]},f={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},h={disabled:Boolean},g=(Boolean,Boolean,{label:[String,Number]}),b={readonly:Boolean},S={modifiers:[String,Array]},y={hintLabel:{type:String,default:""}},B={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},L={debounce:[Number,String]},$={icon:{type:[String,Object]},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},x={tabindex:{type:[String,Number],default:0}},w={floating:Boolean},k={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const V={...{...k,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...x,...h,...b,...m,...p,...y,...f,...S,...B,...L,...$,...w,...g,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const N={...V,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 P=["for"],O={class:"vv-textarea__wrapper"},_={key:0,class:"vv-textarea__input-before"},I={class:"vv-textarea__inner"},C=["id"],E={key:1,class:"vv-textarea__input-after"},z={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:N,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:i}){const d=t,s=e.useSlots(),m=e.ref(),{id:p,icon:f,iconPosition:h,label:g,modelValue:b,count:S,valid:y,invalid:B,loading:L,modifiers:$}=e.toRefs(d),x=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(p),w=e.computed((()=>`${x.value}-hint`)),k=e.computed((()=>d.floating&&a(d.placeholder)?" ":d.placeholder)),V=function(t,o,l=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof l&&(l=parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}(b,i,d.debounce),{hasIcon:N,hasIconBefore:A,hasIconAfter:q}=function(t,o){const l=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.right))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:i,hasIconTop:d,hasIconBottom:s,hasIconBefore:l,hasIconAfter:a}}(f,h),{focused:R}=function(t,o){const{focused:a}=l.useFocus(t);return e.watch(a,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:a}}(m,i),F=l.useElementVisibility(m);e.watch(F,(e=>{e&&d.autofocus&&(R.value=!0)}));const{formatted:T}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(V,{mode:d.count,upperLimit:Number(d.maxlength),lowerLimit:Number(d.minlength)}),j=e.computed((()=>!d.disabled&&!d.readonly)),D=e.computed((()=>j.value?d.tabindex:-1)),H=e.computed((()=>!a(b))),M=e.computed((()=>!0===d.invalid||!0!==d.valid&&void 0)),{HintSlot:J,hasHintLabelOrSlot:K,hasInvalidLabelOrSlot:U,hintSlotScope:G}=function(t,o){const l=e.computed((()=>n(t.invalidLabel))),a=e.computed((()=>n(t.validLabel))),i=e.computed((()=>t.loadingLabel)),r=e.computed((()=>t.hintLabel)),u=e.computed((()=>Boolean(t.loading&&(o.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(t.invalid&&(o.invalid||l.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(t.valid&&(o.valid||a.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(o.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),m=e.computed((()=>({modelValue:t.modelValue,valid:t.valid,invalid:t.invalid,loading:t.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:l,validLabel:a,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,o,l,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:m,HintSlot:p}}(d,s),Q=c("vv-textarea",$,e.computed((()=>({valid:y.value,invalid:B.value,loading:L.value,disabled:d.disabled,readonly:d.readonly,"icon-before":A.value,"icon-after":q.value,floating:d.floating&&!a(d.label),dirty:H.value,focused:R.value,resizable:d.resizable})))),W=e.computed((()=>({name:d.name,placeholder:k.value,tabindex:D.value,disabled:d.disabled,readonly:d.readonly,required:d.required,autocomplete:d.autocomplete,minlength:d.minlength,maxlength:d.maxlength,cols:d.cols,rows:d.rows,wrap:d.wrap,spellcheck:d.spellcheck,"aria-invalid":M.value,"aria-describedby":K.value?w.value:void 0,"aria-errormessage":U.value?w.value:void 0}))),X=e.computed((()=>({valid:d.valid,invalid:d.invalid,modelValue:d.modelValue,hintLabel:d.hintLabel,maxlength:d.maxlength,minlength:d.minlength,clear:Y}))),Y=()=>{V.value=void 0};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Q))},[e.unref(g)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(x),class:"vv-textarea__label"},e.toDisplayString(e.unref(g)),9,P)):e.createCommentVNode("",!0),e.createElementVNode("div",O,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",_,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])):e.createCommentVNode("",!0),e.createElementVNode("div",I,[e.unref(A)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0,class:"vv-textarea__icon"},e.unref(N)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(x),ref_key:"textarea",ref:m,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(V)?V.value=t:null)},e.unref(W),{onKeyup:o[1]||(o[1]=e=>i("keyup",e))}),null,16,C),[[e.vModelText,e.unref(V)]]),e.unref(q)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:1,class:"vv-textarea__icon vv-textarea__icon-after"},e.unref(N)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",E,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])):e.createCommentVNode("",!0),e.unref(S)?(e.openBlock(),e.createElementBlock("span",z,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(X))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(J),{id:e.unref(w),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(G))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
24
24
  label: (StringConstructor | NumberConstructor)[];
25
25
  floating: BooleanConstructor;
26
26
  icon: {
27
- type: (StringConstructor | ObjectConstructor)[];
27
+ type: (ObjectConstructor | StringConstructor)[];
28
28
  };
29
29
  iconPosition: {
30
30
  type: globalThis.PropType<"before" | "after">;
@@ -48,9 +48,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
48
48
  default: string;
49
49
  };
50
50
  invalid: BooleanConstructor;
51
- invalidLabel: (StringConstructor | ArrayConstructor)[];
51
+ invalidLabel: (ArrayConstructor | StringConstructor)[];
52
52
  valid: BooleanConstructor;
53
- validLabel: (StringConstructor | ArrayConstructor)[];
53
+ validLabel: (ArrayConstructor | StringConstructor)[];
54
54
  readonly: BooleanConstructor;
55
55
  disabled: BooleanConstructor;
56
56
  tabindex: {
@@ -93,7 +93,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
93
93
  label: (StringConstructor | NumberConstructor)[];
94
94
  floating: BooleanConstructor;
95
95
  icon: {
96
- type: (StringConstructor | ObjectConstructor)[];
96
+ type: (ObjectConstructor | StringConstructor)[];
97
97
  };
98
98
  iconPosition: {
99
99
  type: globalThis.PropType<"before" | "after">;
@@ -117,9 +117,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
117
117
  default: string;
118
118
  };
119
119
  invalid: BooleanConstructor;
120
- invalidLabel: (StringConstructor | ArrayConstructor)[];
120
+ invalidLabel: (ArrayConstructor | StringConstructor)[];
121
121
  valid: BooleanConstructor;
122
- validLabel: (StringConstructor | ArrayConstructor)[];
122
+ validLabel: (ArrayConstructor | StringConstructor)[];
123
123
  readonly: BooleanConstructor;
124
124
  disabled: BooleanConstructor;
125
125
  tabindex: {
@@ -141,25 +141,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
141
141
  }, {
142
142
  disabled: boolean;
143
143
  floating: boolean;
144
+ spellcheck: string | boolean;
145
+ tabindex: string | number;
144
146
  required: boolean;
145
147
  iconPosition: "before" | "after";
148
+ autofocus: boolean;
146
149
  loading: boolean;
147
150
  loadingLabel: string;
148
151
  readonly: boolean;
149
152
  hintLabel: string;
150
153
  invalid: boolean;
151
154
  valid: boolean;
152
- tabindex: string | number;
153
155
  autocomplete: string;
154
- autofocus: boolean;
155
156
  count: string | boolean;
156
157
  cols: string | number;
157
158
  rows: string | number;
158
159
  wrap: string;
159
- spellcheck: string | boolean;
160
160
  resizable: boolean;
161
- }>, {
162
- before: (_: {
161
+ }, {}>, {
162
+ before?(_: {
163
163
  valid: boolean;
164
164
  invalid: boolean;
165
165
  modelValue: string | undefined;
@@ -167,8 +167,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
167
167
  maxlength: string | number | undefined;
168
168
  minlength: string | number | undefined;
169
169
  clear: () => void;
170
- }) => any;
171
- after: (_: {
170
+ }): any;
171
+ after?(_: {
172
172
  valid: boolean;
173
173
  invalid: boolean;
174
174
  modelValue: string | undefined;
@@ -176,8 +176,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
176
176
  maxlength: string | number | undefined;
177
177
  minlength: string | number | undefined;
178
178
  clear: () => void;
179
- }) => any;
180
- count: (_: {
179
+ }): any;
180
+ count?(_: {
181
181
  valid: boolean;
182
182
  invalid: boolean;
183
183
  modelValue: string | undefined;
@@ -185,7 +185,31 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
185
185
  maxlength: string | number | undefined;
186
186
  minlength: string | number | undefined;
187
187
  clear: () => void;
188
- }) => any;
188
+ }): any;
189
+ hint?(_: {
190
+ modelValue: any;
191
+ valid: boolean;
192
+ invalid: boolean;
193
+ loading: boolean;
194
+ }): any;
195
+ loading?(_: {
196
+ modelValue: any;
197
+ valid: boolean;
198
+ invalid: boolean;
199
+ loading: boolean;
200
+ }): any;
201
+ valid?(_: {
202
+ modelValue: any;
203
+ valid: boolean;
204
+ invalid: boolean;
205
+ loading: boolean;
206
+ }): any;
207
+ invalid?(_: {
208
+ modelValue: any;
209
+ valid: boolean;
210
+ invalid: boolean;
211
+ loading: boolean;
212
+ }): any;
189
213
  }>;
190
214
  export default _default;
191
215
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -58,7 +58,7 @@ export declare const VvTextareaProps: {
58
58
  label: (StringConstructor | NumberConstructor)[];
59
59
  floating: BooleanConstructor;
60
60
  icon: {
61
- type: (StringConstructor | ObjectConstructor)[];
61
+ type: (ObjectConstructor | StringConstructor)[];
62
62
  };
63
63
  iconPosition: {
64
64
  type: globalThis.PropType<"before" | "after">;
@@ -82,9 +82,9 @@ export declare const VvTextareaProps: {
82
82
  default: string;
83
83
  };
84
84
  invalid: BooleanConstructor;
85
- invalidLabel: (StringConstructor | ArrayConstructor)[];
85
+ invalidLabel: (ArrayConstructor | StringConstructor)[];
86
86
  valid: BooleanConstructor;
87
- validLabel: (StringConstructor | ArrayConstructor)[];
87
+ validLabel: (ArrayConstructor | StringConstructor)[];
88
88
  readonly: BooleanConstructor;
89
89
  disabled: BooleanConstructor;
90
90
  tabindex: {
@@ -183,11 +183,11 @@ const ModifiersProps = {
183
183
  default: false
184
184
  },
185
185
  /**
186
- * Close dropdown on click outside
186
+ * Keep open dropdown on click outside
187
187
  */
188
- autoClose: {
188
+ keepOpen: {
189
189
  type: Boolean,
190
- default: true
190
+ default: false
191
191
  },
192
192
  /**
193
193
  * Autofocus first item on dropdown open
@@ -18,8 +18,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
18
18
  modifiers: globalThis.PropType<string | string[]>;
19
19
  }>>, {
20
20
  position: "left" | "right" | "top" | "bottom";
21
- }>, {
22
- default: (_: {}) => any;
21
+ }, {}>, {
22
+ default?(_: {}): any;
23
23
  }>;
24
24
  export default _default;
25
25
  type __VLS_WithTemplateSlots<T, S> = T & {