@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,138 +1,122 @@
1
- import { unref, toRefs, computed, h, inject, defineComponent, ref, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withModifiers, withDirectives, isRef, vModelDynamic, createTextVNode, createVNode } from "vue";
1
+ import { unref, computed, defineComponent, h, inject, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withModifiers, withDirectives, isRef, vModelDynamic, createTextVNode, createVNode, createSlots, withCtx } from "vue";
2
2
  import { Mask } from "maska";
3
- import { toReactive, useFocus, useElementVisibility } from "@vueuse/core";
4
3
  import { iconExists, Icon, addIcon } from "@iconify/vue";
5
4
  import { nanoid } from "nanoid";
6
- function resolveFieldData(data, field) {
7
- if (data && Object.keys(data).length && field) {
8
- if (field.indexOf(".") === -1) {
9
- return data[field];
10
- } else {
11
- const fields = field.split(".");
12
- let value = data;
13
- for (let i = 0, len = fields.length; i < len; ++i) {
14
- if (data == null) {
15
- return null;
16
- }
17
- value = value[fields[i]];
18
- }
19
- return value;
20
- }
21
- } else {
22
- return null;
23
- }
24
- }
5
+ import { useFocus, useElementVisibility } from "@vueuse/core";
25
6
  function isEmpty(value) {
26
7
  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));
27
8
  }
28
9
  function isString(value) {
29
10
  return typeof value === "string" || value instanceof String;
30
11
  }
31
- function joinLines(errors) {
32
- if (Array.isArray(errors)) {
33
- return errors.filter((e) => isString(e)).join(" ");
12
+ function joinLines(items) {
13
+ if (Array.isArray(items)) {
14
+ return items.filter((item) => isString(item)).join(" ");
34
15
  }
35
- return errors;
16
+ return items;
36
17
  }
37
- function HintSlotFactory(parentProps, parentSlots) {
38
- const {
39
- invalid: invalidSlot,
40
- valid: validSlot,
41
- hint: hintSlot,
42
- loading: loadingSlot
43
- } = parentSlots;
44
- const {
45
- hintLabel,
46
- modelValue,
47
- valid,
48
- validLabel,
49
- invalid,
50
- invalidLabel,
51
- ...otherProps
52
- } = toRefs(parentProps);
53
- const loading = resolveFieldData(otherProps, "loading");
54
- const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
55
- const hasInvalid = computed(() => {
56
- if (!invalid.value) {
57
- return false;
58
- }
59
- if (invalid.value && invalidSlot) {
60
- return true;
61
- }
62
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
63
- return true;
64
- }
65
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
66
- return true;
67
- }
68
- return false;
69
- });
70
- const hasHint = computed(
71
- () => !!(hintLabel && hintLabel.value || hintSlot)
18
+ function HintSlotFactory(props, slots) {
19
+ const invalidLabel = computed(() => joinLines(props.invalidLabel));
20
+ const validLabel = computed(() => joinLines(props.validLabel));
21
+ const loadingLabel = computed(() => props.loadingLabel);
22
+ const hintLabel = computed(() => props.hintLabel);
23
+ const hasLoadingLabelOrSlot = computed(
24
+ () => Boolean(props.loading && (slots.loading || loadingLabel.value))
72
25
  );
73
- const hasValid = computed(
74
- () => !!(validLabel && validLabel.value || validSlot)
26
+ const hasInvalidLabelOrSlot = computed(
27
+ () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
75
28
  );
76
- const hasLoading = computed(
77
- () => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
29
+ const hasValidLabelOrSlot = computed(
30
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
31
+ );
32
+ const hasHintLabelOrSlot = computed(
33
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
78
34
  );
79
35
  const isVisible = computed(
80
- () => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
36
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
81
37
  );
82
- return {
83
- hasInvalid,
84
- hasHint,
85
- hasValid,
86
- hasLoading,
87
- HintSlot: {
88
- name: "HintSlot",
89
- props: {
90
- params: {
91
- type: Object,
92
- default: () => ({})
38
+ const hintSlotScope = computed(() => ({
39
+ modelValue: props.modelValue,
40
+ valid: props.valid,
41
+ invalid: props.invalid,
42
+ loading: props.loading
43
+ }));
44
+ const HintSlot = defineComponent({
45
+ name: "HintSlot",
46
+ props: {
47
+ tag: {
48
+ type: String,
49
+ default: "small"
50
+ }
51
+ },
52
+ setup() {
53
+ return {
54
+ isVisible,
55
+ invalidLabel,
56
+ validLabel,
57
+ loadingLabel,
58
+ hintLabel,
59
+ hasInvalidLabelOrSlot,
60
+ hasValidLabelOrSlot,
61
+ hasLoadingLabelOrSlot,
62
+ hasHintLabelOrSlot
63
+ };
64
+ },
65
+ render() {
66
+ var _a, _b, _c, _d, _e, _f, _g, _h;
67
+ if (this.isVisible) {
68
+ let role;
69
+ if (this.hasInvalidLabelOrSlot) {
70
+ role = "alert";
93
71
  }
94
- },
95
- setup(props) {
96
- const hintContent = computed(() => {
97
- const slotProps = toReactive({
98
- hintLabel,
99
- modelValue,
100
- valid,
101
- validLabel,
102
- invalid,
103
- invalidLabel,
104
- loading,
105
- loadingLabel,
106
- ...props.params
107
- });
108
- if (invalid == null ? void 0 : invalid.value) {
109
- return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
110
- }
111
- if (valid == null ? void 0 : valid.value)
112
- return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
113
- if (loading == null ? void 0 : loading.value)
114
- return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
115
- return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
116
- });
117
- return {
118
- isVisible,
119
- hasInvalid,
120
- hasValid,
121
- hintContent
122
- };
123
- },
124
- render() {
125
- if (this.isVisible) {
72
+ if (this.hasValidLabelOrSlot) {
73
+ role = "status";
74
+ }
75
+ if (this.hasLoadingLabelOrSlot) {
126
76
  return h(
127
- "small",
77
+ this.tag,
128
78
  {
129
- role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
79
+ role
130
80
  },
131
- this.hintContent
81
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
132
82
  );
133
83
  }
84
+ if (this.hasInvalidLabelOrSlot) {
85
+ return h(
86
+ this.tag,
87
+ {
88
+ role
89
+ },
90
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
91
+ );
92
+ }
93
+ if (this.hasValidLabelOrSlot) {
94
+ return h(
95
+ this.tag,
96
+ {
97
+ role
98
+ },
99
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
100
+ );
101
+ }
102
+ return h(
103
+ this.tag,
104
+ {
105
+ role
106
+ },
107
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
108
+ );
134
109
  }
110
+ return null;
135
111
  }
112
+ });
113
+ return {
114
+ hasInvalidLabelOrSlot,
115
+ hasHintLabelOrSlot,
116
+ hasValidLabelOrSlot,
117
+ hasLoadingLabelOrSlot,
118
+ hintSlotScope,
119
+ HintSlot
136
120
  };
137
121
  }
138
122
  const VvIconProps = {
@@ -223,7 +207,7 @@ const VvIconProps = {
223
207
  svg: String,
224
208
  /**
225
209
  * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
226
- * @values string | Array<string>
210
+ * @values string | string[]
227
211
  */
228
212
  modifiers: {
229
213
  type: [String, Array]
@@ -300,6 +284,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
300
284
  props: VvIconProps,
301
285
  setup(__props) {
302
286
  const props = __props;
287
+ const hasRotate = computed(() => {
288
+ if (typeof props.rotate === "string") {
289
+ return parseFloat(props.rotate);
290
+ }
291
+ return props.rotate;
292
+ });
303
293
  const show = ref(true);
304
294
  const volver = useVolver();
305
295
  const { modifiers } = toRefs(props);
@@ -308,25 +298,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
308
298
  return props.provider || (volver == null ? void 0 : volver.iconsProvider);
309
299
  });
310
300
  const icon = computed(() => {
311
- const _name = props.name ?? "";
312
- const iconName = `@${provider.value}:${props.prefix}:${props.name}`;
313
- if (iconExists(_name)) {
314
- return _name;
315
- } else if (iconExists(iconName)) {
301
+ const name = props.name ?? "";
302
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
303
+ if (iconExists(iconName)) {
316
304
  return iconName;
317
- } else {
318
- return (volver == null ? void 0 : volver.iconsCollections.find(
319
- (iconsCollection) => {
320
- const icon2 = `@${provider.value}:${iconsCollection.prefix}:${_name}`;
321
- if (iconExists(icon2)) {
322
- return icon2;
323
- }
324
- }
325
- )) || _name;
326
305
  }
306
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
307
+ (iconsCollection2) => {
308
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
309
+ return iconExists(icon2);
310
+ }
311
+ );
312
+ if (iconsCollection) {
313
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
314
+ }
315
+ return name;
327
316
  });
328
317
  function getSvgContent(svg) {
329
- let dom = null;
318
+ let dom;
330
319
  if (typeof window === "undefined") {
331
320
  const { JSDOM } = require("jsdom");
332
321
  dom = new JSDOM().window;
@@ -357,12 +346,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
357
346
  show.value = true;
358
347
  }
359
348
  }).catch((e) => {
360
- throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
349
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
361
350
  });
362
- } else if (props.svg) {
363
- addIconFromSvg(props.svg);
364
351
  }
365
352
  }
353
+ if (props.svg) {
354
+ addIconFromSvg(props.svg);
355
+ }
366
356
  return (_ctx, _cache) => {
367
357
  return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
368
358
  key: 0,
@@ -374,7 +364,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
374
364
  horizontalFlip: _ctx.horizontalFlip,
375
365
  verticalFlip: _ctx.verticalFlip,
376
366
  flip: _ctx.flip,
377
- rotate: _ctx.rotate,
367
+ rotate: unref(hasRotate),
378
368
  color: _ctx.color,
379
369
  onLoad: _ctx.onLoad,
380
370
  icon: unref(icon)
@@ -608,11 +598,11 @@ const IdProps = {
608
598
  default: false
609
599
  },
610
600
  /**
611
- * Close dropdown on click outside
601
+ * Keep open dropdown on click outside
612
602
  */
613
- autoClose: {
603
+ keepOpen: {
614
604
  type: Boolean,
615
- default: true
605
+ default: false
616
606
  },
617
607
  /**
618
608
  * Autofocus first item on dropdown open
@@ -1261,12 +1251,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1261
1251
  ...__default__,
1262
1252
  props: VvInputTextProps,
1263
1253
  emits: VvInputTextEvents,
1264
- setup(__props, { expose, emit }) {
1254
+ setup(__props, { expose: __expose, emit }) {
1265
1255
  const props = __props;
1266
1256
  const slots = useSlots();
1267
1257
  const inputEl = ref();
1268
1258
  const innerEl = ref();
1269
- expose({ $inner: innerEl });
1259
+ __expose({ $inner: innerEl });
1270
1260
  const {
1271
1261
  id,
1272
1262
  icon,
@@ -1279,7 +1269,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1279
1269
  loading
1280
1270
  } = toRefs(props);
1281
1271
  const hasId = useUniqueId(id);
1282
- const hasDescribedBy = computed(() => `${hasId.value}-hint`);
1272
+ const hasHintId = computed(() => `${hasId.value}-hint`);
1283
1273
  const inputTextPlaceholder = computed(
1284
1274
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
1285
1275
  );
@@ -1415,8 +1405,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1415
1405
  required: props.required,
1416
1406
  autocomplete: props.autocomplete,
1417
1407
  "aria-invalid": isInvalid.value,
1418
- "aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
1419
- "aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
1408
+ "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
1409
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
1420
1410
  };
1421
1411
  if (type === INPUT_TYPES.DATE || type === INPUT_TYPES.MONTH || type === INPUT_TYPES.WEEK || type === INPUT_TYPES.TIME || type === INPUT_TYPES.DATETIME_LOCAL || type === INPUT_TYPES.NUMBER) {
1422
1412
  toReturn.step = props.step;
@@ -1445,7 +1435,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1445
1435
  stepDown: onStepDown,
1446
1436
  clear: onClear
1447
1437
  }));
1448
- const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
1438
+ const {
1439
+ HintSlot,
1440
+ hasHintLabelOrSlot,
1441
+ hasInvalidLabelOrSlot,
1442
+ hintSlotScope
1443
+ } = HintSlotFactory(props, slots);
1449
1444
  const PasswordInputActions = VvInputTextActionsFactory(
1450
1445
  INPUT_TYPES.PASSWORD,
1451
1446
  props
@@ -1560,9 +1555,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1560
1555
  ])) : createCommentVNode("", true)
1561
1556
  ]),
1562
1557
  createVNode(unref(HintSlot), {
1563
- id: unref(hasDescribedBy),
1558
+ id: unref(hasHintId),
1564
1559
  class: "vv-input-text__hint"
1565
- }, null, 8, ["id"])
1560
+ }, createSlots({ _: 2 }, [
1561
+ _ctx.$slots.hint ? {
1562
+ name: "hint",
1563
+ fn: withCtx(() => [
1564
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1565
+ ]),
1566
+ key: "0"
1567
+ } : void 0,
1568
+ _ctx.$slots.loading ? {
1569
+ name: "loading",
1570
+ fn: withCtx(() => [
1571
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1572
+ ]),
1573
+ key: "1"
1574
+ } : void 0,
1575
+ _ctx.$slots.valid ? {
1576
+ name: "valid",
1577
+ fn: withCtx(() => [
1578
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1579
+ ]),
1580
+ key: "2"
1581
+ } : void 0,
1582
+ _ctx.$slots.invalid ? {
1583
+ name: "invalid",
1584
+ fn: withCtx(() => [
1585
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1586
+ ]),
1587
+ key: "3"
1588
+ } : void 0
1589
+ ]), 1032, ["id"])
1566
1590
  ], 2);
1567
1591
  };
1568
1592
  }
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("maska"),require("@vueuse/core"),require("@iconify/vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","maska","@vueuse/core","@iconify/vue","nanoid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.maska,e.core,e.vue$1,e.nanoid)}(this,(function(e,t,o,n,l){"use strict";function a(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const o=t.split(".");let n=e;for(let t=0,l=o.length;t<l;++t){if(null==e)return null;n=n[o[t]]}return n}}return null}function i(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 r(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const u={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 d=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(d||{}),s=(e=>(e.before="before",e.after="after",e))(s||{}),c=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(c||{});const p=Symbol.for("volver");function v(t,o,n){return e.computed((()=>{const l={[t]:!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&&(l[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{l[`${t}--${o}`]=e.unref(n.value[o])})),l}))}const m=e.defineComponent({name:"VvIcon",props:u,setup(t){const o=t,l=e.ref(!0),a=e.inject(p),{modifiers:i}=e.toRefs(o),r=v("vv-icon",i),u=e.computed((()=>o.provider||(null==a?void 0:a.iconsProvider))),d=e.computed((()=>{const e=o.name??"",t=`@${u.value}:${o.prefix}:${o.name}`;return n.iconExists(e)?e:n.iconExists(t)?t:(null==a?void 0:a.iconsCollections.find((t=>{const o=`@${u.value}:${t.prefix}:${e}`;if(n.iconExists(o))return o})))||e}));function s(e){const t=function(e){let t=null;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),l=(null==t?void 0:t.innerHTML.trim())||"";t&&l&&n.addIcon(`@${u.value}:${o.prefix}:${o.name}`,{body:l,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return a&&(o.src&&!n.iconExists(`@${u.value}:${o.prefix}:${o.name}`)?(l.value=!1,a.fetchIcon(o.src).then((e=>{e&&(s(e),l.value=!0)})).catch((e=>{throw new Error(`During fetch icon: ${null==e?void 0:e.message}`)}))):o.svg&&s(o.svg)),(t,o)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(n.Icon),e.mergeProps({key:0,class:e.unref(r)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:t.rotate,color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),f={valid:Boolean,validLabel:[String,Array]},h={invalid:Boolean,invalidLabel:[String,Array]},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},y=(Boolean,Boolean,{label:[String,Number]}),S={readonly:Boolean},w={modifiers:[String,Array]},k={hintLabel:{type:String,default:""}},B={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},E={debounce:[Number,String]},x={icon:{type:[String,Object]},iconPosition:{type:String,default:s.before,validation:e=>Object.values(s).includes(e)}},T={tabindex:{type:[String,Number],default:0}},L={floating:Boolean},A={id:[String,Number]};d.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const C={...{...A,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...T,...g,...S,...f,...h,...k,...b,...w,...B,...E,...x,...L,...y,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};c.button;const P={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},I="eye-on",V="eye-off",_="calendar",D="time",N="color",R="close",$={...C,modelValue:[String,Number],type:{type:String,default:P.TEXT,validator:e=>Object.values(P).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:String,default:I},iconHidePassword:{type:String,default:V},iconClear:{type:String,default:R},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},mask:{type:String,default:void 0},maskEager:{type:Boolean,default:!1},maskReversed:{type:Boolean,default:!1},maskTokens:{type:Object,default:void 0},maskTokensReplace:{type:Boolean,default:!1},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String}},H=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:String,default:I},iconHide:{type:String,default:V}},emits:["toggle-password"],setup(t,{emit:o}){const n=e.ref(!1),l=e.computed((()=>n.value?t.iconHide:t.iconShow));return{active:n,activeIcon:l,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(n.value=!n.value,o("toggle-password",n.value))}}},render(){const t=e.h(m,{name:this.activeIcon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),M=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:o}){const n=e.computed((()=>"up"===t.mode));return{isUp:n,onClick:e=>{null==e||e.stopPropagation(),t.disabled||o(n.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),O=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:String,default:"close"}},emits:["clear"],setup:(e,{emit:t})=>({onClick:function(o){null==o||o.stopPropagation(),e.disabled||t("clear")}}),render(){const t=e.h(m,{name:this.icon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function U(t,o){return{name:"VvInputTextActions",components:{VvIcon:m,VvInputPasswordAction:H,VvInputStepAction:M,VvInputClearAction:O},setup:()=>({isDisabled:e.computed((()=>o.disabled||o.readonly)),labelStepUp:o.labelStepUp,labelStepDown:o.labelStepDown,labelShowPassword:o.labelShowPassword,labelHidePassword:o.labelHidePassword,labelClear:o.labelClear,iconShowPassword:o.iconShowPassword,iconHidePassword:o.iconHidePassword}),render(){let n=null;switch(t){case P.SEARCH:{const{onClear:t}=this.$attrs;n=[e.h(O,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case P.PASSWORD:{const{onTogglePassword:t}=this.$attrs;n=[e.h(H,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case P.NUMBER:{const{onStepUp:t,onStepDown:l}=this.$attrs;n=[e.h(M,{mode:"up",disabled:this.isDisabled||void 0!==o.max&&o.modelValue===o.max,label:this.labelStepUp,onStepUp:t,onStepDown:l}),e.h(M,{mode:"down",disabled:this.isDisabled||void 0!==o.min&&o.modelValue===o.min,label:this.labelStepDown,onStepUp:t,onStepDown:l})];break}}return Array.isArray(n)?e.h("div",{class:"vv-input-text__actions-group"},n):n}}}const j=["for"],W={class:"vv-input-text__wrapper"},q={key:0,class:"vv-input-text__input-before"},F=["onClick"],z=["id"],X={key:1,class:"vv-input-text__unit"},K={key:5,class:"vv-input-text__input-after"},J={key:6,class:"vv-input-text__limit"};return e.defineComponent({name:"VvInputText",props:$,emits:["update:modelValue","focus","blur","keyup"],setup(n,{expose:u,emit:c}){const p=n,f=e.useSlots(),h=e.ref(),b=e.ref();u({$inner:b});const{id:g,icon:y,iconPosition:S,label:w,modelValue:k,count:B,valid:E,invalid:x,loading:T}=e.toRefs(p),L=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.nanoid()))))(g),A=e.computed((()=>`${L.value}-hint`)),C=e.computed((()=>p.floating&&i(p.placeholder)?" ":p.placeholder)),I=function(t,o,n=0,{getter:l=(e=>e),setter:a=(e=>e)}={}){let i;return"string"==typeof n&&(n=parseInt(n)),e.computed({get:()=>l(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",a(e))}),n)}})}(k,c,p.debounce,{getter:e=>we.value?we.value.masked(e??""):e,setter:e=>(we.value&&(e=we.value.unmasked(e)),p.type===P.NUMBER?Number(e):e)}),{focused:V}=function(t,n){const{focused:l}=o.useFocus(t);return e.watch(l,(o=>{n(o?"focus":"blur",e.unref(t))})),{focused:l}}(h,c),R=e.computed((()=>V.value&&!p.disabled&&!p.readonly)),$=o.useElementVisibility(h);e.watch($,(e=>{e&&p.autofocus&&!p.disabled&&!p.readonly&&(V.value=!0)}));const H=e.ref(!1),M=e.computed((()=>p.type===P.PASSWORD)),O=()=>{H.value=!H.value},G=e.computed((()=>p.type===P.TIME||p.type===P.DATETIME_LOCAL||p.type===P.DATE||p.type===P.WEEK||p.type===P.MONTH)),Q=e.computed((()=>p.type===P.NUMBER)),Y=()=>{re.value&&(h.value.stepUp(),I.value=e.unref(h).value)},Z=()=>{re.value&&(h.value.stepDown(),I.value=e.unref(h).value)},ee=e.computed((()=>p.type===P.SEARCH)),te=()=>{I.value=void 0},{hasIcon:oe,hasIconBefore:ne,hasIconAfter:le}=function(t,o){const n=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===s.before))),l=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===s.after))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===d.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===d.right))),r=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===d.top))),u=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===d.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:a,hasIconRight:i,hasIconTop:r,hasIconBottom:u,hasIconBefore:n,hasIconAfter:l}}(y,S),ae=e.computed((()=>{switch(p.type){case P.COLOR:return{name:N};case P.DATE:case P.DATETIME_LOCAL:case P.WEEK:case P.MONTH:return{name:_};case P.TIME:return{name:D};default:return""}})),{formatted:ie}=function(t,o){const n=e.computed((()=>(e.unref(t)??"").length)),l=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&n.value<(null==o?void 0:o.lowerLimit)?n.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&n.value<(null==o?void 0:o.upperLimit)?o.upperLimit-n.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`${n.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===l.value)return;return l}return n.value}));return{length:n,gap:l,formatted:a}}(I,{mode:p.count,upperLimit:Number(p.maxlength),lowerLimit:Number(p.minlength)}),re=e.computed((()=>!p.disabled&&!p.readonly)),ue=e.computed((()=>re.value?p.tabindex:-1)),de=e.computed((()=>!i(k))),se=e.computed((()=>!0===x.value||!0!==E.value&&void 0)),{modifiers:ce}=e.toRefs(p),pe=v("vv-input-text",ce,e.computed((()=>({valid:E.value,invalid:x.value,loading:T.value,disabled:p.disabled,readonly:p.readonly,"icon-before":ne.value,"icon-after":le.value||!i(ae),floating:p.floating&&!i(p.label),dirty:de.value,focus:R.value,"auto-width":p.autoWidth})))),ve=e.computed((()=>{const e=M.value&&H.value?P.TEXT:!G.value||de.value||V.value?p.type:P.TEXT,t={type:e,name:p.name,tabindex:ue.value,disabled:p.disabled,readonly:p.readonly,required:p.required,autocomplete:p.autocomplete,"aria-invalid":se.value,"aria-describedby":!be.value&&he.value?A.value:void 0,"aria-errormessage":be.value?A.value:void 0};return e!==P.DATE&&e!==P.MONTH&&e!==P.WEEK&&e!==P.TIME&&e!==P.DATETIME_LOCAL&&e!==P.NUMBER||(t.step=p.step,t.max=void 0!==p.max?String(p.max):void 0,t.min=void 0!==p.min?String(p.min):void 0),e!==P.TEXT&&e!==P.SEARCH&&e!==P.URL&&e!==P.TEL&&e!==P.EMAIL&&e!==P.PASSWORD&&e!==P.NUMBER||(t.placeholder=C.value),e!==P.TEXT&&e!==P.SEARCH&&e!==P.URL&&e!==P.TEL&&e!==P.EMAIL&&e!==P.PASSWORD||(t.minlength=p.minlength,t.maxlength=p.maxlength,t.pattern=p.pattern),e===P.EMAIL&&(t.multiple=p.multiple),t})),me=e.computed((()=>({valid:p.valid,invalid:p.invalid,modelValue:p.modelValue,togglePassword:O,stepUp:Y,stepDown:Z,clear:te}))),{HintSlot:fe,hasHint:he,hasInvalid:be}=function(t,n){const{invalid:l,valid:u,hint:d,loading:s}=n,{hintLabel:c,modelValue:p,valid:v,validLabel:m,invalid:f,invalidLabel:h,...b}=e.toRefs(t),g=a(b,"loading"),y=a(b,"loadingLabel"),S=e.computed((()=>!(!f.value||(!f.value||!l)&&!((null==h?void 0:h.value)&&Array.isArray(h.value)&&h.value.length>0)&&(!(null==h?void 0:h.value)||i(h))))),w=e.computed((()=>!!(c&&c.value||d))),k=e.computed((()=>!!(m&&m.value||u))),B=e.computed((()=>!!((null==g?void 0:g.value)&&s||(null==g?void 0:g.value)&&(null==y?void 0:y.value)))),E=e.computed((()=>w.value||k.value||S.value||B.value));return{hasInvalid:S,hasHint:w,hasValid:k,hasLoading:B,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(t){const n=e.computed((()=>{const e=o.toReactive({hintLabel:c,modelValue:p,valid:v,validLabel:m,invalid:f,invalidLabel:h,loading:g,loadingLabel:y,...t.params});return(null==f?void 0:f.value)?(null==l?void 0:l(e))||r(null==h?void 0:h.value)||(null==c?void 0:c.value):(null==v?void 0:v.value)?(null==u?void 0:u(e))||r(null==m?void 0:m.value)||(null==c?void 0:c.value):(null==g?void 0:g.value)?(null==s?void 0:s(e))||r(null==y?void 0:y.value)||(null==c?void 0:c.value):(null==d?void 0:d(e))||r(null==c?void 0:c.value)||(null==c?void 0:c.value)}));return{isVisible:E,hasInvalid:S,hasValid:k,hintContent:n}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}(p,f),ge=U(P.PASSWORD,p),ye=U(P.NUMBER,p),Se=U(P.SEARCH,p),we=e.ref();e.watch([()=>p.mask,()=>p.type,()=>p.maskEager,()=>p.maskReversed,()=>p.maskTokens,()=>p.maskTokensReplace],(([e,o,n,l,a,i])=>{e&&o===P.TEXT?we.value=new t.Mask({mask:e,eager:n,reversed:l,tokens:a,tokensReplace:i}):we.value=void 0}),{immediate:!0});const ke=()=>{re.value&&(V.value=!0)},Be=e.computed((()=>{if(p.autoWidth)return{width:void 0!==I.value?`${String(I.value).length+1}ch`:void 0}}));return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(pe))},[e.unref(w)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(L),class:"vv-input-text__label"},e.toDisplayString(e.unref(w)),9,j)):e.createCommentVNode("",!0),e.createElementVNode("div",W,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(me))))])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:b,class:"vv-input-text__inner",onClick:e.withModifiers(ke,["stop"])},[e.unref(ne)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"vv-input-text__icon"},e.unref(oe)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(L),ref_key:"inputEl",ref:h,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(I)?I.value=t:null)},e.unref(ve),{style:e.unref(Be),onKeyup:o[1]||(o[1]=e=>c("keyup",e))}),null,16,z),[[e.vModelDynamic,e.unref(I)]]),(t.unit||t.$slots.unit)&&e.unref(de)?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(me))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("",!0)],8,F),e.unref(le)||e.unref(ae)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1,class:"vv-input-text__icon vv-input-text__icon-after"},e.unref(le)?e.unref(oe):e.unref(ae)),null,16)):e.unref(M)&&!t.hideActions&&e.unref(re)?(e.openBlock(),e.createBlock(e.unref(ge),{key:2,onTogglePassword:O})):e.unref(Q)&&!t.hideActions&&e.unref(re)?(e.openBlock(),e.createBlock(e.unref(ye),{key:3,onStepUp:Y,onStepDown:Z})):e.unref(ee)&&!t.hideActions&&e.unref(re)?(e.openBlock(),e.createBlock(e.unref(Se),{key:4,onClear:te})):e.createCommentVNode("",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(me))))])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("span",J,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(me))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ie)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(fe),{id:e.unref(A),class:"vv-input-text__hint"},null,8,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("maska"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","maska","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.maska,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,o,l,n){"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 i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).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||{}),s=(e=>(e.before="before",e.after="after",e))(s||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const c=Symbol.for("volver");function p(t,o,l){return e.computed((()=>{const n={[t]:!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[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{n[`${t}--${o}`]=e.unref(l.value[o])})),n}))}const v=e.defineComponent({name:"VvIcon",props:r,setup(t){const l=t,n=e.computed((()=>"string"==typeof l.rotate?parseFloat(l.rotate):l.rotate)),a=e.ref(!0),i=e.inject(c),{modifiers:r}=e.toRefs(l),u=p("vv-icon",r),s=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=l.name??"",t=`@${s.value}:${l.prefix}:${e}`;if(o.iconExists(t))return t;const n=null==i?void 0:i.iconsCollections.find((t=>{const l=`@${s.value}:${t.prefix}:${e}`;return o.iconExists(l)}));return n?`@${s.value}:${n.prefix}:${e}`:e}));function v(e){const t=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),n=(null==t?void 0:t.innerHTML.trim())||"";t&&n&&o.addIcon(`@${s.value}:${l.prefix}:${l.name}`,{body:n,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&l.src&&!o.iconExists(`@${s.value}:${l.prefix}:${l.name}`)&&(a.value=!1,i.fetchIcon(l.src).then((e=>{e&&(v(e),a.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&v(l.svg),(t,l)=>e.unref(a)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(n),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),m={valid:Boolean,validLabel:[String,Array]},f={invalid:Boolean,invalidLabel:[String,Array]},h={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},b={disabled:Boolean},g=(Boolean,Boolean,{label:[String,Number]}),S={readonly:Boolean},y={modifiers:[String,Array]},w={hintLabel:{type:String,default:""}},k={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},B={debounce:[Number,String]},L={icon:{type:[String,Object]},iconPosition:{type:String,default:s.before,validation:e=>Object.values(s).includes(e)}},E={tabindex:{type:[String,Number],default:0}},x={floating:Boolean},P={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const T={...{...P,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...E,...b,...S,...m,...f,...w,...h,...y,...k,...B,...L,...x,...g,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const C={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},$="eye-on",A="eye-off",I="calendar",V="time",_="color",O={...T,modelValue:[String,Number],type:{type:String,default:C.TEXT,validator:e=>Object.values(C).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:String,default:$},iconHidePassword:{type:String,default:A},iconClear:{type:String,default:"close"},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},mask:{type:String,default:void 0},maskEager:{type:Boolean,default:!1},maskReversed:{type:Boolean,default:!1},maskTokens:{type:Object,default:void 0},maskTokensReplace:{type:Boolean,default:!1},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String}},R=e.defineComponent({components:{VvIcon:v},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:String,default:$},iconHide:{type:String,default:A}},emits:["toggle-password"],setup(t,{emit:o}){const l=e.ref(!1),n=e.computed((()=>l.value?t.iconHide:t.iconShow));return{active:l,activeIcon:n,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(l.value=!l.value,o("toggle-password",l.value))}}},render(){const t=e.h(v,{name:this.activeIcon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),D=e.defineComponent({components:{VvIcon:v},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:o}){const l=e.computed((()=>"up"===t.mode));return{isUp:l,onClick:e=>{null==e||e.stopPropagation(),t.disabled||o(l.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),N=e.defineComponent({components:{VvIcon:v},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:String,default:"close"}},emits:["clear"],setup:(e,{emit:t})=>({onClick:function(o){null==o||o.stopPropagation(),e.disabled||t("clear")}}),render(){const t=e.h(v,{name:this.icon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function H(t,o){return{name:"VvInputTextActions",components:{VvIcon:v,VvInputPasswordAction:R,VvInputStepAction:D,VvInputClearAction:N},setup:()=>({isDisabled:e.computed((()=>o.disabled||o.readonly)),labelStepUp:o.labelStepUp,labelStepDown:o.labelStepDown,labelShowPassword:o.labelShowPassword,labelHidePassword:o.labelHidePassword,labelClear:o.labelClear,iconShowPassword:o.iconShowPassword,iconHidePassword:o.iconHidePassword}),render(){let l=null;switch(t){case C.SEARCH:{const{onClear:t}=this.$attrs;l=[e.h(N,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case C.PASSWORD:{const{onTogglePassword:t}=this.$attrs;l=[e.h(R,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case C.NUMBER:{const{onStepUp:t,onStepDown:n}=this.$attrs;l=[e.h(D,{mode:"up",disabled:this.isDisabled||void 0!==o.max&&o.modelValue===o.max,label:this.labelStepUp,onStepUp:t,onStepDown:n}),e.h(D,{mode:"down",disabled:this.isDisabled||void 0!==o.min&&o.modelValue===o.min,label:this.labelStepDown,onStepUp:t,onStepDown:n})];break}}return Array.isArray(l)?e.h("div",{class:"vv-input-text__actions-group"},l):l}}}const M=["for"],U={class:"vv-input-text__wrapper"},W={key:0,class:"vv-input-text__input-before"},q=["onClick"],z=["id"],j={key:1,class:"vv-input-text__unit"},F={key:5,class:"vv-input-text__input-after"},X={key:6,class:"vv-input-text__limit"};return e.defineComponent({name:"VvInputText",props:O,emits:["update:modelValue","focus","blur","keyup"],setup(o,{expose:r,emit:d}){const c=o,m=e.useSlots(),f=e.ref(),h=e.ref();r({$inner:h});const{id:b,icon:g,iconPosition:S,label:y,modelValue:w,count:k,valid:B,invalid:L,loading:E}=e.toRefs(c),x=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.nanoid()))))(b),P=e.computed((()=>`${x.value}-hint`)),T=e.computed((()=>c.floating&&a(c.placeholder)?" ":c.placeholder)),$=function(t,o,l=0,{getter:n=(e=>e),setter:a=(e=>e)}={}){let i;return"string"==typeof l&&(l=parseInt(l)),e.computed({get:()=>n(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",a(e))}),l)}})}(w,d,c.debounce,{getter:e=>we.value?we.value.masked(e??""):e,setter:e=>(we.value&&(e=we.value.unmasked(e)),c.type===C.NUMBER?Number(e):e)}),{focused:A}=function(t,o){const{focused:l}=n.useFocus(t);return e.watch(l,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:l}}(f,d),O=e.computed((()=>A.value&&!c.disabled&&!c.readonly)),R=n.useElementVisibility(f);e.watch(R,(e=>{e&&c.autofocus&&!c.disabled&&!c.readonly&&(A.value=!0)}));const D=e.ref(!1),N=e.computed((()=>c.type===C.PASSWORD)),K=()=>{D.value=!D.value},J=e.computed((()=>c.type===C.TIME||c.type===C.DATETIME_LOCAL||c.type===C.DATE||c.type===C.WEEK||c.type===C.MONTH)),G=e.computed((()=>c.type===C.NUMBER)),Q=()=>{ie.value&&(f.value.stepUp(),$.value=e.unref(f).value)},Y=()=>{ie.value&&(f.value.stepDown(),$.value=e.unref(f).value)},Z=e.computed((()=>c.type===C.SEARCH)),ee=()=>{$.value=void 0},{hasIcon:te,hasIconBefore:oe,hasIconAfter:le}=function(t,o){const l=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===s.before))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===s.after))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.right))),r=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.top))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.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:a,hasIconRight:i,hasIconTop:r,hasIconBottom:d,hasIconBefore:l,hasIconAfter:n}}(g,S),ne=e.computed((()=>{switch(c.type){case C.COLOR:return{name:_};case C.DATE:case C.DATETIME_LOCAL:case C.WEEK:case C.MONTH:return{name:I};case C.TIME:return{name:V};default:return""}})),{formatted:ae}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),n=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)),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`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===n.value)return;return n}return l.value}));return{length:l,gap:n,formatted:a}}($,{mode:c.count,upperLimit:Number(c.maxlength),lowerLimit:Number(c.minlength)}),ie=e.computed((()=>!c.disabled&&!c.readonly)),re=e.computed((()=>ie.value?c.tabindex:-1)),ue=e.computed((()=>!a(w))),se=e.computed((()=>!0===L.value||!0!==B.value&&void 0)),{modifiers:de}=e.toRefs(c),ce=p("vv-input-text",de,e.computed((()=>({valid:B.value,invalid:L.value,loading:E.value,disabled:c.disabled,readonly:c.readonly,"icon-before":oe.value,"icon-after":le.value||!a(ne),floating:c.floating&&!a(c.label),dirty:ue.value,focus:O.value,"auto-width":c.autoWidth})))),pe=e.computed((()=>{const e=N.value&&D.value?C.TEXT:!J.value||ue.value||A.value?c.type:C.TEXT,t={type:e,name:c.name,tabindex:re.value,disabled:c.disabled,readonly:c.readonly,required:c.required,autocomplete:c.autocomplete,"aria-invalid":se.value,"aria-describedby":fe.value?P.value:void 0,"aria-errormessage":he.value?P.value:void 0};return e!==C.DATE&&e!==C.MONTH&&e!==C.WEEK&&e!==C.TIME&&e!==C.DATETIME_LOCAL&&e!==C.NUMBER||(t.step=c.step,t.max=void 0!==c.max?String(c.max):void 0,t.min=void 0!==c.min?String(c.min):void 0),e!==C.TEXT&&e!==C.SEARCH&&e!==C.URL&&e!==C.TEL&&e!==C.EMAIL&&e!==C.PASSWORD&&e!==C.NUMBER||(t.placeholder=T.value),e!==C.TEXT&&e!==C.SEARCH&&e!==C.URL&&e!==C.TEL&&e!==C.EMAIL&&e!==C.PASSWORD||(t.minlength=c.minlength,t.maxlength=c.maxlength,t.pattern=c.pattern),e===C.EMAIL&&(t.multiple=c.multiple),t})),ve=e.computed((()=>({valid:c.valid,invalid:c.invalid,modelValue:c.modelValue,togglePassword:K,stepUp:Q,stepDown:Y,clear:ee}))),{HintSlot:me,hasHintLabelOrSlot:fe,hasInvalidLabelOrSlot:he,hintSlotScope:be}=function(t,o){const l=e.computed((()=>i(t.invalidLabel))),n=e.computed((()=>i(t.validLabel))),a=e.computed((()=>t.loadingLabel)),r=e.computed((()=>t.hintLabel)),u=e.computed((()=>Boolean(t.loading&&(o.loading||a.value)))),s=e.computed((()=>!u.value&&Boolean(t.invalid&&(o.invalid||l.value)))),d=e.computed((()=>!u.value&&!s.value&&Boolean(t.valid&&(o.valid||n.value)))),c=e.computed((()=>!u.value&&!s.value&&!d.value&&Boolean(o.hint||r.value))),p=e.computed((()=>s.value||d.value||u.value||c.value)),v=e.computed((()=>({modelValue:t.modelValue,valid:t.valid,invalid:t.invalid,loading:t.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:l,validLabel:n,loadingLabel:a,hintLabel:r,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,o,l,n,a,i,r,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(n=(l=this.$slots).invalid)?void 0:n.call(l))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(i=(a=this.$slots).valid)?void 0:i.call(a))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hintSlotScope:v,HintSlot:m}}(c,m),ge=H(C.PASSWORD,c),Se=H(C.NUMBER,c),ye=H(C.SEARCH,c),we=e.ref();e.watch([()=>c.mask,()=>c.type,()=>c.maskEager,()=>c.maskReversed,()=>c.maskTokens,()=>c.maskTokensReplace],(([e,o,l,n,a,i])=>{we.value=e&&o===C.TEXT?new t.Mask({mask:e,eager:l,reversed:n,tokens:a,tokensReplace:i}):void 0}),{immediate:!0});const ke=()=>{ie.value&&(A.value=!0)},Be=e.computed((()=>{if(c.autoWidth)return{width:void 0!==$.value?`${String($.value).length+1}ch`:void 0}}));return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(ce))},[e.unref(y)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(x),class:"vv-input-text__label"},e.toDisplayString(e.unref(y)),9,M)):e.createCommentVNode("",!0),e.createElementVNode("div",U,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",W,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(ve))))])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:h,class:"vv-input-text__inner",onClick:e.withModifiers(ke,["stop"])},[e.unref(oe)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0,class:"vv-input-text__icon"},e.unref(te)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(x),ref_key:"inputEl",ref:f,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef($)?$.value=t:null)},e.unref(pe),{style:e.unref(Be),onKeyup:o[1]||(o[1]=e=>d("keyup",e))}),null,16,z),[[e.vModelDynamic,e.unref($)]]),(t.unit||t.$slots.unit)&&e.unref(ue)?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(ve))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("",!0)],8,q),e.unref(le)||e.unref(ne)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:1,class:"vv-input-text__icon vv-input-text__icon-after"},e.unref(le)?e.unref(te):e.unref(ne)),null,16)):e.unref(N)&&!t.hideActions&&e.unref(ie)?(e.openBlock(),e.createBlock(e.unref(ge),{key:2,onTogglePassword:K})):e.unref(G)&&!t.hideActions&&e.unref(ie)?(e.openBlock(),e.createBlock(e.unref(Se),{key:3,onStepUp:Q,onStepDown:Y})):e.unref(Z)&&!t.hideActions&&e.unref(ie)?(e.openBlock(),e.createBlock(e.unref(ye),{key:4,onClear:ee})):e.createCommentVNode("",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",F,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(ve))))])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("span",X,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(ve))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ae)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(me),{id:e.unref(P),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));