@volverjs/ui-vue 0.0.6-beta.6 → 0.0.6

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 (443) hide show
  1. package/README.md +3 -5
  2. package/auto-imports.d.ts +11 -0
  3. package/dist/components/VvAccordion/VvAccordion.es.js +220 -4
  4. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  5. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -8
  6. package/dist/components/VvAccordion/index.d.ts +1 -4
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +221 -8
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +6 -6
  10. package/dist/components/VvAccordionGroup/index.d.ts +2 -5
  11. package/dist/components/VvAction/VvAction.es.js +12 -8
  12. package/dist/components/VvAction/VvAction.umd.js +1 -1
  13. package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
  14. package/dist/components/VvAction/index.d.ts +1 -1
  15. package/dist/components/VvAlert/VvAlert.es.js +661 -0
  16. package/dist/components/VvAlert/VvAlert.umd.js +1 -0
  17. package/dist/components/VvAlert/VvAlert.vue.d.ts +104 -0
  18. package/dist/components/VvAlert/index.d.ts +95 -0
  19. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +799 -0
  20. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -0
  21. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +89 -0
  22. package/dist/components/VvAlertGroup/index.d.ts +55 -0
  23. package/dist/components/VvAvatar/VvAvatar.es.js +3 -3
  24. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -2
  25. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +3 -3
  26. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -2
  27. package/dist/components/VvBadge/VvBadge.es.js +3 -3
  28. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  29. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -3
  30. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +3 -3
  31. package/dist/components/VvButton/VvButton.es.js +39 -29
  32. package/dist/components/VvButton/VvButton.umd.js +1 -1
  33. package/dist/components/VvButton/VvButton.vue.d.ts +13 -13
  34. package/dist/components/VvButton/index.d.ts +2 -2
  35. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +3 -3
  36. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
  37. package/dist/components/VvCard/VvCard.es.js +221 -2
  38. package/dist/components/VvCard/VvCard.umd.js +1 -1
  39. package/dist/components/VvCard/VvCard.vue.d.ts +5 -5
  40. package/dist/components/VvCheckbox/VvCheckbox.es.js +154 -101
  41. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  42. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +46 -10
  43. package/dist/components/VvCheckbox/index.d.ts +8 -3
  44. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -104
  45. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  46. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +44 -8
  47. package/dist/components/VvCheckboxGroup/index.d.ts +8 -3
  48. package/dist/components/VvCombobox/VvCombobox.es.js +271 -174
  49. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  50. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +73 -37
  51. package/dist/components/VvCombobox/index.d.ts +13 -7
  52. package/dist/components/VvDialog/VvDialog.es.js +44 -33
  53. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  54. package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -7
  55. package/dist/components/VvDialog/index.d.ts +2 -2
  56. package/dist/components/VvDropdown/VvDropdown.es.js +39 -25
  57. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  58. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +21 -17
  59. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +4 -4
  60. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -2
  61. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
  62. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -4
  63. package/dist/components/VvDropdown/index.d.ts +1 -1
  64. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -11
  65. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  66. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +9 -5
  67. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  68. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +3 -3
  69. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +12 -8
  70. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  71. package/dist/components/VvIcon/VvIcon.es.js +25 -19
  72. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  73. package/dist/components/VvIcon/VvIcon.vue.d.ts +3 -3
  74. package/dist/components/VvIcon/index.d.ts +2 -2
  75. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  76. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  77. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  78. package/dist/components/VvInputText/VvInputText.es.js +165 -141
  79. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  80. package/dist/components/VvInputText/VvInputText.vue.d.ts +46 -22
  81. package/dist/components/VvInputText/index.d.ts +5 -5
  82. package/dist/components/VvNav/VvNav.es.js +12 -8
  83. package/dist/components/VvNav/VvNav.umd.js +1 -1
  84. package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
  85. package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +1 -1
  86. package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +1 -1
  87. package/dist/components/VvProgress/VvProgress.es.js +3 -3
  88. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  89. package/dist/components/VvRadio/VvRadio.es.js +154 -101
  90. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  91. package/dist/components/VvRadio/VvRadio.vue.d.ts +46 -10
  92. package/dist/components/VvRadio/index.d.ts +8 -3
  93. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -104
  94. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  95. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +44 -8
  96. package/dist/components/VvRadioGroup/index.d.ts +8 -3
  97. package/dist/components/VvSelect/VvSelect.es.js +166 -140
  98. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  99. package/dist/components/VvSelect/VvSelect.vue.d.ts +42 -18
  100. package/dist/components/VvSelect/index.d.ts +4 -4
  101. package/dist/components/VvTab/VvTab.es.js +12 -8
  102. package/dist/components/VvTab/VvTab.umd.js +1 -1
  103. package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
  104. package/dist/components/VvTextarea/VvTextarea.es.js +163 -139
  105. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  106. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +40 -16
  107. package/dist/components/VvTextarea/index.d.ts +3 -3
  108. package/dist/components/VvTooltip/VvTooltip.es.js +3 -3
  109. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
  110. package/dist/components/common/HintSlot.d.ts +38 -12
  111. package/dist/components/index.es.js +1066 -768
  112. package/dist/components/index.umd.js +1 -1
  113. package/dist/composables/alert/useInjectAlert.d.ts +9 -0
  114. package/dist/composables/alert/useProvideAlert.d.ts +10 -0
  115. package/dist/composables/dropdown/useInjectDropdown.d.ts +17 -16
  116. package/dist/composables/dropdown/useProvideDropdown.d.ts +7 -3
  117. package/dist/composables/useOptions.d.ts +2 -2
  118. package/dist/composables/useVolver.d.ts +1 -2
  119. package/dist/constants.d.ts +33 -4
  120. package/dist/directives/index.es.js +3 -3
  121. package/dist/directives/v-tooltip.es.js +3 -3
  122. package/dist/icons.es.js +3 -3
  123. package/dist/icons.umd.js +1 -1
  124. package/dist/props/index.d.ts +38 -16
  125. package/dist/resolvers/unplugin.es.js +6 -3
  126. package/dist/resolvers/unplugin.umd.js +1 -1
  127. package/dist/stories/Accordion/Accordion.settings.d.ts +18 -17
  128. package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
  129. package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
  130. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +23 -4
  131. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +134 -0
  132. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +894 -0
  133. package/dist/stories/Alert/Alert.settings.d.ts +105 -0
  134. package/dist/stories/Alert/Alert.stories.d.ts +9 -0
  135. package/dist/stories/Alert/Alert.test.d.ts +2 -0
  136. package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
  137. package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
  138. package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +97 -0
  139. package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
  140. package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
  141. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
  142. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
  143. package/dist/stories/Avatar/Avatar.settings.d.ts +2 -33
  144. package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
  145. package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
  146. package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
  147. package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
  148. package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +0 -6
  149. package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
  150. package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
  151. package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
  152. package/dist/stories/Badge/Badge.settings.d.ts +0 -3
  153. package/dist/stories/Badge/Badge.stories.d.ts +7 -0
  154. package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
  155. package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
  156. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
  157. package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
  158. package/dist/stories/Button/Button.settings.d.ts +1 -18
  159. package/dist/stories/Button/Button.stories.d.ts +6 -0
  160. package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
  161. package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
  162. package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
  163. package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
  164. package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
  165. package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
  166. package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
  167. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +0 -4
  168. package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
  169. package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
  170. package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
  171. package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
  172. package/dist/stories/Card/Card.settings.d.ts +0 -3
  173. package/dist/stories/Card/Card.stories.d.ts +6 -0
  174. package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
  175. package/dist/stories/Checkbox/Checkbox.settings.d.ts +1 -21
  176. package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
  177. package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
  178. package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
  179. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -27
  180. package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
  181. package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
  182. package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
  183. package/dist/stories/Combobox/Combobox.settings.d.ts +2 -54
  184. package/dist/stories/Combobox/Combobox.stories.d.ts +21 -0
  185. package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
  186. package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +8 -0
  187. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +9 -0
  188. package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
  189. package/dist/stories/Dialog/Dialog.settings.d.ts +1 -1
  190. package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
  191. package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
  192. package/dist/stories/Dropdown/Dropdown.settings.d.ts +1 -1
  193. package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
  194. package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
  195. package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
  196. package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
  197. package/dist/stories/Icon/Icon.settings.d.ts +1 -3
  198. package/dist/stories/Icon/Icon.stories.d.ts +8 -0
  199. package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
  200. package/dist/stories/InputText/InputText.settings.d.ts +1 -74
  201. package/dist/stories/InputText/InputText.stories.d.ts +15 -0
  202. package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
  203. package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
  204. package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
  205. package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
  206. package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
  207. package/dist/stories/Nav/Nav.settings.d.ts +0 -3
  208. package/dist/stories/Nav/Nav.stories.d.ts +6 -0
  209. package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
  210. package/dist/stories/Progress/Progress.settings.d.ts +0 -6
  211. package/dist/stories/Progress/Progress.stories.d.ts +7 -0
  212. package/dist/stories/Radio/Radio.settings.d.ts +1 -19
  213. package/dist/stories/Radio/Radio.stories.d.ts +11 -0
  214. package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
  215. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -27
  216. package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
  217. package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
  218. package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
  219. package/dist/stories/Select/Select.settings.d.ts +1 -47
  220. package/dist/stories/Select/Select.stories.d.ts +15 -0
  221. package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
  222. package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
  223. package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
  224. package/dist/stories/Tab/Tab.stories.d.ts +6 -0
  225. package/dist/stories/Textarea/Textarea.settings.d.ts +1 -43
  226. package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
  227. package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
  228. package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
  229. package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
  230. package/dist/stories/Tooltip/Tooltip.settings.d.ts +2 -39
  231. package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
  232. package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
  233. package/dist/stories/argTypes.d.ts +5 -125
  234. package/package.json +68 -52
  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/index.ts +2 -4
  239. package/src/components/VvAccordionGroup/index.ts +3 -4
  240. package/src/components/VvAction/VvAction.vue +1 -1
  241. package/src/components/VvAlert/VvAlert.vue +54 -0
  242. package/src/components/VvAlert/index.ts +162 -0
  243. package/src/components/VvAlertGroup/VvAlertGroup.vue +34 -0
  244. package/src/components/VvAlertGroup/index.ts +122 -0
  245. package/src/components/VvCard/index.ts +3 -1
  246. package/src/components/VvCheckbox/VvCheckbox.vue +23 -2
  247. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +15 -2
  248. package/src/components/VvCombobox/VvCombobox.vue +41 -24
  249. package/src/components/VvCombobox/index.ts +9 -3
  250. package/src/components/VvDialog/VvDialog.vue +11 -7
  251. package/src/components/VvDialog/index.ts +2 -2
  252. package/src/components/VvDropdown/VvDropdown.vue +23 -5
  253. package/src/components/VvDropdown/VvDropdownItem.vue +2 -2
  254. package/src/components/VvIcon/VvIcon.vue +37 -34
  255. package/src/components/VvIcon/index.ts +2 -2
  256. package/src/components/VvInputText/VvInputText.vue +26 -9
  257. package/src/components/VvRadio/VvRadio.vue +23 -2
  258. package/src/components/VvRadioGroup/VvRadioGroup.vue +15 -2
  259. package/src/components/VvSelect/VvSelect.vue +26 -9
  260. package/src/components/VvTextarea/VvTextarea.vue +26 -9
  261. package/src/components/common/HintSlot.ts +129 -170
  262. package/src/composables/alert/useInjectAlert.ts +8 -0
  263. package/src/composables/alert/useProvideAlert.ts +23 -0
  264. package/src/composables/dropdown/useInjectDropdown.ts +3 -28
  265. package/src/composables/dropdown/useProvideDropdown.ts +14 -15
  266. package/src/composables/useOptions.ts +9 -7
  267. package/src/composables/useVolver.ts +1 -2
  268. package/src/constants.ts +42 -4
  269. package/src/props/index.ts +5 -3
  270. package/src/resolvers/unplugin.ts +6 -3
  271. package/src/stories/Accordion/Accordion.settings.ts +18 -7
  272. package/src/stories/Accordion/Accordion.stories.ts +45 -0
  273. package/src/stories/Accordion/AccordionSlots.stories.ts +29 -0
  274. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +22 -0
  275. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +62 -0
  276. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +53 -0
  277. package/src/stories/Alert/Alert.settings.ts +110 -0
  278. package/src/stories/Alert/Alert.stories.ts +60 -0
  279. package/src/stories/Alert/Alert.test.ts +95 -0
  280. package/src/stories/Alert/AlertModifiers.stories.ts +77 -0
  281. package/src/stories/Alert/AlertSlots.stories.ts +74 -0
  282. package/src/stories/AlertGroup/AlertGroup.settings.ts +110 -0
  283. package/src/stories/AlertGroup/AlertGroup.stories.ts +50 -0
  284. package/src/stories/AlertGroup/AlertGroup.test.ts +76 -0
  285. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +103 -0
  286. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +67 -0
  287. package/src/stories/Avatar/Avatar.settings.ts +7 -6
  288. package/src/stories/Avatar/Avatar.stories.ts +42 -0
  289. package/src/stories/Avatar/Avatar.test.ts +1 -1
  290. package/src/stories/Avatar/AvatarBadge.stories.ts +36 -0
  291. package/src/stories/Avatar/AvatarModifiers.stories.ts +100 -0
  292. package/src/stories/Avatar/AvatarSlots.stories.ts +34 -0
  293. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
  294. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
  295. package/src/stories/AvatarGroup/{AvatarGroupSlotDefault.stories.mdx → AvatarGroupSlotDefault.stories.ts} +24 -30
  296. package/src/stories/Badge/Badge.stories.ts +43 -0
  297. package/src/stories/Badge/BadgeSlots.stories.ts +23 -0
  298. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +41 -0
  299. package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
  300. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +37 -0
  301. package/src/stories/Button/Button.settings.ts +2 -11
  302. package/src/stories/Button/Button.stories.ts +38 -0
  303. package/src/stories/Button/ButtonIcon.stories.ts +67 -0
  304. package/src/stories/Button/ButtonLink.stories.ts +40 -0
  305. package/src/stories/Button/ButtonLoading.stories.ts +41 -0
  306. package/src/stories/Button/ButtonModifiers.stories.ts +158 -0
  307. package/src/stories/Button/ButtonSlots.stories.ts +87 -0
  308. package/src/stories/Button/ButtonState.stories.ts +42 -0
  309. package/src/stories/Button/ButtonToggle.stories.ts +52 -0
  310. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +39 -0
  311. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +39 -0
  312. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +38 -0
  313. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +41 -0
  314. package/src/stories/Card/Card.stories.ts +46 -0
  315. package/src/stories/Card/CardSlots.stories.ts +81 -0
  316. package/src/stories/Checkbox/Checkbox.settings.ts +0 -2
  317. package/src/stories/Checkbox/Checkbox.stories.ts +97 -0
  318. package/src/stories/Checkbox/CheckboxBinary.stories.ts +33 -0
  319. package/src/stories/Checkbox/CheckboxSlots.stories.ts +31 -0
  320. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +87 -0
  321. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +53 -0
  322. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +47 -0
  323. package/src/stories/Combobox/Combobox.settings.ts +3 -23
  324. package/src/stories/Combobox/Combobox.stories.ts +176 -0
  325. package/src/stories/Combobox/Combobox.test.ts +2 -2
  326. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +43 -0
  327. package/src/stories/Combobox/ComboboxMultiple.stories.ts +41 -0
  328. package/src/stories/Combobox/ComboboxOptions.stories.ts +78 -0
  329. package/src/stories/Combobox/ComboboxSlots.stories.ts +104 -0
  330. package/src/stories/Dialog/Dialog.settings.ts +1 -1
  331. package/src/stories/Dialog/Dialog.stories.ts +51 -0
  332. package/src/stories/Dialog/Dialog.test.ts +2 -2
  333. package/src/stories/Dialog/DialogSlots.stories.ts +39 -0
  334. package/src/stories/Dropdown/Dropdown.stories.ts +107 -0
  335. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +49 -0
  336. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +61 -0
  337. package/src/stories/Dropdown/DropdownSlots.stories.ts +95 -0
  338. package/src/stories/Icon/Icon.settings.ts +1 -0
  339. package/src/stories/Icon/Icon.stories.ts +48 -0
  340. package/src/stories/Icon/IconsCollection.stories.ts +53 -0
  341. package/src/stories/InputText/InputText.settings.ts +3 -39
  342. package/src/stories/InputText/InputText.stories.ts +121 -0
  343. package/src/stories/InputText/InputTextIconPosition.stories.ts +43 -0
  344. package/src/stories/InputText/InputTextLength.stories.ts +58 -0
  345. package/src/stories/InputText/InputTextMinMax.stories.ts +51 -0
  346. package/src/stories/InputText/InputTextSlots.stories.ts +39 -0
  347. package/src/stories/InputText/InputTextType.stories.ts +119 -0
  348. package/src/stories/Nav/Nav.stories.ts +33 -0
  349. package/src/stories/Nav/NavModifiers.stories.ts +47 -0
  350. package/src/stories/Progress/Progress.settings.ts +0 -3
  351. package/src/stories/Progress/Progress.stories.ts +41 -0
  352. package/src/stories/Radio/Radio.stories.ts +81 -0
  353. package/src/stories/Radio/RadioSlots.stories.ts +31 -0
  354. package/src/stories/RadioGroup/RadioGroup.stories.ts +88 -0
  355. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +53 -0
  356. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +47 -0
  357. package/src/stories/Select/Select.settings.ts +0 -5
  358. package/src/stories/Select/Select.stories.ts +113 -0
  359. package/src/stories/Select/SelectIconPosition.stories.ts +43 -0
  360. package/src/stories/Select/SelectOptions.stories.ts +77 -0
  361. package/src/stories/Select/SelectSlots.stories.ts +39 -0
  362. package/src/stories/Tab/Tab.stories.ts +70 -0
  363. package/src/stories/Textarea/Textarea.settings.ts +0 -8
  364. package/src/stories/Textarea/Textarea.stories.ts +107 -0
  365. package/src/stories/Textarea/TextareaLength.stories.ts +58 -0
  366. package/src/stories/Textarea/TextareaSlots.stories.ts +39 -0
  367. package/src/stories/Textarea/TextareatIconPosition.stories.ts +43 -0
  368. package/src/stories/Tooltip/Tooltip.settings.ts +4 -4
  369. package/src/stories/Tooltip/Tooltip.stories.ts +40 -0
  370. package/src/stories/Tooltip/TooltipDirective.stories.ts +68 -0
  371. package/src/stories/argTypes.ts +5 -59
  372. package/src/stories/Accordion/Accordion.stories.mdx +0 -45
  373. package/src/stories/Accordion/AccordionSlots.stories.mdx +0 -58
  374. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +0 -58
  375. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +0 -59
  376. package/src/stories/Avatar/Avatar.stories.mdx +0 -40
  377. package/src/stories/Avatar/AvatarBadge.stories.mdx +0 -41
  378. package/src/stories/Avatar/AvatarModifiers.stories.mdx +0 -87
  379. package/src/stories/Avatar/AvatarSlotDefault.stories.mdx +0 -29
  380. package/src/stories/AvatarGroup/AvatarGroup.stories.mdx +0 -30
  381. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.mdx +0 -24
  382. package/src/stories/Badge/Badge.stories.mdx +0 -51
  383. package/src/stories/Badge/BadgeSlots.stories.mdx +0 -20
  384. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +0 -50
  385. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +0 -43
  386. package/src/stories/Button/Button.stories.mdx +0 -35
  387. package/src/stories/Button/ButtonIcon.stories.mdx +0 -153
  388. package/src/stories/Button/ButtonLink.stories.mdx +0 -72
  389. package/src/stories/Button/ButtonLoading.stories.mdx +0 -108
  390. package/src/stories/Button/ButtonModifiers.stories.mdx +0 -257
  391. package/src/stories/Button/ButtonSlots.stories.mdx +0 -116
  392. package/src/stories/Button/ButtonState.stories.mdx +0 -66
  393. package/src/stories/Button/ButtonToggle.stories.mdx +0 -112
  394. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +0 -37
  395. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +0 -52
  396. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +0 -37
  397. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +0 -73
  398. package/src/stories/Card/Card.stories.mdx +0 -40
  399. package/src/stories/Card/CardSlots.stories.mdx +0 -98
  400. package/src/stories/Checkbox/Checkbox.stories.mdx +0 -164
  401. package/src/stories/Checkbox/CheckboxBinary.stories.mdx +0 -68
  402. package/src/stories/Checkbox/CheckboxSlots.stories.mdx +0 -46
  403. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +0 -135
  404. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +0 -100
  405. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +0 -68
  406. package/src/stories/Combobox/Combobox.stories.mdx +0 -324
  407. package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +0 -78
  408. package/src/stories/Combobox/ComboboxMultiple.stories.mdx +0 -73
  409. package/src/stories/Combobox/ComboboxOptions.stories.mdx +0 -135
  410. package/src/stories/Combobox/ComboboxSlots.stories.mdx +0 -153
  411. package/src/stories/Dialog/Dialog.stories.mdx +0 -56
  412. package/src/stories/Dialog/DialogSlots.stories.mdx +0 -63
  413. package/src/stories/Dropdown/Dropdown.stories.mdx +0 -124
  414. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +0 -41
  415. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +0 -56
  416. package/src/stories/Dropdown/DropdownSlots.stories.mdx +0 -114
  417. package/src/stories/Icon/Icon.stories.mdx +0 -91
  418. package/src/stories/Icon/IconsCollection.stories.mdx +0 -69
  419. package/src/stories/InputText/InputText.stories.mdx +0 -211
  420. package/src/stories/InputText/InputTextIconPosition.stories.mdx +0 -78
  421. package/src/stories/InputText/InputTextLength.stories.mdx +0 -110
  422. package/src/stories/InputText/InputTextMinMax.stories.mdx +0 -112
  423. package/src/stories/InputText/InputTextSlots.stories.mdx +0 -69
  424. package/src/stories/InputText/InputTextType.stories.mdx +0 -259
  425. package/src/stories/Nav/Nav.stories.mdx +0 -28
  426. package/src/stories/Nav/NavModifiers.stories.mdx +0 -48
  427. package/src/stories/Progress/Progress.stories.mdx +0 -30
  428. package/src/stories/Radio/Radio.stories.mdx +0 -128
  429. package/src/stories/Radio/RadioSlots.stories.mdx +0 -46
  430. package/src/stories/RadioGroup/RadioGroup.stories.mdx +0 -135
  431. package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +0 -100
  432. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +0 -68
  433. package/src/stories/Select/Select.stories.mdx +0 -196
  434. package/src/stories/Select/SelectIconPosition.stories.mdx +0 -78
  435. package/src/stories/Select/SelectOptions.stories.mdx +0 -135
  436. package/src/stories/Select/SelectSlots.stories.mdx +0 -48
  437. package/src/stories/Tab/Tab.stories.mdx +0 -65
  438. package/src/stories/Textarea/Textarea.stories.mdx +0 -187
  439. package/src/stories/Textarea/TextareaLength.stories.mdx +0 -110
  440. package/src/stories/Textarea/TextareaSlots.stories.mdx +0 -69
  441. package/src/stories/Textarea/TextareatIconPosition.stories.mdx +0 -78
  442. package/src/stories/Tooltip/Tooltip.stories.mdx +0 -102
  443. package/src/stories/Tooltip/TooltipDirective.stories.mdx +0 -99
@@ -43,8 +43,12 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
43
43
  return AnchorTarget2;
44
44
  })(AnchorTarget || {});
45
45
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
46
- const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for("dropdownTrigger");
47
- const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for("dropdownAction");
46
+ const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
47
+ "dropdownTrigger"
48
+ );
49
+ const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
50
+ "dropdownAction"
51
+ );
48
52
  const LinkProps = {
49
53
  /**
50
54
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -193,11 +197,11 @@ const ModifiersProps = {
193
197
  default: false
194
198
  },
195
199
  /**
196
- * Close dropdown on click outside
200
+ * Keep open dropdown on click outside
197
201
  */
198
- autoClose: {
202
+ keepOpen: {
199
203
  type: Boolean,
200
- default: true
204
+ default: false
201
205
  },
202
206
  /**
203
207
  * Autofocus first item on dropdown open
@@ -264,11 +268,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
264
268
  ...__default__,
265
269
  props: VvActionProps,
266
270
  emits: VvActionEvents,
267
- setup(__props, { expose, emit }) {
271
+ setup(__props, { expose: __expose, emit }) {
268
272
  const props = __props;
269
273
  const volver = useVolver();
270
274
  const element = ref(null);
271
- expose({ $el: element });
275
+ __expose({ $el: element });
272
276
  const {
273
277
  reference: dropdownTriggerReference,
274
278
  bus: dropdownEventBus,
@@ -303,7 +307,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
303
307
  const toReturn = {
304
308
  ...dropdownAria == null ? void 0 : dropdownAria.value,
305
309
  "aria-pressed": pressed.value ? true : void 0,
306
- role
310
+ role: role == null ? void 0 : role.value
307
311
  };
308
312
  switch (hasTag.value) {
309
313
  case ActionTag.a:
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(l).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:Boolean},c={active:Boolean},f={pressed:Boolean},m={label:[String,Number]},v={modifiers:[String,Array]};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const p={...d,...m,...f,...c,...u,type:{type:String,default:n.button,validator:e=>Object.values(n).includes(e)}},b={...v,items:{type:Array,required:!0,default:()=>[]}},k={...v,items:{type:Array,required:!0,default:()=>[]}},y=p;const g=e.defineComponent({name:"VvAction",props:y,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const l=t,u=e.inject(a),d=e.ref(null);o({$el:d});const{reference:c,bus:f,aria:m,expanded:v}=e.inject(i,{});e.watch((()=>d.value),(e=>{c&&(c.value=e)}));const p=e.computed((()=>l.pressed||(null==v?void 0:v.value))),{role:b}=e.inject(s,{}),k=e.computed((()=>{switch(!0){case l.disabled:return r.button;case void 0!==l.to:return(null==u?void 0:u.nuxt)?r.nuxtLink:r.routerLink;case void 0!==l.href:return r.a;default:return r.button}})),y=e.computed((()=>{const e={...null==m?void 0:m.value,"aria-pressed":!!p.value||void 0,role:b};switch(k.value){case r.a:return{...e,href:l.href,target:l.target,rel:l.rel};case r.routerLink:case r.nuxtLink:return{...e,to:l.to,target:l.target};default:return{...e,type:l.type,disabled:l.disabled}}})),g=e=>{l.disabled?e.preventDefault():(null==f||f.emit("click",e),n("click",e))},B=e=>{null==f||f.emit("mouseover",e),n("mouseover",e)},_=e=>{null==f||f.emit("mouseleave",e),n("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),e.mergeProps(e.unref(y),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(p),disabled:t.disabled},onClickPassive:g,onMouseoverPassive:B,onMouseleavePassive:_}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});function B(t,o,n){return e.computed((()=>{const r={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{r[`${t}--${o}`]=e.unref(n.value[o])})),r}))}const _={class:"vv-nav__menu",role:"menu","aria-busy":"true"},h=e.defineComponent({__name:"VvNav",props:k,emits:["click"],setup(t,{emit:o}){const n=t,{modifiers:r,items:l}=e.toRefs(n),a=e.ref(null),i=B("vv-nav",r),s=e.computed((()=>l.value.map(((e,t)=>({...e,id:e.id||`nav-item_${t}`})))));return(t,n)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i))},[e.createElementVNode("ul",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(t=>(e.openBlock(),e.createElementBlock("li",{key:t.id,class:"vv-nav__item",role:"presentation"},[e.createVNode(g,e.mergeProps({disabled:t.disabled,to:t.to,href:t.href,tabindex:0},{class:[{current:e.unref(a)==t.id,disabled:t.disabled},"vv-nav__item-label"]},e.toHandlers(t.on||{}),{onClick:e=>{var n;(n=t).disabled||(o("click",n),a.value=n.id)}}),{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),_:2},1040,["class","onClick"])])))),128))])],2))}}),x=["id"];return e.defineComponent({__name:"VvTab",props:b,emits:["click"],setup(t,{emit:o}){const n=t,{modifiers:r,items:l}=e.toRefs(n),a=e.ref(null),i=B("vv-tab",r),s=e.computed((()=>l.value.map(((e,t)=>({...e,id:e.id||`tab-item_${t}`})))));function u(e){e.disabled||(o("click",e),a.value=e.id)}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i))},[e.createVNode(h,{items:e.unref(s),modifiers:"tabs full",onClick:u},null,8,["items"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(o=>(e.openBlock(),e.createElementBlock("article",{id:o.id,key:o.id,class:e.normalizeClass([{target:e.unref(a)===o.id},"vv-tab__panel"])},[e.renderSlot(t.$slots,`${o.id}`)],10,x)))),128))],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{}),r=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(r||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(r).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:Boolean},c={active:Boolean},v={pressed:Boolean},f={label:[String,Number]},m={modifiers:[String,Array]};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const p={...d,...f,...v,...c,...u,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)}},b={...m,items:{type:Array,required:!0,default:()=>[]}},k={...m,items:{type:Array,required:!0,default:()=>[]}},y=p;const g=e.defineComponent({name:"VvAction",props:y,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:l}){const r=t,u=e.inject(a),d=e.ref(null);o({$el:d});const{reference:c,bus:v,aria:f,expanded:m}=e.inject(i,{});e.watch((()=>d.value),(e=>{c&&(c.value=e)}));const p=e.computed((()=>r.pressed||(null==m?void 0:m.value))),{role:b}=e.inject(s,{}),k=e.computed((()=>{switch(!0){case r.disabled:return n.button;case void 0!==r.to:return(null==u?void 0:u.nuxt)?n.nuxtLink:n.routerLink;case void 0!==r.href:return n.a;default:return n.button}})),y=e.computed((()=>{const e={...null==f?void 0:f.value,"aria-pressed":!!p.value||void 0,role:null==b?void 0:b.value};switch(k.value){case n.a:return{...e,href:r.href,target:r.target,rel:r.rel};case n.routerLink:case n.nuxtLink:return{...e,to:r.to,target:r.target};default:return{...e,type:r.type,disabled:r.disabled}}})),g=e=>{r.disabled?e.preventDefault():(null==v||v.emit("click",e),l("click",e))},B=e=>{null==v||v.emit("mouseover",e),l("mouseover",e)},_=e=>{null==v||v.emit("mouseleave",e),l("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),e.mergeProps(e.unref(y),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(p),disabled:t.disabled},onClickPassive:g,onMouseoverPassive:B,onMouseleavePassive:_}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});function B(t,o,l){return e.computed((()=>{const n={[t]:!0},r="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return r&&Array.isArray(r)&&r.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{n[`${t}--${o}`]=e.unref(l.value[o])})),n}))}const _={class:"vv-nav__menu",role:"menu","aria-busy":"true"},h=e.defineComponent({__name:"VvNav",props:k,emits:["click"],setup(t,{emit:o}){const l=t,{modifiers:n,items:r}=e.toRefs(l),a=e.ref(null),i=B("vv-nav",n),s=e.computed((()=>r.value.map(((e,t)=>({...e,id:e.id||`nav-item_${t}`})))));return(t,l)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i))},[e.createElementVNode("ul",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(t=>(e.openBlock(),e.createElementBlock("li",{key:t.id,class:"vv-nav__item",role:"presentation"},[e.createVNode(g,e.mergeProps({disabled:t.disabled,to:t.to,href:t.href,tabindex:0},{class:[{current:e.unref(a)==t.id,disabled:t.disabled},"vv-nav__item-label"]},e.toHandlers(t.on||{}),{onClick:e=>{var l;(l=t).disabled||(o("click",l),a.value=l.id)}}),{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),_:2},1040,["class","onClick"])])))),128))])],2))}}),x=["id"];return e.defineComponent({__name:"VvTab",props:b,emits:["click"],setup(t,{emit:o}){const l=t,{modifiers:n,items:r}=e.toRefs(l),a=e.ref(null),i=B("vv-tab",n),s=e.computed((()=>r.value.map(((e,t)=>({...e,id:e.id||`tab-item_${t}`})))));function u(e){e.disabled||(o("click",e),a.value=e.id)}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i))},[e.createVNode(h,{items:e.unref(s),modifiers:"tabs full",onClick:u},null,8,["items"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(o=>(e.openBlock(),e.createElementBlock("article",{id:o.id,key:o.id,class:e.normalizeClass([{target:e.unref(a)===o.id},"vv-tab__panel"])},[e.renderSlot(t.$slots,`${o.id}`)],10,x)))),128))],2))}})}));
@@ -17,7 +17,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
17
17
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
18
18
  }, {
19
19
  items: NavItem[];
20
- }>, Record<string, (_: {}) => any>>;
20
+ }, {}>, Partial<Record<string, (_: {}) => any>>>;
21
21
  export default _default;
22
22
  type __VLS_WithTemplateSlots<T, S> = T & {
23
23
  new (): {
@@ -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 = {
@@ -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))}})}));