@volverjs/ui-vue 0.0.10-beta.47 → 0.0.10-beta.49

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 (357) hide show
  1. package/README.md +2 -2
  2. package/auto-imports.d.ts +19 -11
  3. package/bin/icons.js +1 -0
  4. package/dist/components/VvAccordion/VvAccordion.es.js +4 -5
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -11
  7. package/dist/components/VvAccordion/index.d.ts +2 -2
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +45 -46
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +11 -13
  11. package/dist/components/VvAccordionGroup/index.d.ts +2 -2
  12. package/dist/components/VvAction/VvAction.vue.d.ts +8 -10
  13. package/dist/components/VvAction/index.d.ts +1 -1
  14. package/dist/components/VvAlert/VvAlert.es.js +158 -161
  15. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  16. package/dist/components/VvAlert/VvAlert.vue.d.ts +20 -22
  17. package/dist/components/VvAlert/index.d.ts +1 -1
  18. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +271 -274
  19. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  20. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -11
  21. package/dist/components/VvAlertGroup/index.d.ts +2 -2
  22. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +6 -6
  23. package/dist/components/VvAvatar/index.d.ts +1 -1
  24. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +21 -22
  25. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  26. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
  27. package/dist/components/VvAvatarGroup/index.d.ts +1 -1
  28. package/dist/components/VvBadge/VvBadge.vue.d.ts +6 -6
  29. package/dist/components/VvBadge/index.d.ts +1 -1
  30. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +23 -23
  31. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  32. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +19 -19
  33. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  34. package/dist/components/VvButton/VvButton.es.js +313 -314
  35. package/dist/components/VvButton/VvButton.umd.js +1 -1
  36. package/dist/components/VvButton/VvButton.vue.d.ts +14 -16
  37. package/dist/components/VvButton/index.d.ts +9 -9
  38. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -2
  39. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -8
  40. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  41. package/dist/components/VvCard/VvCard.vue.d.ts +6 -6
  42. package/dist/components/VvCard/index.d.ts +1 -1
  43. package/dist/components/VvCheckbox/VvCheckbox.es.js +186 -187
  44. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  45. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +11 -13
  46. package/dist/components/VvCheckbox/index.d.ts +7 -7
  47. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -191
  48. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  49. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +11 -13
  50. package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
  51. package/dist/components/VvCombobox/VvCombobox.es.js +1864 -1865
  52. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  53. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +72 -291
  54. package/dist/components/VvCombobox/index.d.ts +1 -1
  55. package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -9
  56. package/dist/components/VvDialog/index.d.ts +1 -1
  57. package/dist/components/VvDropdown/VvDropdown.es.js +9 -10
  58. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  59. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +51 -51
  60. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +22 -16
  61. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +4 -4
  62. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +4 -4
  63. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +6 -6
  64. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -2
  65. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +2 -2
  66. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +2 -2
  67. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -23
  68. package/dist/components/VvInputFile/VvInputFile.es.js +651 -652
  69. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  70. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
  71. package/dist/components/VvInputFile/index.d.ts +4 -4
  72. package/dist/components/VvInputText/VvInputClearAction.d.ts +10 -6
  73. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +11 -7
  74. package/dist/components/VvInputText/VvInputStepAction.d.ts +10 -6
  75. package/dist/components/VvInputText/VvInputText.es.js +715 -716
  76. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  77. package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -32
  78. package/dist/components/VvInputText/index.d.ts +1 -1
  79. package/dist/components/VvNav/VvNav.es.js +5 -5
  80. package/dist/components/VvNav/VvNav.umd.js +1 -1
  81. package/dist/components/VvNav/VvNav.vue.d.ts +8 -10
  82. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  83. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  84. package/dist/components/VvNav/index.d.ts +2 -2
  85. package/dist/components/VvProgress/VvProgress.vue.d.ts +6 -6
  86. package/dist/components/VvProgress/index.d.ts +1 -1
  87. package/dist/components/VvRadio/VvRadio.es.js +186 -187
  88. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  89. package/dist/components/VvRadio/VvRadio.vue.d.ts +10 -12
  90. package/dist/components/VvRadio/index.d.ts +5 -5
  91. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -191
  92. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  93. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +11 -13
  94. package/dist/components/VvRadioGroup/index.d.ts +2 -2
  95. package/dist/components/VvSelect/VvSelect.es.js +337 -338
  96. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  97. package/dist/components/VvSelect/VvSelect.vue.d.ts +20 -131
  98. package/dist/components/VvSelect/index.d.ts +7 -7
  99. package/dist/components/VvTab/VvTab.es.js +18 -18
  100. package/dist/components/VvTab/VvTab.umd.js +1 -1
  101. package/dist/components/VvTab/VvTab.vue.d.ts +6 -8
  102. package/dist/components/VvTab/index.d.ts +1 -1
  103. package/dist/components/VvTextarea/VvTextarea.es.js +292 -293
  104. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  105. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +14 -16
  106. package/dist/components/VvTextarea/index.d.ts +3 -3
  107. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +8 -8
  108. package/dist/components/common/HintSlot.d.ts +6 -6
  109. package/dist/components/index.d.ts +1 -1
  110. package/dist/components/index.es.js +2760 -2763
  111. package/dist/components/index.umd.js +1 -1
  112. package/dist/composables/alert/useAlert.d.ts +4 -4
  113. package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
  114. package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
  115. package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -6
  116. package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
  117. package/dist/composables/group/{useInjectedGroupState.d.ts → useGroupStateInject.d.ts} +1 -1
  118. package/dist/composables/group/{useProvideGroupState.d.ts → useGroupStateProvide.d.ts} +2 -2
  119. package/dist/composables/index.d.ts +2 -0
  120. package/dist/composables/index.es.js +87 -3
  121. package/dist/composables/index.umd.js +1 -1
  122. package/dist/composables/useComponentFocus.d.ts +1 -1
  123. package/dist/composables/useOptions.d.ts +1 -1
  124. package/dist/composables/usePersistence.d.ts +1 -1
  125. package/dist/composables/useUniqueId.d.ts +1 -1
  126. package/dist/constants.d.ts +3 -3
  127. package/dist/directives/index.d.ts +2 -2
  128. package/dist/directives/index.es.js +145 -39
  129. package/dist/directives/index.umd.js +1 -1
  130. package/dist/directives/v-contextmenu.es.js +137 -31
  131. package/dist/directives/v-contextmenu.umd.js +1 -1
  132. package/dist/icons.d.ts +17 -17
  133. package/dist/icons.es.js +424 -424
  134. package/dist/icons.umd.js +1 -1
  135. package/dist/index.d.ts +1 -1
  136. package/dist/index.umd.js +1 -1
  137. package/dist/props/index.d.ts +4 -4
  138. package/dist/resolvers/unplugin.umd.js +1 -1
  139. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +178 -474
  140. package/dist/stories/Alert/Alert.settings.d.ts +1 -1
  141. package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
  142. package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
  143. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
  144. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
  145. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  146. package/dist/stories/Button/Button.settings.d.ts +1 -1
  147. package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
  148. package/dist/stories/Nav/Nav.settings.d.ts +1 -1
  149. package/dist/stories/Tab/Tab.settings.d.ts +1 -1
  150. package/dist/types/floating-ui.d.ts +1 -1
  151. package/dist/types/group.d.ts +1 -1
  152. package/dist/types/index.d.ts +2 -2
  153. package/dist/utils/DomUtilities.d.ts +1 -0
  154. package/package.json +43 -43
  155. package/src/Volver.ts +3 -3
  156. package/src/assets/icons/detailed.json +1 -1
  157. package/src/assets/icons/normal.json +1 -1
  158. package/src/assets/icons/simple.json +1 -1
  159. package/src/components/VvAccordion/VvAccordion.vue +5 -5
  160. package/src/components/VvAccordion/index.ts +2 -2
  161. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +5 -5
  162. package/src/components/VvAction/VvAction.vue +1 -1
  163. package/src/components/VvAlert/VvAlert.vue +1 -1
  164. package/src/components/VvAlert/index.ts +1 -1
  165. package/src/components/VvAlertGroup/VvAlertGroup.vue +1 -1
  166. package/src/components/VvAlertGroup/index.ts +3 -3
  167. package/src/components/VvAvatarGroup/VvAvatarGroup.vue +1 -1
  168. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +2 -2
  169. package/src/components/VvBreadcrumb/index.ts +1 -1
  170. package/src/components/VvButton/VvButton.vue +3 -3
  171. package/src/components/VvButton/index.ts +4 -4
  172. package/src/components/VvButtonGroup/VvButtonGroup.vue +3 -3
  173. package/src/components/VvCheckbox/VvCheckbox.vue +2 -2
  174. package/src/components/VvCheckbox/index.ts +2 -2
  175. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +2 -2
  176. package/src/components/VvCombobox/VvCombobox.vue +9 -9
  177. package/src/components/VvCombobox/index.ts +15 -15
  178. package/src/components/VvDropdown/VvDropdown.vue +19 -19
  179. package/src/components/VvDropdown/VvDropdownAction.vue +1 -1
  180. package/src/components/VvDropdown/VvDropdownItem.vue +1 -1
  181. package/src/components/VvDropdown/VvDropdownOption.vue +1 -1
  182. package/src/components/VvDropdown/index.ts +2 -2
  183. package/src/components/VvIcon/VvIcon.vue +2 -2
  184. package/src/components/VvInputFile/VvInputFile.vue +7 -7
  185. package/src/components/VvInputFile/index.ts +7 -7
  186. package/src/components/VvInputText/VvInputPasswordAction.ts +1 -1
  187. package/src/components/VvInputText/VvInputText.vue +19 -19
  188. package/src/components/VvInputText/VvInputTextActions.ts +4 -4
  189. package/src/components/VvInputText/index.ts +2 -2
  190. package/src/components/VvNav/VvNav.vue +1 -1
  191. package/src/components/VvRadio/VvRadio.vue +1 -1
  192. package/src/components/VvRadio/index.ts +2 -2
  193. package/src/components/VvRadioGroup/VvRadioGroup.vue +2 -2
  194. package/src/components/VvSelect/VvSelect.vue +6 -6
  195. package/src/components/VvSelect/index.ts +12 -12
  196. package/src/components/VvTab/VvTab.vue +2 -2
  197. package/src/components/VvTab/index.ts +1 -1
  198. package/src/components/VvTextarea/VvTextarea.vue +1 -1
  199. package/src/components/common/HintSlot.ts +14 -14
  200. package/src/components/index.ts +1 -1
  201. package/src/composables/alert/useAlert.ts +2 -2
  202. package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +2 -2
  203. package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
  204. package/src/composables/dropdown/{useProvideDropdown.ts → useDropdownProvide.ts} +9 -9
  205. package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
  206. package/src/composables/group/{useInjectedGroupState.ts → useGroupStateInject.ts} +2 -2
  207. package/src/composables/group/{useProvideGroupState.ts → useGroupStateProvide.ts} +2 -2
  208. package/src/composables/index.ts +2 -0
  209. package/src/composables/useBlurhash.ts +2 -2
  210. package/src/composables/useOptions.ts +1 -1
  211. package/src/composables/usePersistence.ts +1 -1
  212. package/src/composables/useTextCount.ts +2 -2
  213. package/src/composables/useUniqueId.ts +2 -3
  214. package/src/constants.ts +5 -5
  215. package/src/directives/index.ts +2 -2
  216. package/src/directives/v-contextmenu.ts +21 -29
  217. package/src/directives/v-tooltip.ts +2 -2
  218. package/src/icons.ts +2 -2
  219. package/src/index.ts +1 -1
  220. package/src/props/index.ts +7 -7
  221. package/src/resolvers/unplugin.ts +5 -5
  222. package/src/stories/Accordion/Accordion.stories.ts +2 -2
  223. package/src/stories/Accordion/Accordion.test.ts +1 -1
  224. package/src/stories/Accordion/AccordionSlots.stories.ts +2 -2
  225. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +2 -2
  226. package/src/stories/AccordionGroup/AccordionGroup.test.ts +1 -1
  227. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +3 -3
  228. package/src/stories/Alert/Alert.settings.ts +1 -1
  229. package/src/stories/Alert/Alert.stories.ts +2 -2
  230. package/src/stories/Alert/Alert.test.ts +1 -1
  231. package/src/stories/Alert/AlertModifiers.stories.ts +2 -2
  232. package/src/stories/Alert/AlertSlots.stories.ts +2 -2
  233. package/src/stories/AlertGroup/AlertGroup.stories.ts +2 -2
  234. package/src/stories/AlertGroup/AlertGroup.test.ts +3 -3
  235. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +2 -2
  236. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +2 -2
  237. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  238. package/src/stories/Avatar/Avatar.stories.ts +2 -2
  239. package/src/stories/Avatar/Avatar.test.ts +1 -1
  240. package/src/stories/Avatar/AvatarBadge.stories.ts +1 -1
  241. package/src/stories/Avatar/AvatarModifiers.stories.ts +2 -2
  242. package/src/stories/Avatar/AvatarSlots.stories.ts +2 -2
  243. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +2 -2
  244. package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
  245. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +2 -2
  246. package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +3 -3
  247. package/src/stories/Badge/Badge.stories.ts +2 -2
  248. package/src/stories/Badge/Badge.test.ts +1 -1
  249. package/src/stories/Badge/BadgeSlots.stories.ts +2 -2
  250. package/src/stories/Blurhash/BlurhashComposable.stories.ts +37 -117
  251. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +2 -2
  252. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +5 -5
  253. package/src/stories/Button/Button.settings.ts +3 -3
  254. package/src/stories/Button/Button.stories.ts +2 -2
  255. package/src/stories/Button/Button.test.ts +1 -1
  256. package/src/stories/Button/ButtonIcon.stories.ts +2 -2
  257. package/src/stories/Button/ButtonLink.stories.ts +2 -2
  258. package/src/stories/Button/ButtonLoading.stories.ts +2 -2
  259. package/src/stories/Button/ButtonModifiers.stories.ts +2 -2
  260. package/src/stories/Button/ButtonSlots.stories.ts +3 -3
  261. package/src/stories/Button/ButtonState.stories.ts +2 -2
  262. package/src/stories/Button/ButtonToggle.stories.ts +2 -2
  263. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +2 -2
  264. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +2 -2
  265. package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
  266. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +2 -2
  267. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +2 -2
  268. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +2 -2
  269. package/src/stories/Card/Card.stories.ts +2 -2
  270. package/src/stories/Card/Card.test.ts +1 -1
  271. package/src/stories/Card/CardSlots.stories.ts +2 -2
  272. package/src/stories/Checkbox/Checkbox.stories.ts +2 -2
  273. package/src/stories/Checkbox/Checkbox.test.ts +1 -1
  274. package/src/stories/Checkbox/CheckboxBinary.stories.ts +2 -2
  275. package/src/stories/Checkbox/CheckboxSlots.stories.ts +2 -2
  276. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +2 -2
  277. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -2
  278. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +2 -2
  279. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +3 -3
  280. package/src/stories/Combobox/Combobox.settings.ts +9 -9
  281. package/src/stories/Combobox/Combobox.stories.ts +2 -2
  282. package/src/stories/Combobox/Combobox.test.ts +2 -2
  283. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +2 -2
  284. package/src/stories/Combobox/ComboboxMultiple.stories.ts +2 -2
  285. package/src/stories/Combobox/ComboboxOptions.stories.ts +2 -2
  286. package/src/stories/Combobox/ComboboxSlots.stories.ts +3 -3
  287. package/src/stories/Dialog/Dialog.stories.ts +2 -2
  288. package/src/stories/Dialog/Dialog.test.ts +1 -1
  289. package/src/stories/Dialog/DialogModifiers.stories.ts +2 -2
  290. package/src/stories/Dialog/DialogSlots.stories.ts +2 -2
  291. package/src/stories/Dropdown/Dropdown.settings.ts +1 -1
  292. package/src/stories/Dropdown/Dropdown.stories.ts +4 -4
  293. package/src/stories/Dropdown/Dropdown.test.ts +1 -1
  294. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +3 -4
  295. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +4 -4
  296. package/src/stories/Dropdown/DropdownSlots.stories.ts +4 -4
  297. package/src/stories/Icon/Icon.settings.ts +1 -1
  298. package/src/stories/Icon/Icon.stories.ts +2 -2
  299. package/src/stories/Icon/IconsCollection.stories.ts +3 -3
  300. package/src/stories/InputFile/InputFile.settings.ts +1 -1
  301. package/src/stories/InputFile/InputFile.stories.ts +1 -1
  302. package/src/stories/InputFile/InputFileDropArea.stories.ts +2 -2
  303. package/src/stories/InputFile/InputFileIconPosition.stories.ts +2 -2
  304. package/src/stories/InputFile/InputFileSlots.stories.ts +2 -2
  305. package/src/stories/InputText/InputText.settings.ts +2 -2
  306. package/src/stories/InputText/InputText.stories.ts +2 -2
  307. package/src/stories/InputText/InputText.test.ts +2 -2
  308. package/src/stories/InputText/InputTextIconPosition.stories.ts +2 -2
  309. package/src/stories/InputText/InputTextLength.stories.ts +2 -2
  310. package/src/stories/InputText/InputTextMask.stories.ts +2 -2
  311. package/src/stories/InputText/InputTextMinMax.stories.ts +2 -2
  312. package/src/stories/InputText/InputTextSlots.stories.ts +2 -2
  313. package/src/stories/InputText/InputTextType.stories.ts +2 -2
  314. package/src/stories/Nav/Nav.settings.ts +1 -1
  315. package/src/stories/Nav/Nav.stories.ts +2 -2
  316. package/src/stories/Nav/Nav.test.ts +1 -1
  317. package/src/stories/Nav/NavModifiers.stories.ts +2 -2
  318. package/src/stories/Progress/Progress.stories.ts +2 -2
  319. package/src/stories/Progress/Progress.test.ts +2 -2
  320. package/src/stories/Radio/Radio.stories.ts +2 -2
  321. package/src/stories/Radio/Radio.test.ts +1 -1
  322. package/src/stories/Radio/RadioSlots.stories.ts +2 -2
  323. package/src/stories/RadioGroup/RadioGroup.stories.ts +2 -2
  324. package/src/stories/RadioGroup/RadioGroup.test.ts +2 -2
  325. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +2 -2
  326. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +3 -3
  327. package/src/stories/Select/Select.settings.ts +10 -10
  328. package/src/stories/Select/Select.stories.ts +2 -2
  329. package/src/stories/Select/Select.test.ts +1 -1
  330. package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
  331. package/src/stories/Select/SelectOptions.stories.ts +2 -2
  332. package/src/stories/Select/SelectSlots.stories.ts +2 -2
  333. package/src/stories/Tab/Tab.settings.ts +1 -1
  334. package/src/stories/Tab/Tab.stories.ts +1 -1
  335. package/src/stories/Tab/Tab.test.ts +1 -1
  336. package/src/stories/Textarea/Textarea.settings.ts +1 -1
  337. package/src/stories/Textarea/Textarea.stories.ts +2 -2
  338. package/src/stories/Textarea/Textarea.test.ts +1 -1
  339. package/src/stories/Textarea/TextareaLength.stories.ts +2 -2
  340. package/src/stories/Textarea/TextareaSlots.stories.ts +2 -2
  341. package/src/stories/Textarea/TextareatIconPosition.stories.ts +2 -2
  342. package/src/stories/Tooltip/Tooltip.stories.ts +3 -3
  343. package/src/stories/Tooltip/Tooltip.test.ts +1 -1
  344. package/src/stories/Tooltip/TooltipDirective.stories.ts +3 -3
  345. package/src/test/expect.ts +3 -3
  346. package/src/test/types.d.ts +2 -2
  347. package/src/types/floating-ui.ts +1 -1
  348. package/src/types/group.ts +1 -1
  349. package/src/types/index.ts +2 -2
  350. package/src/utils/DomUtilities.ts +15 -0
  351. package/src/utils/ObjectUtilities.ts +4 -4
  352. package/src/workers/blurhash.ts +1 -1
  353. package/dist/composables/alert/{useInjectAlert.d.ts → useAlerInject.d.ts} +0 -0
  354. package/dist/composables/dropdown/{useInjectDropdown.d.ts → useDropdownInject.d.ts} +0 -0
  355. package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
  356. package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +0 -0
  357. package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +1 -1
@@ -1,18 +1,18 @@
1
1
  <script setup lang="ts">
2
+ import type { MaskedNumberOptions } from 'imask'
2
3
  import type { InputHTMLAttributes } from 'vue'
3
4
  import { useIMask } from 'vue-imask'
4
- import type { MaskedNumberOptions } from 'imask'
5
5
  import HintSlotFactory from '../common/HintSlot'
6
- import VvIcon from '../VvIcon/VvIcon.vue'
7
- import { ACTION_ICONS } from '../VvIcon'
8
- import VvInputTextActionsFactory from '../VvInputText/VvInputTextActions'
9
6
  import VvDropdown from '../VvDropdown/VvDropdown.vue'
10
7
  import VvDropdownOption from '../VvDropdown/VvDropdownOption.vue'
8
+ import { ACTION_ICONS } from '../VvIcon'
9
+ import VvIcon from '../VvIcon/VvIcon.vue'
11
10
  import {
11
+ INPUT_TYPES,
12
12
  VvInputTextEvents,
13
13
  VvInputTextProps,
14
- INPUT_TYPES,
15
14
  } from '../VvInputText'
15
+ import VvInputTextActionsFactory from '../VvInputText/VvInputTextActions'
16
16
 
17
17
  // props, emit, slots and attrs
18
18
  const props = defineProps(VvInputTextProps)
@@ -135,9 +135,9 @@ const { el, mask, typed, masked, unmasked } = useIMask(
135
135
  date = new Date(date)
136
136
  }
137
137
  localModelValue.value = `${date.getFullYear()}-${(
138
- `0${
139
- date.getMonth() + 1}`
140
- ).slice(-2)}-${(`0${date.getDate()}`).slice(-2)}`
138
+ `0${
139
+ date.getMonth() + 1}`
140
+ ).slice(-2)}-${(`0${date.getDate()}`).slice(-2)}`
141
141
  return
142
142
  }
143
143
  if (type.value === INPUT_TYPES.DATETIME_LOCAL) {
@@ -160,11 +160,11 @@ const { el, mask, typed, masked, unmasked } = useIMask(
160
160
  date = new Date(date)
161
161
  }
162
162
  localModelValue.value = `${date.getFullYear()}-${(
163
- `0${
164
- date.getMonth() + 1}`
165
- ).slice(-2)}-${(`0${date.getDate()}`).slice(-2)}T${(
166
- `0${date.getHours()}`
167
- ).slice(-2)}:${(`0${date.getMinutes()}`).slice(-2)}`
163
+ `0${
164
+ date.getMonth() + 1}`
165
+ ).slice(-2)}-${(`0${date.getDate()}`).slice(-2)}T${(
166
+ `0${date.getHours()}`
167
+ ).slice(-2)}:${(`0${date.getMinutes()}`).slice(-2)}`
168
168
  return
169
169
  }
170
170
  if (!localModelValue.value && !unmasked.value) {
@@ -217,9 +217,9 @@ watch(
217
217
 
218
218
  // template refs
219
219
  const inputEl = el as Ref<HTMLInputElement>
220
- const innerEl = ref<HTMLInputElement>()
221
- const wrapperEl = ref<HTMLDivElement>()
222
- const dropdownEl = ref<typeof VvDropdown>()
220
+ const innerEl = useTemplateRef<HTMLInputElement>('innerEl')
221
+ const wrapperEl = useTemplateRef<HTMLDivElement>('wrapperEl')
222
+ const dropdownEl = useTemplateRef<typeof VvDropdown>('dropdownEl')
223
223
 
224
224
  defineExpose({ $inner: innerEl })
225
225
 
@@ -372,9 +372,9 @@ const filteredSuggestions = computed(() => {
372
372
  suggestion =>
373
373
  isEmpty(localModelValue.value)
374
374
  || (`${suggestion}`
375
- .toLowerCase()
376
- .includes(`${localModelValue.value}`.toLowerCase())
377
- && suggestion !== localModelValue.value),
375
+ .toLowerCase()
376
+ .includes(`${localModelValue.value}`.toLowerCase())
377
+ && suggestion !== localModelValue.value),
378
378
  )
379
379
  .reverse()
380
380
  })
@@ -1,9 +1,9 @@
1
1
  import type { Component } from 'vue'
2
+ import { INPUT_TYPES, type VvInputTextPropsTypes } from '.'
2
3
  import VvIcon from '../VvIcon/VvIcon.vue'
4
+ import VvInputClearAction from '../VvInputText/VvInputClearAction'
3
5
  import VvInputPasswordAction from '../VvInputText/VvInputPasswordAction'
4
6
  import VvInputStepAction from '../VvInputText/VvInputStepAction'
5
- import VvInputClearAction from '../VvInputText/VvInputClearAction'
6
- import { type VvInputTextPropsTypes, INPUT_TYPES } from '.'
7
7
 
8
8
  export default function VvInputTextActionsFactory(
9
9
  type: string,
@@ -69,7 +69,7 @@ export default function VvInputTextActionsFactory(
69
69
  disabled:
70
70
  this.isDisabled
71
71
  || (parentProps.max !== undefined
72
- && parentProps.modelValue === parentProps.max),
72
+ && parentProps.modelValue === parentProps.max),
73
73
  label: this.labelStepUp,
74
74
  onStepUp,
75
75
  onStepDown,
@@ -79,7 +79,7 @@ export default function VvInputTextActionsFactory(
79
79
  disabled:
80
80
  this.isDisabled
81
81
  || (parentProps.min !== undefined
82
- && parentProps.modelValue === parentProps.min),
82
+ && parentProps.modelValue === parentProps.min),
83
83
  label: this.labelStepDown,
84
84
  onStepUp,
85
85
  onStepDown,
@@ -1,7 +1,7 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
2
1
  import type { FactoryOpts } from 'imask'
2
+ import type { ExtractPropTypes, PropType } from 'vue'
3
3
  import { InputTextareaProps, StorageProps } from '../../props'
4
- import { type VvIconProps, ACTION_ICONS } from '../VvIcon'
4
+ import { ACTION_ICONS, type VvIconProps } from '../VvIcon'
5
5
 
6
6
  export const INPUT_TYPES = {
7
7
  TEXT: 'text',
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { VvNavEvents, VvNavProps } from '@/components/VvNav'
2
3
  import VvNavItem from './VvNavItem.vue'
3
- import { VvNavProps, VvNavEvents } from '@/components/VvNav'
4
4
 
5
5
  const props = defineProps(VvNavProps)
6
6
  const emit = defineEmits(VvNavEvents)
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { useGroupProps, VvRadioEvents, VvRadioProps } from '.'
2
3
  import { HintSlotFactory } from '../common/HintSlot'
3
- import { VvRadioProps, VvRadioEvents, useGroupProps } from '.'
4
4
 
5
5
  // props, emit and slots
6
6
  const props = defineProps(VvRadioProps)
@@ -1,7 +1,7 @@
1
1
  import type { ExtractPropTypes } from 'vue'
2
2
  import type { InputGroupState } from '../../types/group'
3
- import { CheckboxRadioProps } from '../../props'
4
3
  import { INJECTION_KEY_RADIO_GROUP } from '../../constants'
4
+ import { CheckboxRadioProps } from '../../props'
5
5
 
6
6
  export const VvRadioProps = CheckboxRadioProps
7
7
 
@@ -18,7 +18,7 @@ export function useGroupProps(
18
18
  ) {
19
19
  const { id } = toRefs(props)
20
20
  const { group, isInGroup, getGroupOrLocalRef }
21
- = useInjectedGroupState<InputGroupState>(INJECTION_KEY_RADIO_GROUP)
21
+ = useGroupStateInject<InputGroupState>(INJECTION_KEY_RADIO_GROUP)
22
22
 
23
23
  // global props
24
24
  const modelValue = getGroupOrLocalRef('modelValue', props, emit)
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import type { Option } from '../../types/generic'
3
3
  import type { InputGroupState } from '../../types/group'
4
+ import { VvRadioGroupEvents, VvRadioGroupProps } from '.'
4
5
  import { INJECTION_KEY_RADIO_GROUP } from '../../constants'
5
6
  import { HintSlotFactory } from '../common/HintSlot'
6
7
  import VvRadio from '../VvRadio/VvRadio.vue'
7
- import { VvRadioGroupProps, VvRadioGroupEvents } from '.'
8
8
 
9
9
  // props, emit and slots
10
10
  const props = defineProps(VvRadioGroupProps)
@@ -25,7 +25,7 @@ const modelValue = useVModel(props, 'modelValue', emit)
25
25
  const { disabled, readonly, vertical, valid, invalid, modifiers }
26
26
  = toRefs(props)
27
27
 
28
- useProvideGroupState<InputGroupState>(INJECTION_KEY_RADIO_GROUP, {
28
+ useGroupStateProvide<InputGroupState>(INJECTION_KEY_RADIO_GROUP, {
29
29
  modelValue,
30
30
  disabled,
31
31
  readonly,
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts" generic="T extends string | Option">
2
2
  import type { SelectHTMLAttributes } from 'vue'
3
- import VvIcon from '../VvIcon/VvIcon.vue'
4
- import HintSlotFactory from '../common/HintSlot'
5
3
  import type { Option } from '../../types/generic'
6
- import { type VvSelectEmits, useVvSelectProps } from '.'
4
+ import { useVvSelectProps, type VvSelectEmits } from '.'
5
+ import HintSlotFactory from '../common/HintSlot'
6
+ import VvIcon from '../VvIcon/VvIcon.vue'
7
7
 
8
8
  // props, emit and slots
9
9
  // WARNING: This is a provisiaonal implementation, it may change in the future
@@ -20,7 +20,7 @@ const propsDefaults = useDefaults<typeof VvSelectProps>(
20
20
  )
21
21
 
22
22
  // template refs
23
- const selectEl = ref()
23
+ const selectEl = useTemplateRef<HTMLSelectElement>('selectEl')
24
24
 
25
25
  // hint
26
26
  const {
@@ -72,8 +72,8 @@ const localModelValue = computed({
72
72
  set: (newValue) => {
73
73
  if (Array.isArray(newValue)) {
74
74
  newValue = newValue.filter(item => item !== undefined)
75
- if (newValue.length === 0 && !props.unselectable) {
76
- selectEl.value.value = props.modelValue
75
+ if (newValue.length === 0 && !props.unselectable && selectEl.value) {
76
+ selectEl.value.value = String(props.modelValue)
77
77
  return
78
78
  }
79
79
  }
@@ -1,23 +1,23 @@
1
1
  import type { MaybeElement } from '@vueuse/core'
2
+ import type { Option } from '../../types/generic'
2
3
  import {
3
- ValidProps,
4
- InvalidProps,
5
- HintProps,
6
- LoadingProps,
4
+ AutocompleteProps,
5
+ AutofocusProps,
7
6
  DisabledProps,
8
- ReadonlyProps,
9
- ModifiersProps,
10
- TabindexProps,
11
- OptionsProps,
7
+ FloatingLabelProps,
8
+ HintProps,
12
9
  IconProps,
13
10
  IdNameProps,
14
- FloatingLabelProps,
15
- AutofocusProps,
16
- AutocompleteProps,
11
+ InvalidProps,
17
12
  LabelProps,
13
+ LoadingProps,
14
+ ModifiersProps,
15
+ OptionsProps,
16
+ ReadonlyProps,
17
+ TabindexProps,
18
18
  UnselectableProps,
19
+ ValidProps,
19
20
  } from '../../props'
20
- import type { Option } from '../../types/generic'
21
21
 
22
22
  export type VvSelectEmits = {
23
23
  'update:modelValue': [any]
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { VvTabProps, VvTabEvents } from '@/components/VvTab'
3
- import VvNav from '@/components/VvNav/VvNav.vue'
4
2
  import type { NavItemTab } from '@/types/nav'
3
+ import VvNav from '@/components/VvNav/VvNav.vue'
4
+ import { VvTabEvents, VvTabProps } from '@/components/VvTab'
5
5
 
6
6
  const props = defineProps(VvTabProps)
7
7
  const emit = defineEmits(VvTabEvents)
@@ -1,5 +1,5 @@
1
- import { ModifiersProps } from '@/props'
2
1
  import type { NavItemTab } from '@/types/nav'
2
+ import { ModifiersProps } from '@/props'
3
3
 
4
4
  export const VvTabProps = {
5
5
  ...ModifiersProps,
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import type { TextareaHTMLAttributes } from 'vue'
3
+ import { VvTextareaEvents, VvTextareaProps } from '.'
3
4
  import HintSlotFactory from '../common/HintSlot'
4
5
  import VvIcon from '../VvIcon/VvIcon.vue'
5
- import { VvTextareaProps, VvTextareaEvents } from '.'
6
6
 
7
7
  // props, emit and slots
8
8
  const props = defineProps(VvTextareaProps)
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, Slots, Ref } from 'vue'
1
+ import type { ExtractPropTypes, Ref, Slots } from 'vue'
2
2
 
3
3
  /**
4
4
  * Merge array of string
@@ -14,18 +14,18 @@ function joinLines(items: string[] | string | unknown[] | undefined) {
14
14
 
15
15
  export type HintSlotProps = Readonly<
16
16
  ExtractPropTypes<{
17
- hintLabel: {
18
- type: StringConstructor
19
- default: ''
20
- required: true
21
- }
22
- modelValue: unknown
23
- valid: BooleanConstructor
24
- validLabel: (StringConstructor | ArrayConstructor)[]
25
- invalid: BooleanConstructor
26
- invalidLabel: (StringConstructor | ArrayConstructor)[]
27
- loading: BooleanConstructor
28
- loadingLabel: StringConstructor
17
+ hintLabel: {
18
+ type: StringConstructor
19
+ default: ''
20
+ required: true
21
+ }
22
+ modelValue: unknown
23
+ valid: BooleanConstructor
24
+ validLabel: (StringConstructor | ArrayConstructor)[]
25
+ invalid: BooleanConstructor
26
+ invalidLabel: (StringConstructor | ArrayConstructor)[]
27
+ loading: BooleanConstructor
28
+ loadingLabel: StringConstructor
29
29
  }>
30
30
  >
31
31
 
@@ -60,7 +60,7 @@ export function HintSlotFactory(
60
60
  () =>
61
61
  !hasLoadingLabelOrSlot.value
62
62
  && Boolean(
63
- props.value.invalid && (slots.invalid || invalidLabel.value),
63
+ props.value.invalid && (slots.invalid || invalidLabel.value),
64
64
  ),
65
65
  )
66
66
  const hasValidLabelOrSlot = computed(
@@ -20,6 +20,7 @@ export { default as VvDropdownItem } from './VvDropdown/VvDropdownItem.vue'
20
20
  export { default as VvDropdownOptgroup } from './VvDropdown/VvDropdownOptgroup.vue'
21
21
  export { default as VvDropdownOption } from './VvDropdown/VvDropdownOption.vue'
22
22
  export { default as VvIcon } from './VvIcon/VvIcon.vue'
23
+ export { default as VvInputFile } from './VvInputFile/VvInputFile.vue'
23
24
  export { default as VvInputText } from './VvInputText/VvInputText.vue'
24
25
  export { default as VvNav } from './VvNav/VvNav.vue'
25
26
  export { default as VvNavItem } from './VvNav/VvNavItem.vue'
@@ -31,4 +32,3 @@ export { default as VvSelect } from './VvSelect/VvSelect.vue'
31
32
  export { default as VvTab } from './VvTab/VvTab.vue'
32
33
  export { default as VvTextarea } from './VvTextarea/VvTextarea.vue'
33
34
  export { default as VvTooltip } from './VvTooltip/VvTooltip.vue'
34
- export { default as VvInputFile } from './VvInputFile/VvInputFile.vue'
@@ -1,12 +1,12 @@
1
+ import type { Alert } from '@/types/alert'
1
2
  import {
2
3
  DEFAULT_ALERT_AUTO_CLOSE,
3
4
  DEFAULT_ALERT_DISMISSABLE,
4
5
  DEFAULT_ALERT_GROUP,
5
- DEFAULT_ALERT_MODIFIERS,
6
6
  DEFAULT_ALERT_INFO_ICON,
7
+ DEFAULT_ALERT_MODIFIERS,
7
8
  DefaultAlertIconMap,
8
9
  } from '@/constants'
9
- import type { Alert } from '@/types/alert'
10
10
 
11
11
  type AlertInGroup = Alert & { timestamp: number, group: string }
12
12
 
@@ -1,12 +1,12 @@
1
1
  import type { Ref } from 'vue'
2
- import mitt from 'mitt'
3
2
  import { INJECTION_KEY_ALERT_GROUP } from '@/constants'
3
+ import mitt from 'mitt'
4
4
 
5
5
  /**
6
6
  * Share the alert group name with all its children.
7
7
  * @param {Ref<string | undefined>} name the alert group name
8
8
  */
9
- export function useProvideAlertGroup({
9
+ export function useAlertProvideGroup({
10
10
  name,
11
11
  }: {
12
12
  name: Ref<string | undefined>
@@ -0,0 +1,22 @@
1
+ import type VvDropdown from '@/components/VvDropdown/VvDropdown.vue'
2
+ import { computed, getCurrentInstance, onMounted, onUnmounted, type Ref, unref } from 'vue'
3
+
4
+ export function useDropdownContextmenu(dropdownEl: Ref<typeof VvDropdown>, targetEl?: Ref<HTMLElement> | HTMLElement) {
5
+ const { x, y, getBoundingClientRect, onScroll } = useDropdownVirtualElement(dropdownEl)
6
+ const onContextmenu = (event: MouseEvent) => {
7
+ x.value = event.clientX
8
+ y.value = event.clientY
9
+ event.preventDefault()
10
+ dropdownEl.value.show()
11
+ }
12
+ const target = computed(() => unref(targetEl))
13
+ if (target && getCurrentInstance()) {
14
+ onMounted(() => {
15
+ target.value?.addEventListener('contextmenu', onContextmenu, false)
16
+ })
17
+ onUnmounted(() => {
18
+ target.value?.removeEventListener('contextmenu', onContextmenu)
19
+ })
20
+ }
21
+ return { x, y, getBoundingClientRect, onContextmenu, onScroll }
22
+ }
@@ -1,26 +1,26 @@
1
- import { type Ref, Fragment } from 'vue'
2
1
  import mitt from 'mitt'
2
+ import { Fragment, type Ref } from 'vue'
3
3
  import {
4
+ ActionRoles,
5
+ DropdownItemRole,
4
6
  type DropdownItemState,
5
- INJECTION_KEY_DROPDOWN_TRIGGER,
7
+ DropdownRole,
6
8
  INJECTION_KEY_DROPDOWN_ACTION,
7
9
  INJECTION_KEY_DROPDOWN_ITEM,
8
- DropdownRole,
9
- DropdownItemRole,
10
- ActionRoles,
10
+ INJECTION_KEY_DROPDOWN_TRIGGER,
11
11
  } from '../../constants'
12
12
 
13
13
  /**
14
14
  * Share the dropdown reference and the event bus with all its children.
15
15
  * @param {Ref<HTMLElement | null>} reference the dropdown reference
16
16
  */
17
- export function useProvideDropdownTrigger({
17
+ export function useDropdownProvideTrigger({
18
18
  reference,
19
19
  id,
20
20
  expanded,
21
21
  aria,
22
22
  }: {
23
- reference: Ref<HTMLElement | null>
23
+ reference: Ref<HTMLElement | null | undefined>
24
24
  id: Ref<string | number>
25
25
  expanded: Ref<boolean>
26
26
  aria: Ref<{
@@ -60,7 +60,7 @@ export function useProvideDropdownTrigger({
60
60
  * Share the dropdown item role with all its children.
61
61
  * @param {Ref<string>} role the dropdown item role
62
62
  */
63
- export function useProvideDropdownItem({
63
+ export function useDropdownProvideItem({
64
64
  role,
65
65
  ...others
66
66
  }: Omit<DropdownItemState, 'role'> & {
@@ -82,7 +82,7 @@ export function useProvideDropdownItem({
82
82
  * Share the dropdown item role with all its children.
83
83
  * @param {Ref<string>} role the dropdown item role
84
84
  */
85
- export function useProvideDropdownAction({
85
+ export function useDropdownProvideAction({
86
86
  expanded,
87
87
  }: {
88
88
  expanded?: Ref<boolean>
@@ -0,0 +1,53 @@
1
+ import type VvDropdown from '@/components/VvDropdown/VvDropdown.vue'
2
+ import { onMounted, type Ref, ref } from 'vue'
3
+
4
+ export function useDropdownVirtualElement(dropdownEl: Ref<typeof VvDropdown>) {
5
+ const x = ref(0)
6
+ const y = ref(0)
7
+
8
+ const scrollContainerEl = ref<HTMLElement>()
9
+ let scrollXDelta = 0
10
+ let scrollYDelta = 0
11
+ let lastScrollTop = 0
12
+ let lastScrollLeft = 0
13
+ const onScroll = (event: HTMLElementEventMap['scroll']) => {
14
+ const scrollEl = event.target as HTMLElement
15
+ scrollXDelta = scrollEl.scrollLeft - lastScrollLeft
16
+ scrollYDelta = scrollEl.scrollTop - lastScrollTop
17
+ y.value = y.value - scrollYDelta
18
+ x.value = x.value - scrollXDelta
19
+ lastScrollLeft = scrollEl.scrollLeft
20
+ lastScrollTop = scrollEl.scrollTop
21
+ }
22
+ const getBoundingClientRect = () => ({
23
+ width: 0,
24
+ height: 0,
25
+ x: x.value,
26
+ y: y.value,
27
+ top: y.value,
28
+ left: x.value,
29
+ right: x.value,
30
+ bottom: y.value,
31
+ })
32
+
33
+ if (getCurrentInstance()) {
34
+ onMounted(() => {
35
+ if (dropdownEl.value) {
36
+ dropdownEl.value.init({
37
+ getBoundingClientRect,
38
+ })
39
+ scrollContainerEl.value = findScrollContainer(dropdownEl.value.$el)
40
+ if (scrollContainerEl.value) {
41
+ scrollContainerEl.value.addEventListener('scroll', onScroll)
42
+ }
43
+ }
44
+ })
45
+
46
+ onUnmounted(() => {
47
+ if (scrollContainerEl.value) {
48
+ scrollContainerEl.value.removeEventListener('scroll', onScroll)
49
+ }
50
+ })
51
+ }
52
+ return { x, y, getBoundingClientRect, onScroll }
53
+ }
@@ -1,9 +1,9 @@
1
- import type { Ref, InjectionKey } from 'vue'
1
+ import type { InjectionKey, Ref } from 'vue'
2
2
 
3
3
  /**
4
4
  * Injects a group state
5
5
  */
6
- export function useInjectedGroupState<GroupStateType>(
6
+ export function useGroupStateInject<GroupStateType>(
7
7
  groupKey: InjectionKey<GroupStateType>,
8
8
  ) {
9
9
  // Get group state
@@ -1,10 +1,10 @@
1
- import type { Ref, InjectionKey } from 'vue'
2
1
  import type { Emitter } from 'mitt'
2
+ import type { InjectionKey, Ref } from 'vue'
3
3
 
4
4
  /**
5
5
  * Share part of the state of the component with all its children.
6
6
  */
7
- export function useProvideGroupState<
7
+ export function useGroupStateProvide<
8
8
  TGroupState extends Record<
9
9
  string,
10
10
  Ref<unknown> | Emitter<any>
@@ -1,2 +1,4 @@
1
1
  export { useAlert } from './alert/useAlert'
2
+ export { useDropdownContextmenu } from './dropdown/useDropdownContextmenu'
3
+ export { useDropdownVirtualElement } from './dropdown/useDropdownVirtualElement'
2
4
  export { useBlurhash } from './useBlurhash'
@@ -1,7 +1,7 @@
1
- import { wrap } from 'comlink'
2
- import Pica from 'pica'
3
1
  import type { BlurhashWorkerType } from '@/types/blurhash'
4
2
  import BlurhashWorker from '@/workers/blurhash?worker&inline'
3
+ import { wrap } from 'comlink'
4
+ import Pica from 'pica'
5
5
 
6
6
  const remoteFunction = wrap<BlurhashWorkerType>(new BlurhashWorker())
7
7
 
@@ -1,5 +1,5 @@
1
- import { get } from 'ts-dot-prop'
2
1
  import type { Option } from '../types/generic'
2
+ import { get } from 'ts-dot-prop'
3
3
 
4
4
  export function useOptions(props: any) {
5
5
  const { options, labelKey, valueKey, disabledKey } = toRefs(props)
@@ -1,6 +1,6 @@
1
1
  import type { Ref } from 'vue'
2
- import { computed, isRef, ref, unref, watch } from 'vue'
3
2
  import { StorageType } from '@/constants'
3
+ import { computed, isRef, ref, unref, watch } from 'vue'
4
4
 
5
5
  export function usePersistence<T>(storageKey: Ref<string | undefined> | undefined, storageType: Ref<`${StorageType}`> | `${StorageType}` = StorageType.local, defaultValue?: T) {
6
6
  const localValue: Ref<T | undefined> = ref()
@@ -35,8 +35,8 @@ export function useTextCount(
35
35
 
36
36
  if (options?.mode === 'limit' && options?.upperLimit) {
37
37
  return `${length.value} / ${
38
- options.lowerLimit ? `${options.lowerLimit}-` : ''
39
- }${options.upperLimit}`
38
+ options.lowerLimit ? `${options.lowerLimit}-` : ''
39
+ }${options.upperLimit}`
40
40
  }
41
41
 
42
42
  if (options?.mode === 'countdown') {
@@ -1,6 +1,5 @@
1
- import { uid } from 'uid'
2
- import type { Ref } from 'vue'
1
+ import { type Ref, useId } from 'vue'
3
2
 
4
3
  export function useUniqueId(id?: Ref<string | number | undefined>) {
5
- return computed(() => String(id?.value || uid()))
4
+ return computed(() => String(id?.value || useId()))
6
5
  }
package/src/constants.ts CHANGED
@@ -1,13 +1,13 @@
1
- import type { InjectionKey, Ref } from 'vue'
2
1
  import type { Emitter } from 'mitt'
3
- import type { Volver } from './Volver'
2
+ import type { InjectionKey, Ref } from 'vue'
4
3
  import type {
5
4
  AccordionGroupState,
6
- InputGroupState,
7
- ButtonGroupState,
8
5
  AlertGroupState,
9
6
  AlertModifier,
7
+ ButtonGroupState,
8
+ InputGroupState,
10
9
  } from './types'
10
+ import type { Volver } from './Volver'
11
11
 
12
12
  export const DEFAULT_ICONIFY_PROVIDER = 'vv'
13
13
 
@@ -98,7 +98,7 @@ export const INJECTION_KEY_ACCORDION_GROUP = Symbol.for(
98
98
  // dropdown
99
99
  export type DropdownTriggerState = {
100
100
  id?: Ref<string | number>
101
- reference?: Ref<HTMLElement | null>
101
+ reference?: Ref<HTMLElement | null | undefined>
102
102
  bus?: Emitter<{
103
103
  click: Event
104
104
  mouseover: Event
@@ -1,4 +1,4 @@
1
- import vTooltip from '../directives/v-tooltip'
2
1
  import vContextmenu from '../directives/v-contextmenu'
2
+ import vTooltip from '../directives/v-tooltip'
3
3
 
4
- export { vTooltip, vContextmenu }
4
+ export { vContextmenu, vTooltip }