@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
@@ -1,8 +1,8 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, h, Fragment, provide, useAttrs, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, useSlots, isRef, renderList, vModelSelect, createSlots, withModifiers, vModelText } from "vue";
1
+ import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, useSlots, isRef, renderList, vModelSelect, createSlots, withModifiers, vModelText } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
4
  import { nanoid } from "nanoid";
5
- import { useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, toReactive, useElementVisibility, refDebounced } from "@vueuse/core";
5
+ import { useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
6
6
  import mitt from "mitt";
7
7
  var Side = /* @__PURE__ */ ((Side2) => {
8
8
  Side2["left"] = "left";
@@ -57,9 +57,15 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
57
57
  return AnchorTarget2;
58
58
  })(AnchorTarget || {});
59
59
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
60
- const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for("dropdownTrigger");
61
- const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for("dropdownItem");
62
- const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for("dropdownAction");
60
+ const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
61
+ "dropdownTrigger"
62
+ );
63
+ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
64
+ "dropdownItem"
65
+ );
66
+ const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
67
+ "dropdownAction"
68
+ );
63
69
  const LinkProps = {
64
70
  /**
65
71
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -303,11 +309,11 @@ const DropdownProps = {
303
309
  default: false
304
310
  },
305
311
  /**
306
- * Close dropdown on click outside
312
+ * Keep open dropdown on click outside
307
313
  */
308
- autoClose: {
314
+ keepOpen: {
309
315
  type: Boolean,
310
- default: true
316
+ default: false
311
317
  },
312
318
  /**
313
319
  * Autofocus first item on dropdown open
@@ -479,11 +485,17 @@ const VvComboboxProps = {
479
485
  /**
480
486
  * Open dropdown on focus
481
487
  */
482
- autoOpen: Boolean,
488
+ autoOpen: {
489
+ type: Boolean,
490
+ default: false
491
+ },
483
492
  /**
484
- * Close dropdown on select (not multiple)
493
+ * Keep open dropdown on single select
485
494
  */
486
- autoClose: Boolean
495
+ keepOpen: {
496
+ type: Boolean,
497
+ default: false
498
+ }
487
499
  };
488
500
  const VvIconProps = {
489
501
  /**
@@ -613,6 +625,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
613
625
  props: VvIconProps,
614
626
  setup(__props) {
615
627
  const props = __props;
628
+ const hasRotate = computed(() => {
629
+ if (typeof props.rotate === "string") {
630
+ return parseFloat(props.rotate);
631
+ }
632
+ return props.rotate;
633
+ });
616
634
  const show = ref(true);
617
635
  const volver = useVolver();
618
636
  const { modifiers } = toRefs(props);
@@ -621,25 +639,24 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
621
639
  return props.provider || (volver == null ? void 0 : volver.iconsProvider);
622
640
  });
623
641
  const icon = computed(() => {
624
- const _name = props.name ?? "";
625
- const iconName = `@${provider.value}:${props.prefix}:${props.name}`;
626
- if (iconExists(_name)) {
627
- return _name;
628
- } else if (iconExists(iconName)) {
642
+ const name = props.name ?? "";
643
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
644
+ if (iconExists(iconName)) {
629
645
  return iconName;
630
- } else {
631
- return (volver == null ? void 0 : volver.iconsCollections.find(
632
- (iconsCollection) => {
633
- const icon2 = `@${provider.value}:${iconsCollection.prefix}:${_name}`;
634
- if (iconExists(icon2)) {
635
- return icon2;
636
- }
637
- }
638
- )) || _name;
639
646
  }
647
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
648
+ (iconsCollection2) => {
649
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
650
+ return iconExists(icon2);
651
+ }
652
+ );
653
+ if (iconsCollection) {
654
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
655
+ }
656
+ return name;
640
657
  });
641
658
  function getSvgContent(svg) {
642
- let dom = null;
659
+ let dom;
643
660
  if (typeof window === "undefined") {
644
661
  const { JSDOM } = require("jsdom");
645
662
  dom = new JSDOM().window;
@@ -670,12 +687,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
670
687
  show.value = true;
671
688
  }
672
689
  }).catch((e) => {
673
- throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
690
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
674
691
  });
675
- } else if (props.svg) {
676
- addIconFromSvg(props.svg);
677
692
  }
678
693
  }
694
+ if (props.svg) {
695
+ addIconFromSvg(props.svg);
696
+ }
679
697
  return (_ctx, _cache) => {
680
698
  return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
681
699
  key: 0,
@@ -687,7 +705,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
687
705
  horizontalFlip: _ctx.horizontalFlip,
688
706
  verticalFlip: _ctx.verticalFlip,
689
707
  flip: _ctx.flip,
690
- rotate: _ctx.rotate,
708
+ rotate: unref(hasRotate),
691
709
  color: _ctx.color,
692
710
  onLoad: _ctx.onLoad,
693
711
  icon: unref(icon)
@@ -732,19 +750,14 @@ function useProvideDropdownTrigger({
732
750
  const bus = mitt();
733
751
  const component = defineComponent({
734
752
  name: "VvDropdownTriggerProvider",
735
- provide() {
736
- return {
737
- [INJECTION_KEY_DROPDOWN_TRIGGER]: {
738
- reference,
739
- id,
740
- expanded,
741
- aria,
742
- bus
743
- }
744
- };
745
- },
746
753
  setup() {
747
- return {};
754
+ provide(INJECTION_KEY_DROPDOWN_TRIGGER, {
755
+ reference,
756
+ id,
757
+ expanded,
758
+ aria,
759
+ bus
760
+ });
748
761
  },
749
762
  render() {
750
763
  var _a, _b;
@@ -773,7 +786,7 @@ function useProvideDropdownAction({
773
786
  expanded
774
787
  }) {
775
788
  provide(INJECTION_KEY_DROPDOWN_ACTION, {
776
- role: ActionRoles.menuitem,
789
+ role: ref(ActionRoles.menuitem),
777
790
  expanded
778
791
  });
779
792
  }
@@ -785,8 +798,14 @@ const __default__$6 = {
785
798
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
786
799
  ...__default__$6,
787
800
  props: VvDropdownProps,
788
- emits: ["update:modelValue"],
789
- setup(__props, { expose, emit }) {
801
+ emits: [
802
+ "update:modelValue",
803
+ "beforeExpand",
804
+ "beforeCollapse",
805
+ "afterExpand",
806
+ "afterCollapse"
807
+ ],
808
+ setup(__props, { expose: __expose, emit }) {
790
809
  const props = __props;
791
810
  const { id } = toRefs(props);
792
811
  const hasId = useUniqueId(id);
@@ -931,7 +950,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
931
950
  const init = (el) => {
932
951
  referenceEl.value = el;
933
952
  };
934
- expose({ toggle, show, hide, init });
953
+ __expose({ toggle, show, hide, init });
935
954
  watch(expanded, (newValue) => {
936
955
  if (newValue && props.autofocusFirst) {
937
956
  nextTick(() => {
@@ -947,7 +966,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
947
966
  onClickOutside(
948
967
  floatingEl,
949
968
  () => {
950
- if (props.autoClose) {
969
+ if (!props.keepOpen) {
951
970
  expanded.value = false;
952
971
  }
953
972
  },
@@ -1056,6 +1075,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1056
1075
  activeElement.click();
1057
1076
  }
1058
1077
  });
1078
+ const onTransitionBeforeEnter = () => {
1079
+ emit(expanded.value ? "beforeExpand" : "beforeCollapse");
1080
+ };
1081
+ const onTransitionAfterLeave = () => {
1082
+ emit(expanded.value ? "afterExpand" : "afterCollapse");
1083
+ };
1059
1084
  return (_ctx, _cache) => {
1060
1085
  return openBlock(), createElementBlock(Fragment, null, [
1061
1086
  createVNode(unref(VvDropdownTriggerProvider), null, {
@@ -1064,7 +1089,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1064
1089
  ]),
1065
1090
  _: 3
1066
1091
  }),
1067
- createVNode(Transition, { name: _ctx.transitionName }, {
1092
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers({
1093
+ beforeEnter: onTransitionBeforeEnter,
1094
+ onAfterLeave: onTransitionAfterLeave
1095
+ })), {
1068
1096
  default: withCtx(() => [
1069
1097
  withDirectives(createElementVNode("div", {
1070
1098
  ref_key: "floatingEl",
@@ -1080,7 +1108,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1080
1108
  class: "vv-dropdown__arrow"
1081
1109
  }, null, 4)) : createCommentVNode("", true),
1082
1110
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1083
- createElementVNode("ul", mergeProps(unref(attrs), {
1111
+ createElementVNode("div", mergeProps(unref(attrs), {
1084
1112
  id: unref(hasId),
1085
1113
  ref_key: "listEl",
1086
1114
  ref: listEl,
@@ -1099,7 +1127,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1099
1127
  ])
1100
1128
  ]),
1101
1129
  _: 3
1102
- }, 8, ["name"])
1130
+ }, 16, ["name"])
1103
1131
  ], 64);
1104
1132
  };
1105
1133
  }
@@ -1125,7 +1153,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1125
1153
  }
1126
1154
  });
1127
1155
  return (_ctx, _cache) => {
1128
- return openBlock(), createElementBlock("li", mergeProps({ role: unref(role) }, {
1156
+ return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
1129
1157
  ref_key: "element",
1130
1158
  ref: element,
1131
1159
  class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
@@ -1324,111 +1352,114 @@ function removeFromList(value, list) {
1324
1352
  function isString(value) {
1325
1353
  return typeof value === "string" || value instanceof String;
1326
1354
  }
1327
- function joinLines(errors) {
1328
- if (Array.isArray(errors)) {
1329
- return errors.filter((e) => isString(e)).join(" ");
1355
+ function joinLines(items) {
1356
+ if (Array.isArray(items)) {
1357
+ return items.filter((item) => isString(item)).join(" ");
1330
1358
  }
1331
- return errors;
1359
+ return items;
1332
1360
  }
1333
- function HintSlotFactory(parentProps, parentSlots) {
1334
- const {
1335
- invalid: invalidSlot,
1336
- valid: validSlot,
1337
- hint: hintSlot,
1338
- loading: loadingSlot
1339
- } = parentSlots;
1340
- const {
1341
- hintLabel,
1342
- modelValue,
1343
- valid,
1344
- validLabel,
1345
- invalid,
1346
- invalidLabel,
1347
- ...otherProps
1348
- } = toRefs(parentProps);
1349
- const loading = resolveFieldData(otherProps, "loading");
1350
- const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
1351
- const hasInvalid = computed(() => {
1352
- if (!invalid.value) {
1353
- return false;
1354
- }
1355
- if (invalid.value && invalidSlot) {
1356
- return true;
1357
- }
1358
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
1359
- return true;
1360
- }
1361
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
1362
- return true;
1363
- }
1364
- return false;
1365
- });
1366
- const hasHint = computed(
1367
- () => !!(hintLabel && hintLabel.value || hintSlot)
1361
+ function HintSlotFactory(props, slots) {
1362
+ const invalidLabel = computed(() => joinLines(props.invalidLabel));
1363
+ const validLabel = computed(() => joinLines(props.validLabel));
1364
+ const loadingLabel = computed(() => props.loadingLabel);
1365
+ const hintLabel = computed(() => props.hintLabel);
1366
+ const hasLoadingLabelOrSlot = computed(
1367
+ () => Boolean(props.loading && (slots.loading || loadingLabel.value))
1368
1368
  );
1369
- const hasValid = computed(
1370
- () => !!(validLabel && validLabel.value || validSlot)
1369
+ const hasInvalidLabelOrSlot = computed(
1370
+ () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
1371
1371
  );
1372
- const hasLoading = computed(
1373
- () => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
1372
+ const hasValidLabelOrSlot = computed(
1373
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
1374
+ );
1375
+ const hasHintLabelOrSlot = computed(
1376
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
1374
1377
  );
1375
1378
  const isVisible = computed(
1376
- () => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
1379
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
1377
1380
  );
1378
- return {
1379
- hasInvalid,
1380
- hasHint,
1381
- hasValid,
1382
- hasLoading,
1383
- HintSlot: {
1384
- name: "HintSlot",
1385
- props: {
1386
- params: {
1387
- type: Object,
1388
- default: () => ({})
1381
+ const hintSlotScope = computed(() => ({
1382
+ modelValue: props.modelValue,
1383
+ valid: props.valid,
1384
+ invalid: props.invalid,
1385
+ loading: props.loading
1386
+ }));
1387
+ const HintSlot = defineComponent({
1388
+ name: "HintSlot",
1389
+ props: {
1390
+ tag: {
1391
+ type: String,
1392
+ default: "small"
1393
+ }
1394
+ },
1395
+ setup() {
1396
+ return {
1397
+ isVisible,
1398
+ invalidLabel,
1399
+ validLabel,
1400
+ loadingLabel,
1401
+ hintLabel,
1402
+ hasInvalidLabelOrSlot,
1403
+ hasValidLabelOrSlot,
1404
+ hasLoadingLabelOrSlot,
1405
+ hasHintLabelOrSlot
1406
+ };
1407
+ },
1408
+ render() {
1409
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1410
+ if (this.isVisible) {
1411
+ let role;
1412
+ if (this.hasInvalidLabelOrSlot) {
1413
+ role = "alert";
1389
1414
  }
1390
- },
1391
- setup(props) {
1392
- const hintContent = computed(() => {
1393
- const slotProps = toReactive({
1394
- hintLabel,
1395
- modelValue,
1396
- valid,
1397
- validLabel,
1398
- invalid,
1399
- invalidLabel,
1400
- loading,
1401
- loadingLabel,
1402
- ...props.params
1403
- });
1404
- if (invalid == null ? void 0 : invalid.value) {
1405
- return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1406
- }
1407
- if (valid == null ? void 0 : valid.value)
1408
- return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1409
- if (loading == null ? void 0 : loading.value)
1410
- return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1411
- return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1412
- });
1413
- return {
1414
- isVisible,
1415
- hasInvalid,
1416
- hasValid,
1417
- hintContent
1418
- };
1419
- },
1420
- render() {
1421
- if (this.isVisible) {
1415
+ if (this.hasValidLabelOrSlot) {
1416
+ role = "status";
1417
+ }
1418
+ if (this.hasLoadingLabelOrSlot) {
1419
+ return h(
1420
+ this.tag,
1421
+ {
1422
+ role
1423
+ },
1424
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
1425
+ );
1426
+ }
1427
+ if (this.hasInvalidLabelOrSlot) {
1428
+ return h(
1429
+ this.tag,
1430
+ {
1431
+ role
1432
+ },
1433
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
1434
+ );
1435
+ }
1436
+ if (this.hasValidLabelOrSlot) {
1422
1437
  return h(
1423
- "small",
1438
+ this.tag,
1424
1439
  {
1425
- role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
1440
+ role
1426
1441
  },
1427
- this.hintContent
1442
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
1428
1443
  );
1429
1444
  }
1445
+ return h(
1446
+ this.tag,
1447
+ {
1448
+ role
1449
+ },
1450
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
1451
+ );
1430
1452
  }
1453
+ return null;
1431
1454
  }
1455
+ });
1456
+ return {
1457
+ hasInvalidLabelOrSlot,
1458
+ hasHintLabelOrSlot,
1459
+ hasValidLabelOrSlot,
1460
+ hasLoadingLabelOrSlot,
1461
+ hintSlotScope,
1462
+ HintSlot
1432
1463
  };
1433
1464
  }
1434
1465
  const VvSelectProps = {
@@ -1529,7 +1560,9 @@ function useOptions(props) {
1529
1560
  const getOptionLabel = (option) => {
1530
1561
  if (typeof option !== "object" && option !== null)
1531
1562
  return option;
1532
- return typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value];
1563
+ return String(
1564
+ typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value]
1565
+ );
1533
1566
  };
1534
1567
  const getOptionValue = (option) => {
1535
1568
  if (typeof option !== "object" && option !== null)
@@ -1581,7 +1614,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1581
1614
  const props = __props;
1582
1615
  const slots = useSlots();
1583
1616
  const select = ref();
1584
- const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
1617
+ const {
1618
+ HintSlot,
1619
+ hasHintLabelOrSlot,
1620
+ hasInvalidLabelOrSlot,
1621
+ hintSlotScope
1622
+ } = HintSlotFactory(props, slots);
1585
1623
  const {
1586
1624
  id,
1587
1625
  modifiers,
@@ -1596,7 +1634,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1596
1634
  multiple
1597
1635
  } = toRefs(props);
1598
1636
  const hasId = useUniqueId(id);
1599
- const hasDescribedBy = computed(() => `${hasId.value}-hint`);
1637
+ const hasHintId = computed(() => `${hasId.value}-hint`);
1600
1638
  const { focused } = useComponentFocus(select, emit);
1601
1639
  const isVisible = useElementVisibility(select);
1602
1640
  watch(isVisible, (newValue) => {
@@ -1649,8 +1687,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1649
1687
  autocomplete: props.autocomplete,
1650
1688
  multiple: props.multiple,
1651
1689
  "aria-invalid": isInvalid.value,
1652
- "aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
1653
- "aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
1690
+ "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
1691
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
1654
1692
  };
1655
1693
  });
1656
1694
  const slotProps = computed(() => ({
@@ -1743,9 +1781,38 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1743
1781
  ])) : createCommentVNode("", true)
1744
1782
  ]),
1745
1783
  createVNode(unref(HintSlot), {
1746
- id: unref(hasDescribedBy),
1784
+ id: unref(hasHintId),
1747
1785
  class: "vv-select__hint"
1748
- }, null, 8, ["id"])
1786
+ }, createSlots({ _: 2 }, [
1787
+ _ctx.$slots.hint ? {
1788
+ name: "hint",
1789
+ fn: withCtx(() => [
1790
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1791
+ ]),
1792
+ key: "0"
1793
+ } : void 0,
1794
+ _ctx.$slots.loading ? {
1795
+ name: "loading",
1796
+ fn: withCtx(() => [
1797
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1798
+ ]),
1799
+ key: "1"
1800
+ } : void 0,
1801
+ _ctx.$slots.valid ? {
1802
+ name: "valid",
1803
+ fn: withCtx(() => [
1804
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1805
+ ]),
1806
+ key: "2"
1807
+ } : void 0,
1808
+ _ctx.$slots.invalid ? {
1809
+ name: "invalid",
1810
+ fn: withCtx(() => [
1811
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1812
+ ]),
1813
+ key: "3"
1814
+ } : void 0
1815
+ ]), 1032, ["id"])
1749
1816
  ], 2);
1750
1817
  };
1751
1818
  }
@@ -1831,13 +1898,13 @@ function useDefaults(componentName, propsDefinition, props) {
1831
1898
  }
1832
1899
  const _hoisted_1 = ["id"];
1833
1900
  const _hoisted_2 = ["id", "for"];
1834
- const _hoisted_3 = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"];
1901
+ const _hoisted_3 = ["id", "aria-controls", "placeholder"];
1835
1902
  const _hoisted_4 = {
1836
1903
  key: 0,
1837
1904
  class: "vv-select__input-before"
1838
1905
  };
1839
1906
  const _hoisted_5 = { class: "vv-select__inner" };
1840
- const _hoisted_6 = ["aria-labelledby", "tabindex"];
1907
+ const _hoisted_6 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
1841
1908
  const _hoisted_7 = ["aria-label", "onClick"];
1842
1909
  const _hoisted_8 = {
1843
1910
  key: 1,
@@ -1865,7 +1932,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1865
1932
  }
1866
1933
  return option.options && option.options.length > 0;
1867
1934
  };
1868
- const { HintSlot } = HintSlotFactory(props, slots);
1935
+ const {
1936
+ HintSlot,
1937
+ hasHintLabelOrSlot,
1938
+ hasInvalidLabelOrSlot,
1939
+ hintSlotScope
1940
+ } = HintSlotFactory(props, slots);
1869
1941
  const inputEl = ref(null);
1870
1942
  const inputSearchEl = ref(null);
1871
1943
  const wrapperEl = ref(null);
@@ -1913,19 +1985,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1913
1985
  return;
1914
1986
  expanded.value = false;
1915
1987
  };
1916
- watch(expanded, (newValue) => {
1988
+ const onAfterExpand = () => {
1917
1989
  if (searchable.value) {
1918
- nextTick(() => {
1919
- if (newValue) {
1920
- if (inputSearchEl.value) {
1921
- inputSearchEl.value.focus();
1922
- }
1923
- return;
1924
- }
1925
- searchText.value = "";
1926
- });
1990
+ if (inputSearchEl.value) {
1991
+ inputSearchEl.value.focus();
1992
+ }
1927
1993
  }
1928
- });
1994
+ };
1995
+ const onAfterCollapse = () => {
1996
+ if (searchable.value) {
1997
+ searchText.value = "";
1998
+ }
1999
+ };
1929
2000
  const {
1930
2001
  id,
1931
2002
  icon,
@@ -2014,11 +2085,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2014
2085
  const hasValue = computed(() => {
2015
2086
  return selectedOptions.value.map((option) => getOptionLabel(option)).join(props.separator);
2016
2087
  });
2017
- watch(selectedOptions, () => {
2018
- if (!props.multiple && props.autoClose) {
2019
- collapse();
2020
- }
2021
- });
2022
2088
  const onClickInput = () => {
2023
2089
  props.autoOpen ? expand() : toggleExpanded();
2024
2090
  };
@@ -2042,7 +2108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2042
2108
  toReturn = [value];
2043
2109
  }
2044
2110
  } else {
2045
- if (props.autoClose) {
2111
+ if (!props.keepOpen) {
2046
2112
  collapse();
2047
2113
  }
2048
2114
  if (props.unselectable && value === props.modelValue) {
@@ -2088,7 +2154,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2088
2154
  flip: props.flip,
2089
2155
  autoPlacement: props.autoPlacement,
2090
2156
  arrow: props.arrow,
2091
- autoClose: props.autoClose,
2092
2157
  autofocusFirst: searchable.value ? false : props.autofocusFirst,
2093
2158
  triggerWidth: props.triggerWidth,
2094
2159
  modifiers: props.dropdownModifiers
@@ -2128,7 +2193,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2128
2193
  modelValue: unref(expanded),
2129
2194
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2130
2195
  }, unref(dropdownProps), {
2131
- role: unref(DropdownRole).listbox
2196
+ role: unref(DropdownRole).listbox,
2197
+ onAfterExpand,
2198
+ onAfterCollapse
2132
2199
  }), createSlots({
2133
2200
  default: withCtx(({ aria }) => [
2134
2201
  _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
@@ -2143,9 +2210,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2143
2210
  ref_key: "inputEl",
2144
2211
  ref: inputEl
2145
2212
  }, aria, {
2146
- "aria-labelledby": unref(hasLabelId),
2147
2213
  class: "vv-select__input",
2148
2214
  role: "combobox",
2215
+ "aria-expanded": unref(expanded),
2216
+ "aria-labelledby": unref(hasLabelId),
2217
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2218
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2149
2219
  tabindex: unref(hasTabindex),
2150
2220
  onClickPassive: onClickInput
2151
2221
  }), [
@@ -2281,8 +2351,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2281
2351
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
2282
2352
  "aria-autocomplete": "list",
2283
2353
  "aria-controls": unref(hasDropdownId),
2284
- "aria-labelledby": unref(hasLabelId),
2285
- "aria-describedby": unref(hasHintId),
2286
2354
  autocomplete: "off",
2287
2355
  spellcheck: "false",
2288
2356
  type: "search",
@@ -2307,7 +2375,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2307
2375
  createVNode(unref(HintSlot), {
2308
2376
  id: unref(hasHintId),
2309
2377
  class: "vv-select__hint"
2310
- }, null, 8, ["id"])
2378
+ }, createSlots({ _: 2 }, [
2379
+ _ctx.$slots.hint ? {
2380
+ name: "hint",
2381
+ fn: withCtx(() => [
2382
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2383
+ ]),
2384
+ key: "0"
2385
+ } : void 0,
2386
+ _ctx.$slots.loading ? {
2387
+ name: "loading",
2388
+ fn: withCtx(() => [
2389
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2390
+ ]),
2391
+ key: "1"
2392
+ } : void 0,
2393
+ _ctx.$slots.valid ? {
2394
+ name: "valid",
2395
+ fn: withCtx(() => [
2396
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2397
+ ]),
2398
+ key: "2"
2399
+ } : void 0,
2400
+ _ctx.$slots.invalid ? {
2401
+ name: "invalid",
2402
+ fn: withCtx(() => [
2403
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2404
+ ]),
2405
+ key: "3"
2406
+ } : void 0
2407
+ ]), 1032, ["id"])
2311
2408
  ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$2, mergeProps({ key: 1 }, unref(selectProps), {
2312
2409
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => emit("update:modelValue", $event))
2313
2410
  }), null, 16));