@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.30

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 (472) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +106 -10
  3. package/auto-imports.d.ts +7 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +22 -15
  6. package/dist/.storybook/main.d.ts +3 -0
  7. package/dist/.storybook/preview.d.ts +89 -0
  8. package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
  9. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  12. package/dist/components/VvAction/VvAction.es.js +78 -27
  13. package/dist/components/VvAction/VvAction.umd.js +1 -1
  14. package/dist/components/VvAlert/VvAlert.es.js +204 -171
  15. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  16. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
  17. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  18. package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
  19. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  20. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +118 -48
  21. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  22. package/dist/components/VvBadge/VvBadge.es.js +78 -28
  23. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  24. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +276 -60
  25. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  26. package/dist/components/VvButton/VvButton.es.js +291 -252
  27. package/dist/components/VvButton/VvButton.umd.js +1 -1
  28. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
  29. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  30. package/dist/components/VvCard/VvCard.es.js +86 -36
  31. package/dist/components/VvCard/VvCard.umd.js +1 -1
  32. package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -120
  33. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  34. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
  35. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  36. package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
  37. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  38. package/dist/components/VvDialog/VvDialog.es.js +140 -153
  39. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  40. package/dist/components/VvDropdown/VvDropdown.es.js +138 -71
  41. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  42. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
  43. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  44. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
  45. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  46. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
  47. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
  49. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  50. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  51. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  52. package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
  53. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  54. package/dist/components/VvInputText/VvInputText.es.js +1237 -324
  55. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  56. package/dist/components/VvNav/VvNav.es.js +135 -56
  57. package/dist/components/VvNav/VvNav.umd.js +1 -1
  58. package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
  59. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  60. package/dist/components/VvProgress/VvProgress.es.js +72 -26
  61. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  62. package/dist/components/VvRadio/VvRadio.es.js +160 -103
  63. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  64. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
  65. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  66. package/dist/components/VvSelect/VvSelect.es.js +251 -238
  67. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  68. package/dist/components/VvTab/VvTab.es.js +191 -75
  69. package/dist/components/VvTab/VvTab.umd.js +1 -1
  70. package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
  71. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  72. package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
  73. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  74. package/dist/components/index.es.js +3534 -1650
  75. package/dist/components/index.umd.js +1 -1
  76. package/dist/composables/index.es.js +92 -3
  77. package/dist/composables/index.umd.js +1 -1
  78. package/dist/directives/index.es.js +99 -43
  79. package/dist/directives/index.umd.js +1 -1
  80. package/dist/directives/v-tooltip.es.js +97 -38
  81. package/dist/directives/v-tooltip.umd.js +1 -1
  82. package/dist/icons.es.js +267 -267
  83. package/dist/icons.umd.js +1 -1
  84. package/dist/index.es.js +90 -16
  85. package/dist/index.umd.js +1 -1
  86. package/dist/resolvers/unplugin.es.js +87 -10
  87. package/dist/resolvers/unplugin.umd.js +1 -1
  88. package/dist/src/components/VvAccordion/VvAccordion.vue.d.ts +194 -0
  89. package/dist/{components → src/components}/VvAccordion/index.d.ts +8 -9
  90. package/dist/src/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +92 -0
  91. package/dist/{components → src/components}/VvAccordionGroup/index.d.ts +14 -6
  92. package/dist/{components → src/components}/VvAction/VvAction.vue.d.ts +57 -22
  93. package/dist/{components → src/components}/VvAction/index.d.ts +25 -9
  94. package/dist/{components → src/components}/VvAlert/VvAlert.vue.d.ts +24 -14
  95. package/dist/{components → src/components}/VvAlert/index.d.ts +17 -9
  96. package/dist/{components → src/components}/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
  97. package/dist/{components → src/components}/VvAlertGroup/index.d.ts +6 -14
  98. package/dist/src/components/VvAvatar/VvAvatar.vue.d.ts +23 -0
  99. package/dist/{components → src/components}/VvAvatar/index.d.ts +4 -1
  100. package/dist/{components → src/components}/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
  101. package/dist/{components → src/components}/VvAvatarGroup/index.d.ts +4 -1
  102. package/dist/{components → src/components}/VvBadge/VvBadge.vue.d.ts +12 -4
  103. package/dist/src/components/VvBadge/index.d.ts +7 -0
  104. package/dist/src/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +38 -0
  105. package/dist/src/components/VvBreadcrumb/index.d.ts +8 -0
  106. package/dist/{components → src/components}/VvButton/VvButton.vue.d.ts +94 -40
  107. package/dist/{components → src/components}/VvButton/index.d.ts +51 -29
  108. package/dist/{components → src/components}/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
  109. package/dist/{components → src/components}/VvButtonGroup/index.d.ts +8 -2
  110. package/dist/{components → src/components}/VvCard/VvCard.vue.d.ts +12 -4
  111. package/dist/src/components/VvCard/index.d.ts +7 -0
  112. package/dist/src/components/VvCheckbox/VvCheckbox.vue.d.ts +184 -0
  113. package/dist/{components → src/components}/VvCheckbox/index.d.ts +47 -14
  114. package/dist/{components → src/components}/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
  115. package/dist/src/components/VvCheckboxGroup/index.d.ts +75 -0
  116. package/dist/{components → src/components}/VvCombobox/VvCombobox.vue.d.ts +171 -104
  117. package/dist/{components → src/components}/VvCombobox/index.d.ts +62 -26
  118. package/dist/{components → src/components}/VvDialog/VvDialog.vue.d.ts +4 -4
  119. package/dist/{components → src/components}/VvDropdown/VvDropdown.vue.d.ts +101 -75
  120. package/dist/src/components/VvDropdown/VvDropdownAction.vue.d.ts +114 -0
  121. package/dist/src/components/VvDropdown/VvDropdownItem.vue.d.ts +21 -0
  122. package/dist/src/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +14 -0
  123. package/dist/{components → src/components}/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
  124. package/dist/{components → src/components}/VvDropdown/index.d.ts +52 -10
  125. package/dist/src/components/VvIcon/VvIcon.vue.d.ts +26 -0
  126. package/dist/{components → src/components}/VvIcon/index.d.ts +33 -48
  127. package/dist/src/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
  128. package/dist/src/components/VvInputFile/index.d.ts +200 -0
  129. package/dist/{components → src/components}/VvInputText/VvInputClearAction.d.ts +7 -5
  130. package/dist/{components → src/components}/VvInputText/VvInputPasswordAction.d.ts +10 -8
  131. package/dist/{components → src/components}/VvInputText/VvInputStepAction.d.ts +2 -2
  132. package/dist/{components → src/components}/VvInputText/VvInputText.vue.d.ts +207 -57
  133. package/dist/{components → src/components}/VvInputText/index.d.ts +99 -29
  134. package/dist/src/components/VvNav/VvNav.vue.d.ts +48 -0
  135. package/dist/{components → src/components}/VvNav/VvNavItem.vue.d.ts +1 -1
  136. package/dist/src/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
  137. package/dist/src/components/VvNav/index.d.ts +11 -0
  138. package/dist/{components → src/components}/VvProgress/VvProgress.vue.d.ts +10 -3
  139. package/dist/{components → src/components}/VvProgress/index.d.ts +4 -1
  140. package/dist/src/components/VvRadio/VvRadio.vue.d.ts +176 -0
  141. package/dist/src/components/VvRadio/index.d.ts +80 -0
  142. package/dist/{components → src/components}/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
  143. package/dist/src/components/VvRadioGroup/index.d.ts +75 -0
  144. package/dist/{components → src/components}/VvSelect/VvSelect.vue.d.ts +117 -44
  145. package/dist/{components → src/components}/VvSelect/index.d.ts +48 -14
  146. package/dist/src/components/VvTab/VvTab.vue.d.ts +63 -0
  147. package/dist/{components → src/components}/VvTab/index.d.ts +4 -1
  148. package/dist/{components → src/components}/VvTextarea/VvTextarea.vue.d.ts +156 -49
  149. package/dist/{components → src/components}/VvTextarea/index.d.ts +68 -19
  150. package/dist/src/components/VvTooltip/VvTooltip.vue.d.ts +36 -0
  151. package/dist/{components → src/components}/VvTooltip/index.d.ts +5 -2
  152. package/dist/{components → src/components}/common/HintSlot.d.ts +1 -1
  153. package/dist/{components → src/components}/index.d.ts +10 -0
  154. package/dist/src/composables/alert/useAlert.d.ts +122 -0
  155. package/dist/src/composables/alert/useInjectAlert.d.ts +4 -0
  156. package/dist/src/composables/dropdown/useInjectDropdown.d.ts +12 -0
  157. package/dist/{composables → src/composables}/dropdown/useProvideDropdown.d.ts +3 -4
  158. package/dist/src/composables/group/useInjectedGroupState.d.ts +9 -0
  159. package/dist/src/composables/group/useProvideGroupState.d.ts +6 -0
  160. package/dist/{composables → src/composables}/index.d.ts +1 -0
  161. package/dist/src/composables/useBlurhash.d.ts +7 -0
  162. package/dist/src/composables/useComponentIcon.d.ts +11 -0
  163. package/dist/src/composables/usePersistence.d.ts +2 -0
  164. package/dist/src/composables/useVolver.d.ts +1 -0
  165. package/dist/{constants.d.ts → src/constants.d.ts} +34 -32
  166. package/dist/src/directives/index.d.ts +3 -0
  167. package/dist/{index.d.ts → src/index.d.ts} +3 -1
  168. package/dist/{props → src/props}/index.d.ts +272 -81
  169. package/dist/{resolvers → src/resolvers}/unplugin.d.ts +6 -1
  170. package/dist/src/stories/AccordionGroup/AccordionGroup.stories.d.ts +188 -0
  171. package/dist/src/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1262 -0
  172. package/dist/{stories → src/stories}/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  173. package/dist/src/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  174. package/dist/{stories → src/stories}/Button/Button.settings.d.ts +0 -1
  175. package/dist/{stories → src/stories}/Combobox/Combobox.settings.d.ts +8 -0
  176. package/dist/{stories → src/stories}/Icon/Icon.settings.d.ts +1 -0
  177. package/dist/src/stories/InputFile/InputFile.settings.d.ts +56 -0
  178. package/dist/src/stories/InputFile/InputFile.stories.d.ts +12 -0
  179. package/dist/src/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  180. package/dist/src/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  181. package/dist/src/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  182. package/dist/src/stories/Tab/Tab.settings.d.ts +4 -0
  183. package/dist/{test → src/test}/expect.d.ts +1 -1
  184. package/dist/src/types/alert.d.ts +15 -0
  185. package/dist/src/types/blurhash.d.ts +12 -0
  186. package/dist/{types → src/types}/generic.d.ts +1 -2
  187. package/dist/src/types/group.d.ts +59 -0
  188. package/dist/src/types/index.d.ts +7 -0
  189. package/dist/src/types/input-file.d.ts +16 -0
  190. package/dist/{types → src/types}/nav.d.ts +2 -2
  191. package/dist/{utils → src/utils}/ObjectUtilities.d.ts +0 -1
  192. package/dist/src/workers/blurhash.d.ts +1 -0
  193. package/package.json +78 -78
  194. package/src/Volver.ts +31 -20
  195. package/src/assets/icons/detailed.json +1 -1
  196. package/src/assets/icons/normal.json +1 -1
  197. package/src/assets/icons/simple.json +1 -1
  198. package/src/components/VvAccordion/VvAccordion.vue +121 -58
  199. package/src/components/VvAccordion/index.ts +8 -23
  200. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
  201. package/src/components/VvAccordionGroup/index.ts +6 -6
  202. package/src/components/VvAction/VvAction.vue +17 -5
  203. package/src/components/VvAlert/index.ts +14 -9
  204. package/src/components/VvAlertGroup/index.ts +3 -15
  205. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  206. package/src/components/VvBreadcrumb/index.ts +2 -8
  207. package/src/components/VvButton/VvButton.vue +17 -7
  208. package/src/components/VvButton/index.ts +9 -16
  209. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
  210. package/src/components/VvCheckbox/index.ts +2 -2
  211. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
  212. package/src/components/VvCombobox/VvCombobox.vue +15 -12
  213. package/src/components/VvCombobox/index.ts +4 -0
  214. package/src/components/VvDropdown/VvDropdown.vue +11 -2
  215. package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
  216. package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
  217. package/src/components/VvDropdown/index.ts +35 -1
  218. package/src/components/VvIcon/VvIcon.vue +2 -2
  219. package/src/components/VvIcon/index.ts +35 -48
  220. package/src/components/VvInputFile/VvInputFile.vue +395 -0
  221. package/src/components/VvInputFile/index.ts +135 -0
  222. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  223. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  224. package/src/components/VvInputText/VvInputText.vue +141 -33
  225. package/src/components/VvInputText/index.ts +31 -16
  226. package/src/components/VvNav/VvNav.vue +4 -2
  227. package/src/components/VvRadio/index.ts +5 -5
  228. package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
  229. package/src/components/VvSelect/VvSelect.vue +5 -8
  230. package/src/components/VvTab/VvTab.vue +5 -1
  231. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  232. package/src/components/index.ts +10 -0
  233. package/src/composables/alert/useAlert.ts +12 -9
  234. package/src/composables/dropdown/useProvideDropdown.ts +4 -4
  235. package/src/composables/group/useInjectedGroupState.ts +20 -16
  236. package/src/composables/group/useProvideGroupState.ts +10 -15
  237. package/src/composables/index.ts +1 -0
  238. package/src/composables/useBlurhash.ts +76 -0
  239. package/src/composables/useComponentIcon.ts +15 -14
  240. package/src/composables/usePersistence.ts +76 -0
  241. package/src/composables/useUniqueId.ts +2 -2
  242. package/src/constants.ts +47 -32
  243. package/src/directives/index.ts +3 -6
  244. package/src/directives/v-tooltip.ts +19 -10
  245. package/src/index.ts +3 -1
  246. package/src/props/index.ts +108 -31
  247. package/src/resolvers/unplugin.ts +24 -14
  248. package/src/stories/Accordion/Accordion.test.ts +1 -1
  249. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
  250. package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
  251. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
  252. package/src/stories/Alert/Alert.test.ts +1 -1
  253. package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
  254. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  255. package/src/stories/Avatar/Avatar.test.ts +1 -1
  256. package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
  257. package/src/stories/Badge/Badge.test.ts +1 -1
  258. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  259. package/src/stories/Button/Button.settings.ts +1 -4
  260. package/src/stories/Button/Button.test.ts +1 -1
  261. package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
  262. package/src/stories/Card/Card.test.ts +1 -1
  263. package/src/stories/Checkbox/Checkbox.test.ts +1 -1
  264. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
  265. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  266. package/src/stories/Combobox/Combobox.test.ts +1 -1
  267. package/src/stories/Dialog/Dialog.test.ts +2 -2
  268. package/src/stories/Dropdown/Dropdown.test.ts +1 -1
  269. package/src/stories/Icon/Icon.settings.ts +3 -3
  270. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  271. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  272. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  273. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  274. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  275. package/src/stories/InputText/InputText.test.ts +1 -1
  276. package/src/stories/Nav/Nav.test.ts +1 -1
  277. package/src/stories/Progress/Progress.test.ts +1 -1
  278. package/src/stories/Radio/Radio.test.ts +1 -1
  279. package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
  280. package/src/stories/Select/Select.test.ts +1 -1
  281. package/src/stories/Tab/Tab.settings.ts +2 -2
  282. package/src/stories/Tab/Tab.test.ts +1 -1
  283. package/src/stories/Textarea/Textarea.test.ts +1 -1
  284. package/src/stories/Tooltip/Tooltip.test.ts +1 -1
  285. package/src/stories/argTypes.ts +1 -1
  286. package/src/test/expect.ts +2 -4
  287. package/src/types/alert.ts +11 -7
  288. package/src/types/blurhash.ts +21 -0
  289. package/src/types/generic.ts +3 -3
  290. package/src/types/group.ts +22 -14
  291. package/src/types/index.ts +7 -0
  292. package/src/types/input-file.ts +18 -0
  293. package/src/types/nav.ts +2 -3
  294. package/src/utils/ObjectUtilities.ts +0 -11
  295. package/src/workers/blurhash.ts +9 -0
  296. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +0 -42
  297. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +0 -47
  298. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +0 -15
  299. package/dist/components/VvBadge/index.d.ts +0 -4
  300. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +0 -18
  301. package/dist/components/VvBreadcrumb/index.d.ts +0 -12
  302. package/dist/components/VvCard/index.d.ts +0 -4
  303. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +0 -112
  304. package/dist/components/VvCheckboxGroup/index.d.ts +0 -42
  305. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +0 -73
  306. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +0 -9
  307. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +0 -6
  308. package/dist/components/VvIcon/VvIcon.vue.d.ts +0 -69
  309. package/dist/components/VvNav/VvNav.vue.d.ts +0 -25
  310. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +0 -2
  311. package/dist/components/VvNav/index.d.ts +0 -8
  312. package/dist/components/VvRadio/VvRadio.vue.d.ts +0 -104
  313. package/dist/components/VvRadio/index.d.ts +0 -47
  314. package/dist/components/VvRadioGroup/index.d.ts +0 -42
  315. package/dist/components/VvTab/VvTab.vue.d.ts +0 -39
  316. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +0 -29
  317. package/dist/composables/alert/useAlert.d.ts +0 -27
  318. package/dist/composables/alert/useInjectAlert.d.ts +0 -9
  319. package/dist/composables/dropdown/useInjectDropdown.d.ts +0 -32
  320. package/dist/composables/group/useInjectedGroupState.d.ts +0 -10
  321. package/dist/composables/group/useProvideGroupState.d.ts +0 -6
  322. package/dist/composables/useComponentIcon.d.ts +0 -10
  323. package/dist/composables/useVolver.d.ts +0 -1
  324. package/dist/directives/index.d.ts +0 -5
  325. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +0 -134
  326. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +0 -679
  327. package/dist/stories/Tab/Tab.settings.d.ts +0 -17
  328. package/dist/types/alert.d.ts +0 -13
  329. package/dist/types/group.d.ts +0 -37
  330. package/dist/{Volver.d.ts → src/Volver.d.ts} +1 -1
  331. /package/dist/{components → src/components}/VvDialog/index.d.ts +0 -0
  332. /package/dist/{components → src/components}/VvInputText/VvInputTextActions.d.ts +0 -0
  333. /package/dist/{composables → src/composables}/alert/useProvideAlert.d.ts +0 -0
  334. /package/dist/{composables → src/composables}/useComponentFocus.d.ts +0 -0
  335. /package/dist/{composables → src/composables}/useDebouncedInput.d.ts +0 -0
  336. /package/dist/{composables → src/composables}/useDefaults.d.ts +0 -0
  337. /package/dist/{composables → src/composables}/useModifiers.d.ts +0 -0
  338. /package/dist/{composables → src/composables}/useOptions.d.ts +0 -0
  339. /package/dist/{composables → src/composables}/useTextCount.d.ts +0 -0
  340. /package/dist/{composables → src/composables}/useUniqueId.d.ts +0 -0
  341. /package/dist/{directives → src/directives}/v-contextmenu.d.ts +0 -0
  342. /package/dist/{directives → src/directives}/v-tooltip.d.ts +0 -0
  343. /package/dist/{icons.d.ts → src/icons.d.ts} +0 -0
  344. /package/dist/{stories → src/stories}/Accordion/Accordion.settings.d.ts +0 -0
  345. /package/dist/{stories → src/stories}/Accordion/Accordion.stories.d.ts +0 -0
  346. /package/dist/{stories → src/stories}/Accordion/Accordion.test.d.ts +0 -0
  347. /package/dist/{stories → src/stories}/Accordion/AccordionSlots.stories.d.ts +0 -0
  348. /package/dist/{stories → src/stories}/AccordionGroup/AccordionGroup.settings.d.ts +0 -0
  349. /package/dist/{stories → src/stories}/AccordionGroup/AccordionGroup.test.d.ts +0 -0
  350. /package/dist/{stories → src/stories}/Alert/Alert.settings.d.ts +0 -0
  351. /package/dist/{stories → src/stories}/Alert/Alert.stories.d.ts +0 -0
  352. /package/dist/{stories → src/stories}/Alert/Alert.test.d.ts +0 -0
  353. /package/dist/{stories → src/stories}/Alert/AlertModifiers.stories.d.ts +0 -0
  354. /package/dist/{stories → src/stories}/Alert/AlertSlots.stories.d.ts +0 -0
  355. /package/dist/{stories → src/stories}/AlertGroup/AlertGroup.settings.d.ts +0 -0
  356. /package/dist/{stories → src/stories}/AlertGroup/AlertGroup.stories.d.ts +0 -0
  357. /package/dist/{stories → src/stories}/AlertGroup/AlertGroup.test.d.ts +0 -0
  358. /package/dist/{stories → src/stories}/AlertGroup/AlertGroupPosition.stories.d.ts +0 -0
  359. /package/dist/{stories → src/stories}/AlertGroup/AlertGroupSlots.stories.d.ts +0 -0
  360. /package/dist/{stories → src/stories}/Avatar/Avatar.settings.d.ts +0 -0
  361. /package/dist/{stories → src/stories}/Avatar/Avatar.stories.d.ts +0 -0
  362. /package/dist/{stories → src/stories}/Avatar/Avatar.test.d.ts +0 -0
  363. /package/dist/{stories → src/stories}/Avatar/AvatarBadge.stories.d.ts +0 -0
  364. /package/dist/{stories → src/stories}/Avatar/AvatarModifiers.stories.d.ts +0 -0
  365. /package/dist/{stories → src/stories}/Avatar/AvatarSlots.stories.d.ts +0 -0
  366. /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroup.settings.d.ts +0 -0
  367. /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroup.stories.d.ts +0 -0
  368. /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroup.test.d.ts +0 -0
  369. /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroupModifiers.stories.d.ts +0 -0
  370. /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +0 -0
  371. /package/dist/{stories → src/stories}/Badge/Badge.settings.d.ts +0 -0
  372. /package/dist/{stories → src/stories}/Badge/Badge.stories.d.ts +0 -0
  373. /package/dist/{stories → src/stories}/Badge/Badge.test.d.ts +0 -0
  374. /package/dist/{stories → src/stories}/Badge/BadgeSlots.stories.d.ts +0 -0
  375. /package/dist/{stories → src/stories}/Breadcrumb/Breadcrumb.settings.d.ts +0 -0
  376. /package/dist/{stories → src/stories}/Breadcrumb/Breadcrumb.stories.d.ts +0 -0
  377. /package/dist/{stories → src/stories}/Breadcrumb/Breadcrumb.test.d.ts +0 -0
  378. /package/dist/{stories → src/stories}/Breadcrumb/BreadcrumbSlots.stories.d.ts +0 -0
  379. /package/dist/{stories → src/stories}/Button/Button.stories.d.ts +0 -0
  380. /package/dist/{stories → src/stories}/Button/Button.test.d.ts +0 -0
  381. /package/dist/{stories → src/stories}/Button/ButtonIcon.stories.d.ts +0 -0
  382. /package/dist/{stories → src/stories}/Button/ButtonLink.stories.d.ts +0 -0
  383. /package/dist/{stories → src/stories}/Button/ButtonLoading.stories.d.ts +0 -0
  384. /package/dist/{stories → src/stories}/Button/ButtonModifiers.stories.d.ts +0 -0
  385. /package/dist/{stories → src/stories}/Button/ButtonSlots.stories.d.ts +0 -0
  386. /package/dist/{stories → src/stories}/Button/ButtonState.stories.d.ts +0 -0
  387. /package/dist/{stories → src/stories}/Button/ButtonToggle.stories.d.ts +0 -0
  388. /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroup.settings.d.ts +0 -0
  389. /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroup.stories.d.ts +0 -0
  390. /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroup.test.d.ts +0 -0
  391. /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroupModifiers.stories.d.ts +0 -0
  392. /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroupSlots.stories.d.ts +0 -0
  393. /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroupToggle.stories.d.ts +0 -0
  394. /package/dist/{stories → src/stories}/Card/Card.settings.d.ts +0 -0
  395. /package/dist/{stories → src/stories}/Card/Card.stories.d.ts +0 -0
  396. /package/dist/{stories → src/stories}/Card/Card.test.d.ts +0 -0
  397. /package/dist/{stories → src/stories}/Card/CardSlots.stories.d.ts +0 -0
  398. /package/dist/{stories → src/stories}/Checkbox/Checkbox.settings.d.ts +0 -0
  399. /package/dist/{stories → src/stories}/Checkbox/Checkbox.stories.d.ts +0 -0
  400. /package/dist/{stories → src/stories}/Checkbox/Checkbox.test.d.ts +0 -0
  401. /package/dist/{stories → src/stories}/Checkbox/CheckboxBinary.stories.d.ts +0 -0
  402. /package/dist/{stories → src/stories}/Checkbox/CheckboxSlots.stories.d.ts +0 -0
  403. /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroup.settings.d.ts +0 -0
  404. /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroup.stories.d.ts +0 -0
  405. /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroup.test.d.ts +0 -0
  406. /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +0 -0
  407. /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +0 -0
  408. /package/dist/{stories → src/stories}/Combobox/Combobox.stories.d.ts +0 -0
  409. /package/dist/{stories → src/stories}/Combobox/Combobox.test.d.ts +0 -0
  410. /package/dist/{stories → src/stories}/Combobox/ComboboxIconPosition.stories.d.ts +0 -0
  411. /package/dist/{stories → src/stories}/Combobox/ComboboxMultiple.stories.d.ts +0 -0
  412. /package/dist/{stories → src/stories}/Combobox/ComboboxOptions.stories.d.ts +0 -0
  413. /package/dist/{stories → src/stories}/Combobox/ComboboxSlots.stories.d.ts +0 -0
  414. /package/dist/{stories → src/stories}/Dialog/Dialog.settings.d.ts +0 -0
  415. /package/dist/{stories → src/stories}/Dialog/Dialog.stories.d.ts +0 -0
  416. /package/dist/{stories → src/stories}/Dialog/Dialog.test.d.ts +0 -0
  417. /package/dist/{stories → src/stories}/Dialog/DialogSlots.stories.d.ts +0 -0
  418. /package/dist/{stories → src/stories}/Dropdown/Dropdown.settings.d.ts +0 -0
  419. /package/dist/{stories → src/stories}/Dropdown/Dropdown.stories.d.ts +0 -0
  420. /package/dist/{stories → src/stories}/Dropdown/Dropdown.test.d.ts +0 -0
  421. /package/dist/{stories → src/stories}/Dropdown/DropdownContextmenuDirective.stories.d.ts +0 -0
  422. /package/dist/{stories → src/stories}/Dropdown/DropdownMultilevel.stories.d.ts +0 -0
  423. /package/dist/{stories → src/stories}/Dropdown/DropdownSlots.stories.d.ts +0 -0
  424. /package/dist/{stories → src/stories}/Icon/Icon.stories.d.ts +0 -0
  425. /package/dist/{stories → src/stories}/Icon/IconsCollection.stories.d.ts +0 -0
  426. /package/dist/{stories → src/stories}/InputText/InputText.settings.d.ts +0 -0
  427. /package/dist/{stories → src/stories}/InputText/InputText.stories.d.ts +0 -0
  428. /package/dist/{stories → src/stories}/InputText/InputText.test.d.ts +0 -0
  429. /package/dist/{stories → src/stories}/InputText/InputTextIconPosition.stories.d.ts +0 -0
  430. /package/dist/{stories → src/stories}/InputText/InputTextLength.stories.d.ts +0 -0
  431. /package/dist/{stories → src/stories}/InputText/InputTextMask.stories.d.ts +0 -0
  432. /package/dist/{stories → src/stories}/InputText/InputTextMinMax.stories.d.ts +0 -0
  433. /package/dist/{stories → src/stories}/InputText/InputTextSlots.stories.d.ts +0 -0
  434. /package/dist/{stories → src/stories}/InputText/InputTextType.stories.d.ts +0 -0
  435. /package/dist/{stories → src/stories}/Nav/Nav.settings.d.ts +0 -0
  436. /package/dist/{stories → src/stories}/Nav/Nav.stories.d.ts +0 -0
  437. /package/dist/{stories → src/stories}/Nav/Nav.test.d.ts +0 -0
  438. /package/dist/{stories → src/stories}/Nav/NavModifiers.stories.d.ts +0 -0
  439. /package/dist/{stories → src/stories}/Progress/Progress.settings.d.ts +0 -0
  440. /package/dist/{stories → src/stories}/Progress/Progress.stories.d.ts +0 -0
  441. /package/dist/{stories → src/stories}/Progress/Progress.test.d.ts +0 -0
  442. /package/dist/{stories → src/stories}/Radio/Radio.settings.d.ts +0 -0
  443. /package/dist/{stories → src/stories}/Radio/Radio.stories.d.ts +0 -0
  444. /package/dist/{stories → src/stories}/Radio/Radio.test.d.ts +0 -0
  445. /package/dist/{stories → src/stories}/Radio/RadioSlots.stories.d.ts +0 -0
  446. /package/dist/{stories → src/stories}/RadioGroup/RadioGroup.settings.d.ts +0 -0
  447. /package/dist/{stories → src/stories}/RadioGroup/RadioGroup.stories.d.ts +0 -0
  448. /package/dist/{stories → src/stories}/RadioGroup/RadioGroup.test.d.ts +0 -0
  449. /package/dist/{stories → src/stories}/RadioGroup/RadioGroupOptions.stories.d.ts +0 -0
  450. /package/dist/{stories → src/stories}/RadioGroup/RadioGroupSlots.stories.d.ts +0 -0
  451. /package/dist/{stories → src/stories}/Select/Select.settings.d.ts +0 -0
  452. /package/dist/{stories → src/stories}/Select/Select.stories.d.ts +0 -0
  453. /package/dist/{stories → src/stories}/Select/Select.test.d.ts +0 -0
  454. /package/dist/{stories → src/stories}/Select/SelectIconPosition.stories.d.ts +0 -0
  455. /package/dist/{stories → src/stories}/Select/SelectOptions.stories.d.ts +0 -0
  456. /package/dist/{stories → src/stories}/Select/SelectSlots.stories.d.ts +0 -0
  457. /package/dist/{stories → src/stories}/Tab/Tab.stories.d.ts +0 -0
  458. /package/dist/{stories → src/stories}/Tab/Tab.test.d.ts +0 -0
  459. /package/dist/{stories → src/stories}/Textarea/Textarea.settings.d.ts +0 -0
  460. /package/dist/{stories → src/stories}/Textarea/Textarea.stories.d.ts +0 -0
  461. /package/dist/{stories → src/stories}/Textarea/Textarea.test.d.ts +0 -0
  462. /package/dist/{stories → src/stories}/Textarea/TextareaLength.stories.d.ts +0 -0
  463. /package/dist/{stories → src/stories}/Textarea/TextareaSlots.stories.d.ts +0 -0
  464. /package/dist/{stories → src/stories}/Textarea/TextareatIconPosition.stories.d.ts +0 -0
  465. /package/dist/{stories → src/stories}/Tooltip/Tooltip.settings.d.ts +0 -0
  466. /package/dist/{stories → src/stories}/Tooltip/Tooltip.stories.d.ts +0 -0
  467. /package/dist/{stories → src/stories}/Tooltip/Tooltip.test.d.ts +0 -0
  468. /package/dist/{stories → src/stories}/Tooltip/TooltipDirective.stories.d.ts +0 -0
  469. /package/dist/{stories → src/stories}/argTypes.d.ts +0 -0
  470. /package/dist/{test → src/test}/options.d.ts +0 -0
  471. /package/dist/{test → src/test}/sleep.d.ts +0 -0
  472. /package/dist/{types → src/types}/floating-ui.d.ts +0 -0
@@ -1,7 +1,12 @@
1
- import { unref, computed, isRef, defineComponent, h, inject, toRef, toRefs, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps, provide, createCommentVNode, Fragment, renderList, createBlock, mergeProps } from "vue";
2
- import { nanoid } from "nanoid";
1
+ import { computed, isRef, defineComponent, h, inject, toRef, toRefs, unref, useSlots, ref, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps, provide, createCommentVNode, Fragment, renderList, createBlock, mergeProps } from "vue";
2
+ import { uid } from "uid";
3
3
  import { useVModel } from "@vueuse/core";
4
4
  import { get } from "ts-dot-prop";
5
+ var StorageType = /* @__PURE__ */ ((StorageType2) => {
6
+ StorageType2["local"] = "local";
7
+ StorageType2["session"] = "session";
8
+ return StorageType2;
9
+ })(StorageType || {});
5
10
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
6
11
  Strategy2["absolute"] = "absolute";
7
12
  Strategy2["fixed"] = "fixed";
@@ -36,15 +41,17 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
36
41
  ButtonType2["reset"] = "reset";
37
42
  return ButtonType2;
38
43
  })(ButtonType || {});
39
- var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
40
- AnchorTarget2["_blank"] = "_blank";
41
- AnchorTarget2["_self"] = "_self";
42
- AnchorTarget2["_parent"] = "_parent";
43
- AnchorTarget2["_top"] = "_top";
44
- return AnchorTarget2;
45
- })(AnchorTarget || {});
44
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
45
+ ActionTag2["nuxtLink"] = "nuxt-link";
46
+ ActionTag2["routerLink"] = "router-link";
47
+ ActionTag2["a"] = "a";
48
+ ActionTag2["button"] = "button";
49
+ return ActionTag2;
50
+ })(ActionTag || {});
46
51
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
47
- const INJECTION_KEY_RADIO_GROUP = Symbol.for("radioGroup");
52
+ const INJECTION_KEY_RADIO_GROUP = Symbol.for(
53
+ "radioGroup"
54
+ );
48
55
  function equals(obj1, obj2, field) {
49
56
  if (field) {
50
57
  return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
@@ -124,9 +131,6 @@ function contains(value, list) {
124
131
  }
125
132
  return false;
126
133
  }
127
- function isEmpty(value) {
128
- return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
129
- }
130
134
  function isString(value) {
131
135
  return typeof value === "string" || value instanceof String;
132
136
  }
@@ -263,10 +267,7 @@ const LinkProps = {
263
267
  /**
264
268
  * Anchor target
265
269
  */
266
- target: {
267
- type: String,
268
- validator: (value) => Object.values(AnchorTarget).includes(value)
269
- },
270
+ target: String,
270
271
  /**
271
272
  * Anchor rel
272
273
  */
@@ -279,27 +280,33 @@ const ValidProps = {
279
280
  /**
280
281
  * Valid status
281
282
  */
282
- valid: Boolean,
283
+ valid: { type: Boolean, default: false },
283
284
  /**
284
285
  * Valid label
285
286
  */
286
- validLabel: [String, Array]
287
+ validLabel: { type: [String, Array], default: void 0 }
287
288
  };
288
289
  const InvalidProps = {
289
290
  /**
290
291
  * Invalid status
291
292
  */
292
- invalid: Boolean,
293
+ invalid: {
294
+ type: Boolean,
295
+ default: false
296
+ },
293
297
  /**
294
298
  * Invalid label
295
299
  */
296
- invalidLabel: [String, Array]
300
+ invalidLabel: { type: [String, Array], default: void 0 }
297
301
  };
298
302
  const LoadingProps = {
299
303
  /**
300
304
  * Loading status
301
305
  */
302
- loading: Boolean,
306
+ loading: {
307
+ type: Boolean,
308
+ default: false
309
+ },
303
310
  /**
304
311
  * Loading label
305
312
  */
@@ -312,43 +319,64 @@ const DisabledProps = {
312
319
  /**
313
320
  * Whether the form control is disabled
314
321
  */
315
- disabled: Boolean
322
+ disabled: {
323
+ type: Boolean,
324
+ default: false
325
+ }
316
326
  };
317
327
  const ActiveProps = {
318
328
  /**
319
329
  * Whether the item is active
320
330
  */
321
- active: Boolean
331
+ active: {
332
+ type: Boolean,
333
+ default: false
334
+ }
322
335
  };
323
336
  const CurrentProps = {
324
337
  /**
325
338
  * Whether the item is current
326
339
  */
327
- current: Boolean
340
+ current: {
341
+ type: Boolean,
342
+ default: false
343
+ }
328
344
  };
329
345
  const PressedProps = {
330
346
  /**
331
347
  * Whether the item is pressed
332
348
  */
333
- pressed: Boolean
349
+ pressed: {
350
+ type: Boolean,
351
+ default: false
352
+ }
334
353
  };
335
354
  const LabelProps = {
336
355
  /**
337
356
  * The item label
338
357
  */
339
- label: [String, Number]
358
+ label: {
359
+ type: [String, Number],
360
+ default: void 0
361
+ }
340
362
  };
341
363
  const ReadonlyProps = {
342
364
  /**
343
365
  * The value is not editable
344
366
  */
345
- readonly: Boolean
367
+ readonly: {
368
+ type: Boolean,
369
+ default: false
370
+ }
346
371
  };
347
372
  const ModifiersProps = {
348
373
  /**
349
374
  * Component BEM modifiers
350
375
  */
351
- modifiers: [String, Array]
376
+ modifiers: {
377
+ type: [String, Array],
378
+ default: void 0
379
+ }
352
380
  };
353
381
  const HintProps = {
354
382
  hintLabel: { type: String, default: "" }
@@ -379,7 +407,10 @@ const OptionsProps = {
379
407
  * VvIcon name or props
380
408
  * @see VVIcon
381
409
  */
382
- icon: { type: [String, Object] },
410
+ icon: {
411
+ type: [String, Object],
412
+ default: void 0
413
+ },
383
414
  /**
384
415
  * VvIcon position
385
416
  */
@@ -424,7 +455,8 @@ const IdProps = {
424
455
  * Dropdown show / hide transition name
425
456
  */
426
457
  transitionName: {
427
- type: String
458
+ type: String,
459
+ default: void 0
428
460
  },
429
461
  /**
430
462
  * Offset of the dropdown from the trigger
@@ -492,7 +524,8 @@ const IdProps = {
492
524
  * Set dropdown width to the same as the trigger
493
525
  */
494
526
  triggerWidth: {
495
- type: Boolean
527
+ type: Boolean,
528
+ default: false
496
529
  }
497
530
  });
498
531
  const IdNameProps = {
@@ -519,11 +552,17 @@ const CheckboxRadioProps = {
519
552
  * Input value
520
553
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
521
554
  */
522
- value: [String, Number, Boolean],
555
+ value: {
556
+ type: [String, Number, Boolean],
557
+ default: void 0
558
+ },
523
559
  /**
524
560
  * Input value
525
561
  */
526
- modelValue: [Object, Number, Boolean, String]
562
+ modelValue: {
563
+ type: [Object, Number, Boolean, String],
564
+ default: void 0
565
+ }
527
566
  };
528
567
  const CheckboxRadioGroupProps = {
529
568
  ...ValidProps,
@@ -538,7 +577,10 @@ const CheckboxRadioGroupProps = {
538
577
  /**
539
578
  * Input value
540
579
  */
541
- modelValue: [String, Array, Boolean, Number, Symbol],
580
+ modelValue: {
581
+ type: [String, Array, Boolean, Number, Symbol],
582
+ default: void 0
583
+ },
542
584
  /**
543
585
  * Input name
544
586
  */
@@ -546,7 +588,10 @@ const CheckboxRadioGroupProps = {
546
588
  /**
547
589
  * If true, the group will be displayed in a vertical column
548
590
  */
549
- vertical: Boolean
591
+ vertical: {
592
+ type: Boolean,
593
+ default: false
594
+ }
550
595
  };
551
596
  ({
552
597
  ...DisabledProps,
@@ -569,17 +614,32 @@ const CheckboxRadioGroupProps = {
569
614
  ariaLabel: {
570
615
  type: String,
571
616
  default: void 0
617
+ },
618
+ /**
619
+ * Default tag for the action
620
+ */
621
+ defaultTag: {
622
+ type: String,
623
+ default: ActionTag.button
572
624
  }
573
625
  });
626
+ ({
627
+ storageType: {
628
+ type: String,
629
+ default: StorageType.local,
630
+ validator: (value) => Object.values(StorageType).includes(value)
631
+ },
632
+ storageKey: String
633
+ });
574
634
  function useInjectedGroupState(groupKey) {
575
635
  const group = inject(groupKey, void 0);
576
- const isInGroup = computed(() => !isEmpty(group));
636
+ const isInGroup = computed(() => group !== void 0);
577
637
  function getGroupOrLocalRef(propName, props, emit) {
578
- if (group == null ? void 0 : group.value) {
579
- const groupPropValue = unref(group.value)[propName];
638
+ const groupPropValue = group == null ? void 0 : group[propName];
639
+ if (groupPropValue) {
580
640
  return computed({
581
641
  get() {
582
- return groupPropValue == null ? void 0 : groupPropValue.value;
642
+ return groupPropValue.value;
583
643
  },
584
644
  set(value) {
585
645
  groupPropValue.value = value;
@@ -592,8 +652,9 @@ function useInjectedGroupState(groupKey) {
592
652
  return propRef.value;
593
653
  },
594
654
  set(value) {
595
- if (emit)
655
+ if (emit) {
596
656
  emit(`update:${propName}`, value);
657
+ }
597
658
  }
598
659
  });
599
660
  }
@@ -612,16 +673,10 @@ function useGroupProps(props, emit) {
612
673
  const valid = getGroupOrLocalRef("valid", props);
613
674
  const invalid = getGroupOrLocalRef("invalid", props);
614
675
  const readonly = computed(
615
- () => {
616
- var _a;
617
- return Boolean(props.readonly || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.readonly.value));
618
- }
676
+ () => Boolean(props.readonly || (group == null ? void 0 : group.readonly.value))
619
677
  );
620
678
  const disabled = computed(
621
- () => {
622
- var _a;
623
- return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
624
- }
679
+ () => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
625
680
  );
626
681
  return {
627
682
  // local props
@@ -692,7 +747,7 @@ function useDefaults(componentName, propsDefinition, props) {
692
747
  }, {});
693
748
  });
694
749
  }
695
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
750
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
696
751
  function useModifiers(prefix, modifiers, others) {
697
752
  return computed(() => {
698
753
  const toReturn = {
@@ -725,8 +780,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
725
780
  ...__default__$1,
726
781
  props: VvRadioProps,
727
782
  emits: VvRadioEvents,
728
- setup(__props, { emit }) {
783
+ setup(__props, { emit: __emit }) {
729
784
  const props = __props;
785
+ const emit = __emit;
730
786
  const slots = useSlots();
731
787
  const propsDefaults = useDefaults(
732
788
  "VvRadio",
@@ -807,12 +863,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
807
863
  [vModelRadio, unref(localModelValue)]
808
864
  ]),
809
865
  renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
810
- createTextVNode(toDisplayString(_ctx.label), 1)
866
+ createTextVNode(
867
+ toDisplayString(_ctx.label),
868
+ 1
869
+ /* TEXT */
870
+ )
811
871
  ]),
812
872
  createVNode(unref(HintSlot), {
813
873
  id: unref(hasHintId),
814
874
  class: "vv-radio__hint"
815
- }, createSlots({ _: 2 }, [
875
+ }, createSlots({
876
+ _: 2
877
+ /* DYNAMIC */
878
+ }, [
816
879
  _ctx.$slots.hint ? {
817
880
  name: "hint",
818
881
  fn: withCtx(() => [
@@ -848,15 +911,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
848
911
  });
849
912
  const VvRadioGroupProps = CheckboxRadioGroupProps;
850
913
  const VvRadioGroupEvents = ["update:modelValue", "change"];
851
- function useProvideGroupState(groupState) {
852
- if (Object.keys(groupState).some(
853
- (k) => k !== "key" && !isRef(groupState[k])
854
- ))
855
- throw Error("One or more groupState props aren't ref.");
856
- provide(
857
- groupState.key,
858
- computed(() => groupState)
859
- );
914
+ function useProvideGroupState(key, groupState) {
915
+ provide(key, groupState);
860
916
  }
861
917
  function useOptions(props) {
862
918
  const { options, labelKey, valueKey, disabledKey } = toRefs(props);
@@ -899,8 +955,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
899
955
  ...__default__,
900
956
  props: VvRadioGroupProps,
901
957
  emits: VvRadioGroupEvents,
902
- setup(__props, { emit }) {
958
+ setup(__props, { emit: __emit }) {
903
959
  const props = __props;
960
+ const emit = __emit;
904
961
  const slots = useSlots();
905
962
  const propsDefaults = useDefaults(
906
963
  "VvRadioGroup",
@@ -909,8 +966,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
909
966
  );
910
967
  const modelValue = useVModel(props, "modelValue", emit);
911
968
  const { disabled, readonly, vertical, valid, invalid, modifiers } = toRefs(props);
912
- useProvideGroupState({
913
- key: INJECTION_KEY_RADIO_GROUP,
969
+ useProvideGroupState(INJECTION_KEY_RADIO_GROUP, {
914
970
  modelValue,
915
971
  disabled,
916
972
  readonly,
@@ -939,49 +995,76 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
939
995
  };
940
996
  const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
941
997
  return (_ctx, _cache) => {
942
- return openBlock(), createElementBlock("fieldset", {
943
- class: normalizeClass(unref(bemCssClasses))
944
- }, [
945
- _ctx.label ? (openBlock(), createElementBlock("legend", {
946
- key: 0,
947
- textContent: toDisplayString(_ctx.label)
948
- }, null, 8, _hoisted_1)) : createCommentVNode("", true),
949
- createElementVNode("div", _hoisted_2, [
950
- _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
951
- return openBlock(), createBlock(_sfc_main$1, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
952
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
953
- ]),
954
- createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
955
- _ctx.$slots.hint ? {
956
- name: "hint",
957
- fn: withCtx(() => [
958
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
959
- ]),
960
- key: "0"
961
- } : void 0,
962
- _ctx.$slots.loading ? {
963
- name: "loading",
964
- fn: withCtx(() => [
965
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
966
- ]),
967
- key: "1"
968
- } : void 0,
969
- _ctx.$slots.valid ? {
970
- name: "valid",
971
- fn: withCtx(() => [
972
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
973
- ]),
974
- key: "2"
975
- } : void 0,
976
- _ctx.$slots.invalid ? {
977
- name: "invalid",
978
- fn: withCtx(() => [
979
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
998
+ return openBlock(), createElementBlock(
999
+ "fieldset",
1000
+ {
1001
+ class: normalizeClass(unref(bemCssClasses))
1002
+ },
1003
+ [
1004
+ _ctx.label ? (openBlock(), createElementBlock("legend", {
1005
+ key: 0,
1006
+ textContent: toDisplayString(_ctx.label)
1007
+ }, null, 8, _hoisted_1)) : createCommentVNode("v-if", true),
1008
+ createElementVNode("div", _hoisted_2, [
1009
+ _ctx.options.length > 0 ? (openBlock(true), createElementBlock(
1010
+ Fragment,
1011
+ { key: 0 },
1012
+ renderList(_ctx.options, (option, index) => {
1013
+ return openBlock(), createBlock(
1014
+ _sfc_main$1,
1015
+ mergeProps({ key: index }, getOptionProps(option, index)),
1016
+ null,
1017
+ 16
1018
+ /* FULL_PROPS */
1019
+ );
1020
+ }),
1021
+ 128
1022
+ /* KEYED_FRAGMENT */
1023
+ )) : renderSlot(_ctx.$slots, "default", { key: 1 })
1024
+ ]),
1025
+ createVNode(
1026
+ unref(HintSlot),
1027
+ { class: "vv-radio-group__hint" },
1028
+ createSlots({
1029
+ _: 2
1030
+ /* DYNAMIC */
1031
+ }, [
1032
+ _ctx.$slots.hint ? {
1033
+ name: "hint",
1034
+ fn: withCtx(() => [
1035
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1036
+ ]),
1037
+ key: "0"
1038
+ } : void 0,
1039
+ _ctx.$slots.loading ? {
1040
+ name: "loading",
1041
+ fn: withCtx(() => [
1042
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1043
+ ]),
1044
+ key: "1"
1045
+ } : void 0,
1046
+ _ctx.$slots.valid ? {
1047
+ name: "valid",
1048
+ fn: withCtx(() => [
1049
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1050
+ ]),
1051
+ key: "2"
1052
+ } : void 0,
1053
+ _ctx.$slots.invalid ? {
1054
+ name: "invalid",
1055
+ fn: withCtx(() => [
1056
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1057
+ ]),
1058
+ key: "3"
1059
+ } : void 0
980
1060
  ]),
981
- key: "3"
982
- } : void 0
983
- ]), 1024)
984
- ], 2);
1061
+ 1024
1062
+ /* DYNAMIC_SLOTS */
1063
+ )
1064
+ ],
1065
+ 2
1066
+ /* CLASS */
1067
+ );
985
1068
  };
986
1069
  }
987
1070
  });
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("nanoid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","nanoid","@vueuse/core","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadioGroup=t(e.vue,e.nanoid,e.core,e.tsDotProp)}(this,(function(e,t,l,o){"use strict";var a=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(a||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{});const r=Symbol.for("volver"),u=Symbol.for("radioGroup");function d(e,t,l){return l?v(e,l)===v(t,l):s(e,t)}function s(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 a,n,i;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!s(e[a],t[a]))return!1;return!0}if(l!=o)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,v=t instanceof RegExp;if(d!=v)return!1;if(d&&v)return e.toString()==t.toString();const f=Object.keys(e);if(n=f.length,n!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,f[a]))return!1;for(a=n;0!=a--;)if(i=f[a],!s(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function v(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function f(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function c(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>f(o.value.invalidLabel))),n=e.computed((()=>f(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.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)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,o,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??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:p,HintSlot:m}}const p={valid:Boolean,validLabel:[String,Array]},m={invalid:Boolean,invalidLabel:[String,Array]},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},y=(Boolean,Boolean,Boolean,{label:[String,Number]}),h={readonly:Boolean},S={modifiers:[String,Array]},L={hintLabel:{type:String,default:""}},O={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};n.before;const B={tabindex:{type:[String,Number],default:0}},k={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const V={...{...k,name:{type:String,required:!0}},...B,...p,...m,...L,...g,...h,...S,...y,...b,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]},$={...p,...m,...O,...L,...g,...h,...S,...y,...b,modelValue:[String,Array,Boolean,Number,Symbol],name:{type:String,required:!0},vertical:Boolean};function R(t){const l=e.inject(t,void 0),o=e.computed((()=>{return t=l,!(null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length);var t,o}));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){if(null==l?void 0:l.value){const o=e.unref(l.value)[t];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,t);return e.computed({get:()=>n.value,set(e){a&&a(`update:${t}`,e)}})}}}i.button;const j=V;function A(t,l,o){const a=e.inject(r),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}function x(t,l,o){return e.computed((()=>{const a={[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&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const P=["for"],C=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],N=e.defineComponent({name:"VvRadio",props:j,emits:["click","update:modelValue","change","blur"],setup(l,{emit:o}){const a=l,n=e.useSlots(),i=A("VvRadio",j,a),{id:r,disabled:s,readonly:v,modelValue:f,valid:p,invalid:m}=function(t,l){const{id:o}=e.toRefs(t),{group:a,isInGroup:n,getGroupOrLocalRef:i}=R(u),r=i("modelValue",t,l),d=i("valid",t),s=i("invalid",t),v=e.computed((()=>{var e;return Boolean(t.readonly||(null==(e=null==a?void 0:a.value)?void 0:e.readonly.value))})),f=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==a?void 0:a.value)?void 0:e.disabled.value))}));return{id:o,group:a,isInGroup:n,modelValue:r,valid:d,invalid:s,readonly:v,disabled:f}}(a,o),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.nanoid()))))(r),g=e.computed((()=>`${b.value}-hint`)),y=e.computed((()=>S.value?-1:a.tabindex)),h=e.ref(),S=e.computed((()=>s.value||v.value)),L=e.computed((()=>!0===m.value||!0!==p.value&&void 0)),O=e.computed((()=>Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(d(e,l))return!0;return!1}(a.value,f.value):d(a.value,f.value))),B=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),k=e.computed({get:()=>O.value?B.value:null,set(e){Array.isArray(f.value)?f.value=[a.value]:f.value=a.value,o("change",e)}}),{modifiers:V}=e.toRefs(a),$=x("vv-radio",V,e.computed((()=>({valid:p.value,invalid:m.value,disabled:s.value,readonly:v.value})))),{HintSlot:N,hasHintLabelOrSlot:w,hasInvalidLabelOrSlot:_,hintSlotScope:z}=c(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref($)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:h,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(k)?k.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(S),value:e.unref(B),tabindex:e.unref(y),"aria-invalid":e.unref(L),"aria-describedby":e.unref(w)?e.unref(g):void 0,"aria-errormessage":e.unref(_)?e.unref(g):void 0},null,8,C),[[e.vModelRadio,e.unref(k)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(N),{id:e.unref(g),class:"vv-radio__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"3"}:void 0]),1032,["id"])],10,P))}}),w=$;const _=["textContent"],z={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:w,emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,i=e.useSlots(),r=A("VvRadioGroup",w,n),d=l.useVModel(n,"modelValue",a),{disabled:s,readonly:v,vertical:f,valid:p,invalid:m,modifiers:b}=e.toRefs(n);!function(t){if(Object.keys(t).some((l=>"key"!==l&&!e.isRef(t[l]))))throw Error("One or more groupState props aren't ref.");e.provide(t.key,e.computed((()=>t)))}({key:u,modelValue:d,disabled:s,readonly:v,valid:p,invalid:m});const{getOptionLabel:g,getOptionValue:y}=function(t){const{options:l,labelKey:a,valueKey:n,disabledKey:i}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof a.value?a.value(e):o.get(e,a.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):o.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):o.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(n),h=x("vv-radio-group",b,e.computed((()=>({disabled:s.value,readonly:v.value,horizontal:!f.value,valid:p.value,invalid:m.value})))),{HintSlot:S,hintSlotScope:L}=c(r,i);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(h))},[t.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(t.label)},null,8,_)):e.createCommentVNode("",!0),e.createElementVNode("div",z,[t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,((t,l)=>(e.openBlock(),e.createBlock(N,e.mergeProps({key:l},((e,t)=>({id:`${n.name}_opt${t}`,name:n.name,label:g(e),value:y(e)}))(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(S),{class:"vv-radio-group__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(L))))])),key:"3"}:void 0]),1024)],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","uid","@vueuse/core","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvRadioGroup=t(e.vue,e.uid,e.core,e.tsDotProp)}(this,(function(e,t,l,o){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{});const d=Symbol.for("volver"),s=Symbol.for("radioGroup");function v(e,t,l){return l?c(e,l)===c(t,l):f(e,t)}function f(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 a,n,i;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!f(e[a],t[a]))return!1;return!0}if(l!=o)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(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,v[a]))return!1;for(a=n;0!=a--;)if(i=v[a],!f(e[i],t[i]))return!1;return!0}return e!=e&&t!=t}function c(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function p(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function m(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>p(o.value.invalidLabel))),n=e.computed((()=>p(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||r.value))),f=e.computed((()=>d.value||s.value||u.value||v.value)),c=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:f,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,o,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??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:c,HintSlot:m}}const b={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},y={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},g={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},h={disabled:{type:Boolean,default:!1}},S=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),L={readonly:{type:Boolean,default:!1}},B={modifiers:{type:[String,Array],default:void 0}},O={hintLabel:{type:String,default:""}},k={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};i.before;const V={tabindex:{type:[String,Number],default:0}},$={id:[String,Number]};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const R={...{...$,name:{type:String,required:!0}},...V,...b,...y,...O,...h,...L,...B,...S,...g,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},x={...b,...y,...k,...O,...h,...L,...B,...S,...g,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}};r.button,u.button,a.local;const j=R;function A(t,l){const{id:o}=e.toRefs(t),{group:a,isInGroup:n,getGroupOrLocalRef:i}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>void 0!==l));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){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(o,t);return e.computed({get:()=>i.value,set(e){a&&a(`update:${t}`,e)}})}}}(s),r=i("modelValue",t,l),u=i("valid",t),d=i("invalid",t),v=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),f=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:o,group:a,isInGroup:n,modelValue:r,valid:u,invalid:d,readonly:v,disabled:f}}function P(t,l,o){const a=e.inject(d),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}function C(t,l,o){return e.computed((()=>{const a={[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&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const N=["for"],_=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],w=e.defineComponent({name:"VvRadio",props:j,emits:["click","update:modelValue","change","blur"],setup(l,{emit:o}){const a=l,n=o,i=e.useSlots(),r=P("VvRadio",j,a),{id:u,disabled:d,readonly:s,modelValue:f,valid:c,invalid:p}=A(a,n),b=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(u),y=e.computed((()=>`${b.value}-hint`)),g=e.computed((()=>S.value?-1:a.tabindex)),h=e.ref(),S=e.computed((()=>d.value||s.value)),L=e.computed((()=>!0===p.value||!0!==c.value&&void 0)),B=e.computed((()=>Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(v(e,l))return!0;return!1}(a.value,f.value):v(a.value,f.value))),O=e.computed((()=>!["string","number","boolean"].includes(typeof a.value)||a.value)),k=e.computed({get:()=>B.value?O.value:null,set(e){Array.isArray(f.value)?f.value=[a.value]:f.value=a.value,n("change",e)}}),{modifiers:V}=e.toRefs(a),$=C("vv-radio",V,e.computed((()=>({valid:c.value,invalid:p.value,disabled:d.value,readonly:s.value})))),{HintSlot:R,hasHintLabelOrSlot:x,hasInvalidLabelOrSlot:w,hintSlotScope:z}=m(r,i);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref($)),for:e.unref(b)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(b),ref_key:"input",ref:h,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(k)?k.value=t:null),type:"radio",class:"vv-radio__input",name:t.name,disabled:e.unref(S),value:e.unref(O),tabindex:e.unref(g),"aria-invalid":e.unref(L),"aria-describedby":e.unref(x)?e.unref(y):void 0,"aria-errormessage":e.unref(w)?e.unref(y):void 0},null,8,_),[[e.vModelRadio,e.unref(k)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(R),{id:e.unref(y),class:"vv-radio__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(z))))])),key:"3"}:void 0]),1032,["id"])],10,N))}}),z=x;const E=["textContent"],G={class:"vv-radio-group__wrapper"};return e.defineComponent({name:"VvRadioGroup",props:z,emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,i=a,r=e.useSlots(),u=P("VvRadioGroup",z,n),d=l.useVModel(n,"modelValue",i),{disabled:v,readonly:f,vertical:c,valid:p,invalid:b,modifiers:y}=e.toRefs(n);var g,h;g=s,h={modelValue:d,disabled:v,readonly:f,valid:p,invalid:b},e.provide(g,h);const{getOptionLabel:S,getOptionValue:L}=function(t){const{options:l,labelKey:a,valueKey:n,disabledKey:i}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof a.value?a.value(e):o.get(e,a.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):o.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):o.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(n),B=C("vv-radio-group",y,e.computed((()=>({disabled:v.value,readonly:f.value,horizontal:!c.value,valid:p.value,invalid:b.value})))),{HintSlot:O,hintSlotScope:k}=m(u,r);return(t,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(B))},[t.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(t.label)},null,8,E)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",G,[t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,((t,l)=>(e.openBlock(),e.createBlock(w,e.mergeProps({key:l},((e,t)=>({id:`${n.name}_opt${t}`,name:n.name,label:S(e),value:L(e)}))(t,l)),null,16)))),128)):e.renderSlot(t.$slots,"default",{key:1})]),e.createVNode(e.unref(O),{class:"vv-radio-group__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(k))))])),key:"3"}:void 0]),1024)],2))}})}));