@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,187 +1,4 @@
1
- import { computed, isRef, defineComponent, h, inject, toRef, toRefs, unref, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
2
- import { uid } from "uid";
3
- function equals(obj1, obj2, field) {
4
- return deepEquals(obj1, obj2);
5
- }
6
- function deepEquals(a, b) {
7
- if (a === b)
8
- return true;
9
- if (a && b && typeof a == "object" && typeof b == "object") {
10
- const arrA = Array.isArray(a);
11
- const arrB = Array.isArray(b);
12
- let i, length, key;
13
- if (arrA && arrB) {
14
- length = a.length;
15
- if (length !== b.length)
16
- return false;
17
- for (i = length; i-- !== 0; ) {
18
- if (!deepEquals(a[i], b[i]))
19
- return false;
20
- }
21
- return true;
22
- }
23
- if (arrA !== arrB)
24
- return false;
25
- const dateA = a instanceof Date;
26
- const dateB = b instanceof Date;
27
- if (dateA !== dateB)
28
- return false;
29
- if (dateA && dateB)
30
- return a.getTime() === b.getTime();
31
- const regexpA = a instanceof RegExp;
32
- const regexpB = b instanceof RegExp;
33
- if (regexpA !== regexpB)
34
- return false;
35
- if (regexpA && regexpB)
36
- return a.toString() === b.toString();
37
- const keys = Object.keys(a);
38
- length = keys.length;
39
- if (length !== Object.keys(b).length)
40
- return false;
41
- for (i = length; i-- !== 0; ) {
42
- if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
43
- return false;
44
- }
45
- for (i = length; i-- !== 0; ) {
46
- key = keys[i];
47
- if (!deepEquals(a[key], b[key]))
48
- return false;
49
- }
50
- return true;
51
- }
52
- return Number.isNaN(a) && Number.isNaN(b);
53
- }
54
- function contains(value, list) {
55
- if (value != null && list && list.length) {
56
- for (const val of list) {
57
- if (equals(value, val)) {
58
- return true;
59
- }
60
- }
61
- }
62
- return false;
63
- }
64
- function isString(value) {
65
- return typeof value === "string" || value instanceof String;
66
- }
67
- function joinLines(items) {
68
- if (Array.isArray(items)) {
69
- return items.filter((item) => isString(item)).join(" ");
70
- }
71
- return items;
72
- }
73
- function HintSlotFactory(propsOrRef, slots) {
74
- const props = computed(() => {
75
- if (isRef(propsOrRef)) {
76
- return propsOrRef.value;
77
- }
78
- return propsOrRef;
79
- });
80
- const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
81
- const validLabel = computed(() => joinLines(props.value.validLabel));
82
- const loadingLabel = computed(() => props.value.loadingLabel);
83
- const hintLabel = computed(() => props.value.hintLabel);
84
- const hasLoadingLabelOrSlot = computed(
85
- () => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
86
- );
87
- const hasInvalidLabelOrSlot = computed(
88
- () => !hasLoadingLabelOrSlot.value && Boolean(
89
- props.value.invalid && (slots.invalid || invalidLabel.value)
90
- )
91
- );
92
- const hasValidLabelOrSlot = computed(
93
- () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
94
- );
95
- const hasHintLabelOrSlot = computed(
96
- () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
97
- );
98
- const isVisible = computed(
99
- () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
100
- );
101
- const hintSlotScope = computed(() => ({
102
- modelValue: props.value.modelValue,
103
- valid: props.value.valid,
104
- invalid: props.value.invalid,
105
- loading: props.value.loading
106
- }));
107
- const HintSlot = defineComponent({
108
- name: "HintSlot",
109
- props: {
110
- tag: {
111
- type: String,
112
- default: "small"
113
- }
114
- },
115
- setup() {
116
- return {
117
- isVisible,
118
- invalidLabel,
119
- validLabel,
120
- loadingLabel,
121
- hintLabel,
122
- hasInvalidLabelOrSlot,
123
- hasValidLabelOrSlot,
124
- hasLoadingLabelOrSlot,
125
- hasHintLabelOrSlot
126
- };
127
- },
128
- render() {
129
- var _a, _b, _c, _d, _e, _f, _g, _h;
130
- if (this.isVisible) {
131
- let role;
132
- if (this.hasInvalidLabelOrSlot) {
133
- role = "alert";
134
- }
135
- if (this.hasValidLabelOrSlot) {
136
- role = "status";
137
- }
138
- if (this.hasLoadingLabelOrSlot) {
139
- return h(
140
- this.tag,
141
- {
142
- role
143
- },
144
- ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
145
- );
146
- }
147
- if (this.hasInvalidLabelOrSlot) {
148
- return h(
149
- this.tag,
150
- {
151
- role
152
- },
153
- ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
154
- );
155
- }
156
- if (this.hasValidLabelOrSlot) {
157
- return h(
158
- this.tag,
159
- {
160
- role
161
- },
162
- ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
163
- );
164
- }
165
- return h(
166
- this.tag,
167
- {
168
- role
169
- },
170
- ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
171
- );
172
- }
173
- return null;
174
- }
175
- });
176
- return {
177
- hasInvalidLabelOrSlot,
178
- hasHintLabelOrSlot,
179
- hasValidLabelOrSlot,
180
- hasLoadingLabelOrSlot,
181
- hintSlotScope,
182
- HintSlot
183
- };
184
- }
1
+ import { inject, computed, toRef, toRefs, isRef, defineComponent, h, useId, unref, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
185
2
  var StorageType = /* @__PURE__ */ ((StorageType2) => {
186
3
  StorageType2["local"] = "local";
187
4
  StorageType2["session"] = "session";
@@ -561,7 +378,7 @@ const CheckboxRadioProps = {
561
378
  },
562
379
  storageKey: String
563
380
  });
564
- function useInjectedGroupState(groupKey) {
381
+ function useGroupStateInject(groupKey) {
565
382
  const group = inject(groupKey, void 0);
566
383
  const isInGroup = computed(() => group !== void 0);
567
384
  function getGroupOrLocalRef(propName, props, emit) {
@@ -612,7 +429,7 @@ const VvCheckboxProps = {
612
429
  };
613
430
  const VvCheckboxEvents = ["click", "update:modelValue", "change", "blur"];
614
431
  function useGroupProps(props, emit) {
615
- const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_CHECK_GROUP);
432
+ const { group, isInGroup, getGroupOrLocalRef } = useGroupStateInject(INJECTION_KEY_CHECK_GROUP);
616
433
  const { id, switch: propsSwitch, indeterminate } = toRefs(props);
617
434
  const modelValue = getGroupOrLocalRef("modelValue", props, emit);
618
435
  const valid = getGroupOrLocalRef("valid", props);
@@ -638,6 +455,188 @@ function useGroupProps(props, emit) {
638
455
  disabled
639
456
  };
640
457
  }
458
+ function equals(obj1, obj2, field) {
459
+ return deepEquals(obj1, obj2);
460
+ }
461
+ function deepEquals(a, b) {
462
+ if (a === b)
463
+ return true;
464
+ if (a && b && typeof a == "object" && typeof b == "object") {
465
+ const arrA = Array.isArray(a);
466
+ const arrB = Array.isArray(b);
467
+ let i, length, key;
468
+ if (arrA && arrB) {
469
+ length = a.length;
470
+ if (length !== b.length)
471
+ return false;
472
+ for (i = length; i-- !== 0; ) {
473
+ if (!deepEquals(a[i], b[i]))
474
+ return false;
475
+ }
476
+ return true;
477
+ }
478
+ if (arrA !== arrB)
479
+ return false;
480
+ const dateA = a instanceof Date;
481
+ const dateB = b instanceof Date;
482
+ if (dateA !== dateB)
483
+ return false;
484
+ if (dateA && dateB)
485
+ return a.getTime() === b.getTime();
486
+ const regexpA = a instanceof RegExp;
487
+ const regexpB = b instanceof RegExp;
488
+ if (regexpA !== regexpB)
489
+ return false;
490
+ if (regexpA && regexpB)
491
+ return a.toString() === b.toString();
492
+ const keys = Object.keys(a);
493
+ length = keys.length;
494
+ if (length !== Object.keys(b).length)
495
+ return false;
496
+ for (i = length; i-- !== 0; ) {
497
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
498
+ return false;
499
+ }
500
+ for (i = length; i-- !== 0; ) {
501
+ key = keys[i];
502
+ if (!deepEquals(a[key], b[key]))
503
+ return false;
504
+ }
505
+ return true;
506
+ }
507
+ return Number.isNaN(a) && Number.isNaN(b);
508
+ }
509
+ function contains(value, list) {
510
+ if (value != null && list && list.length) {
511
+ for (const val of list) {
512
+ if (equals(value, val)) {
513
+ return true;
514
+ }
515
+ }
516
+ }
517
+ return false;
518
+ }
519
+ function isString(value) {
520
+ return typeof value === "string" || value instanceof String;
521
+ }
522
+ function joinLines(items) {
523
+ if (Array.isArray(items)) {
524
+ return items.filter((item) => isString(item)).join(" ");
525
+ }
526
+ return items;
527
+ }
528
+ function HintSlotFactory(propsOrRef, slots) {
529
+ const props = computed(() => {
530
+ if (isRef(propsOrRef)) {
531
+ return propsOrRef.value;
532
+ }
533
+ return propsOrRef;
534
+ });
535
+ const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
536
+ const validLabel = computed(() => joinLines(props.value.validLabel));
537
+ const loadingLabel = computed(() => props.value.loadingLabel);
538
+ const hintLabel = computed(() => props.value.hintLabel);
539
+ const hasLoadingLabelOrSlot = computed(
540
+ () => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
541
+ );
542
+ const hasInvalidLabelOrSlot = computed(
543
+ () => !hasLoadingLabelOrSlot.value && Boolean(
544
+ props.value.invalid && (slots.invalid || invalidLabel.value)
545
+ )
546
+ );
547
+ const hasValidLabelOrSlot = computed(
548
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
549
+ );
550
+ const hasHintLabelOrSlot = computed(
551
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
552
+ );
553
+ const isVisible = computed(
554
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
555
+ );
556
+ const hintSlotScope = computed(() => ({
557
+ modelValue: props.value.modelValue,
558
+ valid: props.value.valid,
559
+ invalid: props.value.invalid,
560
+ loading: props.value.loading
561
+ }));
562
+ const HintSlot = defineComponent({
563
+ name: "HintSlot",
564
+ props: {
565
+ tag: {
566
+ type: String,
567
+ default: "small"
568
+ }
569
+ },
570
+ setup() {
571
+ return {
572
+ isVisible,
573
+ invalidLabel,
574
+ validLabel,
575
+ loadingLabel,
576
+ hintLabel,
577
+ hasInvalidLabelOrSlot,
578
+ hasValidLabelOrSlot,
579
+ hasLoadingLabelOrSlot,
580
+ hasHintLabelOrSlot
581
+ };
582
+ },
583
+ render() {
584
+ var _a, _b, _c, _d, _e, _f, _g, _h;
585
+ if (this.isVisible) {
586
+ let role;
587
+ if (this.hasInvalidLabelOrSlot) {
588
+ role = "alert";
589
+ }
590
+ if (this.hasValidLabelOrSlot) {
591
+ role = "status";
592
+ }
593
+ if (this.hasLoadingLabelOrSlot) {
594
+ return h(
595
+ this.tag,
596
+ {
597
+ role
598
+ },
599
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
600
+ );
601
+ }
602
+ if (this.hasInvalidLabelOrSlot) {
603
+ return h(
604
+ this.tag,
605
+ {
606
+ role
607
+ },
608
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
609
+ );
610
+ }
611
+ if (this.hasValidLabelOrSlot) {
612
+ return h(
613
+ this.tag,
614
+ {
615
+ role
616
+ },
617
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
618
+ );
619
+ }
620
+ return h(
621
+ this.tag,
622
+ {
623
+ role
624
+ },
625
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
626
+ );
627
+ }
628
+ return null;
629
+ }
630
+ });
631
+ return {
632
+ hasInvalidLabelOrSlot,
633
+ hasHintLabelOrSlot,
634
+ hasValidLabelOrSlot,
635
+ hasLoadingLabelOrSlot,
636
+ hintSlotScope,
637
+ HintSlot
638
+ };
639
+ }
641
640
  function useVolver() {
642
641
  return inject(INJECTION_KEY_VOLVER);
643
642
  }
@@ -695,7 +694,7 @@ function useDefaults(componentName, propsDefinition, props) {
695
694
  });
696
695
  }
697
696
  function useUniqueId(id) {
698
- return computed(() => String((id == null ? void 0 : id.value) || uid()));
697
+ return computed(() => String((id == null ? void 0 : id.value) || useId()));
699
698
  }
700
699
  function useModifiers(prefix, modifiers, others) {
701
700
  return computed(() => {
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","uid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=t(e.vue,e.uid)}(this,(function(e,t){"use strict";function l(e,t,l){return a(e,t)}function a(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let n,i,r;if(l&&o){if(i=e.length,i!==t.length)return!1;for(n=i;0!=n--;)if(!a(e[n],t[n]))return!1;return!0}if(l!==o)return!1;const u=e instanceof Date,d=t instanceof Date;if(u!==d)return!1;if(u&&d)return e.getTime()===t.getTime();const s=e instanceof RegExp,v=t instanceof RegExp;if(s!==v)return!1;if(s&&v)return e.toString()===t.toString();const c=Object.keys(e);if(i=c.length,i!==Object.keys(t).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=i;0!=n--;)if(r=c[n],!a(e[r],t[r]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function o(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}var n=(e=>(e.local="local",e.session="session",e))(n||{}),i=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(i||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),u=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(u||{}),d=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(d||{});const s=Symbol.for("volver"),v=Symbol.for("checkGroup"),c={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},f={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},p={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},b={disabled:{type:Boolean,default:!1}},h=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),m={readonly:{type:Boolean,default:!1}},y={modifiers:{type:[String,Array],default:void 0}},g={hintLabel:{type:String,default:""}};r.before;const S={tabindex:{type:[String,Number],default:0}},L={id:[String,Number]};i.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const k={...{...L,name:{type:String,required:!0}},...S,...c,...f,...g,...b,...m,...y,...h,...p,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};u.button,d.button,n.local;const B={...k,...y,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function O(t,l){const{group:a,isInGroup:o,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,o){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const i=e.toRef(a,t);return e.computed({get:()=>i.value,set(e){o&&o(`update:${t}`,e)}})}}}(v),{id:i,switch:r,indeterminate:u}=e.toRefs(t),d=n("modelValue",t,l),s=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:i,propsSwitch:r,indeterminate:u,group:a,isInGroup:o,modelValue:d,valid:s,invalid:c,readonly:f,disabled:p}}function V(t,l,a){const o=e.inject(s),n=e.computed((()=>{var e;if(o&&(null==(e=o.defaults.value)?void 0:e[t]))return o.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return a;const e=n.value,t=l,o=a;return Object.keys(t).reduce(((l,a)=>{const n=o[a];if(l[a]=n,a in e){if(Array.isArray(t[a])){const o=t[a];if(o.length){o[0]===n&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===n&&(l[a]=e[a])}if("object"==typeof t[a]){let o=t[a].default;"function"==typeof o&&(o=o()),"object"==typeof o?JSON.stringify(o)===JSON.stringify(n)&&(l[a]=e[a]):o===n&&(l[a]=e[a])}}return l}),{})}))}const x=["for"],A=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:B,emits:["click","update:modelValue","change","blur"],setup(a,{emit:n}){const i=a,r=n,u=e.useSlots(),d=V("VvCheckbox",B,i),{id:s,disabled:v,readonly:c,valid:f,invalid:p,propsSwitch:b,modelValue:h,indeterminate:m,isInGroup:y}=O(i,r),g=function(l){return e.computed((()=>String((null==l?void 0:l.value)||t.uid())))}(s),S=e.computed((()=>`${g.value}-hint`)),L=e.computed((()=>N.value?-1:i.tabindex)),k=e.ref(),$=e.computed((()=>void 0!==i.uncheckedValue&&!y.value)),N=e.computed((()=>v.value||c.value)),w=e.computed((()=>!0===p.value||!0!==f.value&&void 0)),j=e.computed((()=>$.value?h.value===i.value:Array.isArray(h.value)?function(e,t){if(null!=e&&t&&t.length)for(const a of t)if(l(e,a))return!0;return!1}(i.value,h.value):l(i.value,h.value))),R=e.computed((()=>!!m.value||!(j.value||!$.value||i.uncheckedValue===h.value))),C=e.computed((()=>{if(!$.value)return!["string","number","boolean"].includes(typeof i.value)||i.value})),I=e.computed({get:()=>j.value,set(e){if($.value)h.value=e?i.value:i.uncheckedValue;else if(Array.isArray(h.value)||y.value){const t=h.value??[],l=new Set(Array.isArray(t)?t:[t]);e?l.add(i.value):l.delete(i.value),h.value=[...l]}else h.value=e?i.value:void 0;r("change",e)}}),{modifiers:P}=e.toRefs(i),E=function(t,l,a){return e.computed((()=>{const o={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(o[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{o[`${t}--${l}`]=e.unref(a.value[l])})),o}))}("vv-checkbox",P,e.computed((()=>({switch:b.value,valid:f.value,invalid:p.value,disabled:v.value,readonly:c.value,indeterminate:m.value}))));e.watchEffect((()=>{$.value&&Array.isArray(h.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>R.value),(e=>{k.value.indeterminate=!!e})),e.onMounted((()=>{R.value&&(k.value.indeterminate=!0)}));const{HintSlot:G,hasHintLabelOrSlot:H,hasInvalidLabelOrSlot:T,hintSlotScope:_}=function(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),n=e.computed((()=>o(a.value.invalidLabel))),i=e.computed((()=>o(a.value.validLabel))),r=e.computed((()=>a.value.loadingLabel)),u=e.computed((()=>a.value.hintLabel)),d=e.computed((()=>Boolean(a.value.loading&&(l.loading||r.value)))),s=e.computed((()=>!d.value&&Boolean(a.value.invalid&&(l.invalid||n.value)))),v=e.computed((()=>!d.value&&!s.value&&Boolean(a.value.valid&&(l.valid||i.value)))),c=e.computed((()=>!d.value&&!s.value&&!v.value&&Boolean(l.hint||u.value))),f=e.computed((()=>s.value||v.value||d.value||c.value)),p=e.computed((()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading}))),b=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:f,invalidLabel:n,validLabel:i,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:c}),render(){var t,l,a,o,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(a=this.$slots).invalid)?void 0:o.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hintSlotScope:p,HintSlot:b}}(d,u);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(E)),for:e.unref(g)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(g),ref_key:"input",ref:k,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(I)?I.value=t:null),type:"checkbox",class:"vv-checkbox__input",name:t.name,disabled:e.unref(N),value:e.unref(C),tabindex:e.unref(L),"aria-invalid":e.unref(w),"aria-describedby":e.unref(H)?e.unref(S):void 0,"aria-errormessage":e.unref(T)?e.unref(S):void 0},null,8,A),[[e.vModelCheckbox,e.unref(I)]]),e.renderSlot(t.$slots,"default",{value:e.unref(h)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(G),{id:e.unref(S),class:"vv-checkbox__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(_))))])),key:"3"}:void 0]),1032,["id"])],10,x))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const i=Symbol.for("volver"),r=Symbol.for("checkGroup"),u={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},d={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},s={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},v={disabled:{type:Boolean,default:!1}},c=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),f={readonly:{type:Boolean,default:!1}},p={modifiers:{type:[String,Array],default:void 0}},b={hintLabel:{type:String,default:""}};a.before;const h={tabindex:{type:[String,Number],default:0}},m={id:[String,Number]};l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const y={...{...m,name:{type:String,required:!0}},...h,...u,...d,...b,...v,...f,...p,...c,...s,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};o.button,n.button,t.local;const g={...y,...p,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function S(t,l){const{group:a,isInGroup:o,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,o){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const i=e.toRef(a,t);return e.computed({get:()=>i.value,set(e){o&&o(`update:${t}`,e)}})}}}(r),{id:i,switch:u,indeterminate:d}=e.toRefs(t),s=n("modelValue",t,l),v=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:i,propsSwitch:u,indeterminate:d,group:a,isInGroup:o,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}function L(e,t,l){return k(e,t)}function k(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),a=Array.isArray(t);let o,n,i;if(l&&a){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!k(e[o],t[o]))return!1;return!0}if(l!==a)return!1;const r=e instanceof Date,u=t instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,v[o]))return!1;for(o=n;0!=o--;)if(i=v[o],!k(e[i],t[i]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function B(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function O(t,l,a){const o=e.inject(i),n=e.computed((()=>{var e;if(o&&(null==(e=o.defaults.value)?void 0:e[t]))return o.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return a;const e=n.value,t=l,o=a;return Object.keys(t).reduce(((l,a)=>{const n=o[a];if(l[a]=n,a in e){if(Array.isArray(t[a])){const o=t[a];if(o.length){o[0]===n&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===n&&(l[a]=e[a])}if("object"==typeof t[a]){let o=t[a].default;"function"==typeof o&&(o=o()),"object"==typeof o?JSON.stringify(o)===JSON.stringify(n)&&(l[a]=e[a]):o===n&&(l[a]=e[a])}}return l}),{})}))}const V=["for"],x=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:g,emits:["click","update:modelValue","change","blur"],setup(t,{emit:l}){const a=t,o=l,n=e.useSlots(),i=O("VvCheckbox",g,a),{id:r,disabled:u,readonly:d,valid:s,invalid:v,propsSwitch:c,modelValue:f,indeterminate:p,isInGroup:b}=S(a,o),h=function(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}(r),m=e.computed((()=>`${h.value}-hint`)),y=e.computed((()=>$.value?-1:a.tabindex)),k=e.ref(),A=e.computed((()=>void 0!==a.uncheckedValue&&!b.value)),$=e.computed((()=>u.value||d.value)),N=e.computed((()=>!0===v.value||!0!==s.value&&void 0)),w=e.computed((()=>A.value?f.value===a.value:Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(L(e,l))return!0;return!1}(a.value,f.value):L(a.value,f.value))),j=e.computed((()=>!!p.value||!(w.value||!A.value||a.uncheckedValue===f.value))),R=e.computed((()=>{if(!A.value)return!["string","number","boolean"].includes(typeof a.value)||a.value})),C=e.computed({get:()=>w.value,set(e){if(A.value)f.value=e?a.value:a.uncheckedValue;else if(Array.isArray(f.value)||b.value){const t=f.value??[],l=new Set(Array.isArray(t)?t:[t]);e?l.add(a.value):l.delete(a.value),f.value=[...l]}else f.value=e?a.value:void 0;o("change",e)}}),{modifiers:I}=e.toRefs(a),P=function(t,l,a){return e.computed((()=>{const o={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(o[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{o[`${t}--${l}`]=e.unref(a.value[l])})),o}))}("vv-checkbox",I,e.computed((()=>({switch:c.value,valid:s.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:p.value}))));e.watchEffect((()=>{A.value&&Array.isArray(f.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>j.value),(e=>{k.value.indeterminate=!!e})),e.onMounted((()=>{j.value&&(k.value.indeterminate=!0)}));const{HintSlot:E,hasHintLabelOrSlot:G,hasInvalidLabelOrSlot:H,hintSlotScope:T}=function(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),o=e.computed((()=>B(a.value.invalidLabel))),n=e.computed((()=>B(a.value.validLabel))),i=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(a.value.invalid&&(l.invalid||o.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||r.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),f=e.computed((()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:o,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,o,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(a=this.$slots).invalid)?void 0:o.call(a))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(P)),for:e.unref(h)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(h),ref_key:"input",ref:k,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(C)?C.value=t:null),type:"checkbox",class:"vv-checkbox__input",name:t.name,disabled:e.unref($),value:e.unref(R),tabindex:e.unref(y),"aria-invalid":e.unref(N),"aria-describedby":e.unref(G)?e.unref(m):void 0,"aria-errormessage":e.unref(H)?e.unref(m):void 0},null,8,x),[[e.vModelCheckbox,e.unref(C)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(E),{id:e.unref(m),class:"vv-checkbox__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"3"}:void 0]),1032,["id"])],10,V))}})}));
@@ -1,9 +1,9 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  indeterminate: BooleanConstructor;
3
3
  uncheckedValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
4
4
  switch: BooleanConstructor;
5
5
  modifiers: {
6
- type: globalThis.PropType<string | string[]>;
6
+ type: PropType<string | string[]>;
7
7
  default: undefined;
8
8
  };
9
9
  value: {
@@ -63,14 +63,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
63
63
  required: boolean;
64
64
  };
65
65
  id: (StringConstructor | NumberConstructor)[];
66
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
67
- [x: string]: (...args: any[]) => void;
68
- }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
66
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
69
67
  indeterminate: BooleanConstructor;
70
68
  uncheckedValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
71
69
  switch: BooleanConstructor;
72
70
  modifiers: {
73
- type: globalThis.PropType<string | string[]>;
71
+ type: PropType<string | string[]>;
74
72
  default: undefined;
75
73
  };
76
74
  value: {
@@ -130,26 +128,26 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
130
128
  required: boolean;
131
129
  };
132
130
  id: (StringConstructor | NumberConstructor)[];
133
- }>>, {
131
+ }>> & Readonly<{}>, {
134
132
  label: string | number;
135
133
  value: string | number | boolean;
136
134
  disabled: boolean;
137
135
  modelValue: string | number | boolean | Record<string, any>;
138
136
  modifiers: string | string[];
139
- readonly: boolean;
140
137
  switch: boolean;
141
138
  loading: boolean;
142
139
  loadingLabel: string;
140
+ indeterminate: boolean;
141
+ readonly: boolean;
143
142
  hintLabel: string;
144
- valid: boolean;
145
- validLabel: string | unknown[];
146
143
  invalid: boolean;
147
144
  invalidLabel: string | unknown[];
148
- indeterminate: boolean;
145
+ valid: boolean;
146
+ validLabel: string | unknown[];
149
147
  tabindex: string | number;
150
- }, {}>, {
148
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLLabelElement>, {
151
149
  default?(_: {
152
- value: unknown;
150
+ value: string | number | boolean | Record<string, any>;
153
151
  }): any;
154
152
  hint?(_: {
155
153
  modelValue: unknown;
@@ -14,7 +14,7 @@ export declare const VvCheckboxProps: {
14
14
  */
15
15
  switch: BooleanConstructor;
16
16
  modifiers: {
17
- type: globalThis.PropType<string | string[]>;
17
+ type: PropType<string | string[]>;
18
18
  default: undefined;
19
19
  };
20
20
  value: {
@@ -81,14 +81,14 @@ export type VvCheckboxPropsTypes = ExtractPropTypes<typeof VvCheckboxProps>;
81
81
  * Merges local and group props
82
82
  */
83
83
  export declare function useGroupProps(props: VvCheckboxPropsTypes, emit: (event: (typeof VvCheckboxEvents)[number], value: unknown) => void): {
84
- id: Ref<string | number | undefined> | undefined;
85
- propsSwitch: Ref<boolean>;
86
- indeterminate: Ref<boolean>;
84
+ id: Ref<string | number | undefined, string | number | undefined> | undefined;
85
+ propsSwitch: Ref<boolean, boolean>;
86
+ indeterminate: Ref<boolean, boolean>;
87
87
  group: InputGroupState | undefined;
88
88
  isInGroup: globalThis.ComputedRef<boolean>;
89
- modelValue: Ref<unknown>;
90
- valid: Ref<boolean>;
91
- invalid: Ref<boolean>;
89
+ modelValue: Ref<unknown, unknown>;
90
+ valid: Ref<boolean, boolean>;
91
+ invalid: Ref<boolean, boolean>;
92
92
  readonly: globalThis.ComputedRef<boolean>;
93
93
  disabled: globalThis.ComputedRef<boolean>;
94
94
  };