@volverjs/ui-vue 0.0.5 → 0.0.6-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. package/README.md +3 -4
  2. package/auto-imports.d.ts +11 -0
  3. package/dist/Volver.d.ts +1 -1
  4. package/dist/components/VvAccordion/VvAccordion.es.js +238 -5
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -8
  7. package/dist/components/VvAccordion/index.d.ts +3 -6
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -10
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +10 -62
  11. package/dist/components/VvAccordionGroup/index.d.ts +4 -33
  12. package/dist/components/VvAction/VvAction.es.js +12 -8
  13. package/dist/components/VvAction/VvAction.umd.js +1 -1
  14. package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
  15. package/dist/components/VvAction/index.d.ts +1 -1
  16. package/dist/components/VvAlert/VvAlert.es.js +661 -0
  17. package/dist/components/VvAlert/VvAlert.umd.js +1 -0
  18. package/dist/components/VvAlert/VvAlert.vue.d.ts +104 -0
  19. package/dist/components/VvAlert/index.d.ts +95 -0
  20. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +799 -0
  21. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -0
  22. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +89 -0
  23. package/dist/components/VvAlertGroup/index.d.ts +55 -0
  24. package/dist/components/VvAvatar/VvAvatar.es.js +279 -0
  25. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -0
  26. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +15 -0
  27. package/dist/components/VvAvatar/index.d.ts +7 -0
  28. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +363 -0
  29. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -0
  30. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +42 -0
  31. package/dist/components/VvAvatarGroup/index.d.ts +25 -0
  32. package/dist/components/VvBadge/VvBadge.es.js +3 -3
  33. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  34. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -3
  35. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +5 -31
  36. package/dist/components/VvBreadcrumb/index.d.ts +1 -14
  37. package/dist/components/VvButton/VvButton.es.js +90 -49
  38. package/dist/components/VvButton/VvButton.umd.js +1 -1
  39. package/dist/components/VvButton/VvButton.vue.d.ts +38 -13
  40. package/dist/components/VvButton/index.d.ts +27 -4
  41. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +13 -7
  42. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  43. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +10 -62
  44. package/dist/components/VvButtonGroup/index.d.ts +3 -29
  45. package/dist/components/VvCard/VvCard.es.js +221 -2
  46. package/dist/components/VvCard/VvCard.umd.js +1 -1
  47. package/dist/components/VvCard/VvCard.vue.d.ts +7 -7
  48. package/dist/components/VvCard/index.d.ts +1 -1
  49. package/dist/components/VvCheckbox/VvCheckbox.es.js +154 -101
  50. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  51. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +47 -11
  52. package/dist/components/VvCheckbox/index.d.ts +9 -4
  53. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -104
  54. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  55. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +44 -8
  56. package/dist/components/VvCheckboxGroup/index.d.ts +8 -3
  57. package/dist/components/VvCombobox/VvCombobox.es.js +272 -175
  58. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  59. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +73 -37
  60. package/dist/components/VvCombobox/index.d.ts +13 -7
  61. package/dist/components/VvDialog/VvDialog.es.js +45 -34
  62. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  63. package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -7
  64. package/dist/components/VvDialog/index.d.ts +2 -2
  65. package/dist/components/VvDropdown/VvDropdown.es.js +39 -25
  66. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  67. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +24 -20
  68. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +4 -4
  69. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -2
  70. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
  71. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -4
  72. package/dist/components/VvDropdown/index.d.ts +2 -2
  73. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -11
  74. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  75. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +9 -5
  76. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  77. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +3 -3
  78. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +12 -8
  79. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  80. package/dist/components/VvIcon/VvIcon.es.js +26 -20
  81. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  82. package/dist/components/VvIcon/VvIcon.vue.d.ts +3 -3
  83. package/dist/components/VvIcon/index.d.ts +3 -3
  84. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  85. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  86. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  87. package/dist/components/VvInputText/VvInputText.es.js +166 -142
  88. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  89. package/dist/components/VvInputText/VvInputText.vue.d.ts +46 -22
  90. package/dist/components/VvInputText/index.d.ts +5 -5
  91. package/dist/components/VvNav/VvNav.es.js +454 -0
  92. package/dist/components/VvNav/VvNav.umd.js +1 -0
  93. package/dist/components/VvNav/VvNav.vue.d.ts +21 -0
  94. package/dist/components/VvNav/index.d.ts +19 -0
  95. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +19 -0
  96. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +1 -0
  97. package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +6 -0
  98. package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +2 -0
  99. package/dist/components/VvProgress/VvProgress.es.js +3 -3
  100. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  101. package/dist/components/VvRadio/VvRadio.es.js +154 -101
  102. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  103. package/dist/components/VvRadio/VvRadio.vue.d.ts +47 -11
  104. package/dist/components/VvRadio/index.d.ts +9 -4
  105. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -104
  106. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  107. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +44 -8
  108. package/dist/components/VvRadioGroup/index.d.ts +8 -3
  109. package/dist/components/VvSelect/VvSelect.es.js +167 -141
  110. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  111. package/dist/components/VvSelect/VvSelect.vue.d.ts +42 -18
  112. package/dist/components/VvSelect/index.d.ts +4 -4
  113. package/dist/components/VvTab/VvTab.es.js +509 -0
  114. package/dist/components/VvTab/VvTab.umd.js +1 -0
  115. package/dist/components/VvTab/VvTab.vue.d.ts +26 -0
  116. package/dist/components/VvTab/index.d.ts +10 -0
  117. package/dist/components/VvTextarea/VvTextarea.es.js +164 -140
  118. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  119. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +40 -16
  120. package/dist/components/VvTextarea/index.d.ts +3 -3
  121. package/dist/components/VvTooltip/VvTooltip.es.js +3 -3
  122. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
  123. package/dist/components/common/HintSlot.d.ts +38 -12
  124. package/dist/components/index.es.js +1336 -981
  125. package/dist/components/index.umd.js +1 -1
  126. package/dist/composables/alert/useInjectAlert.d.ts +9 -0
  127. package/dist/composables/alert/useProvideAlert.d.ts +10 -0
  128. package/dist/composables/dropdown/useInjectDropdown.d.ts +17 -16
  129. package/dist/composables/dropdown/useProvideDropdown.d.ts +7 -3
  130. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  131. package/dist/composables/useOptions.d.ts +2 -2
  132. package/dist/composables/useVolver.d.ts +1 -2
  133. package/dist/constants.d.ts +33 -4
  134. package/dist/directives/index.d.ts +2 -2
  135. package/dist/directives/index.es.js +3 -3
  136. package/dist/directives/v-tooltip.es.js +3 -3
  137. package/dist/icons.es.js +3 -3
  138. package/dist/icons.umd.js +1 -1
  139. package/dist/props/index.d.ts +38 -16
  140. package/dist/resolvers/unplugin.es.js +6 -3
  141. package/dist/resolvers/unplugin.umd.js +1 -1
  142. package/dist/stories/Accordion/Accordion.settings.d.ts +18 -17
  143. package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
  144. package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
  145. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +23 -4
  146. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +134 -0
  147. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +894 -0
  148. package/dist/stories/Alert/Alert.settings.d.ts +105 -0
  149. package/dist/stories/Alert/Alert.stories.d.ts +9 -0
  150. package/dist/stories/Alert/Alert.test.d.ts +2 -0
  151. package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
  152. package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
  153. package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +97 -0
  154. package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
  155. package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
  156. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
  157. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
  158. package/dist/stories/Avatar/Avatar.settings.d.ts +5 -0
  159. package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
  160. package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
  161. package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
  162. package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
  163. package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
  164. package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +50 -0
  165. package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
  166. package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
  167. package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
  168. package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
  169. package/dist/stories/Badge/Badge.settings.d.ts +0 -3
  170. package/dist/stories/Badge/Badge.stories.d.ts +7 -0
  171. package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
  172. package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
  173. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
  174. package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
  175. package/dist/stories/Button/Button.settings.d.ts +17 -9
  176. package/dist/stories/Button/Button.stories.d.ts +6 -0
  177. package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
  178. package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
  179. package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
  180. package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
  181. package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
  182. package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
  183. package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
  184. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +0 -4
  185. package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
  186. package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
  187. package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
  188. package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
  189. package/dist/stories/Card/Card.settings.d.ts +0 -3
  190. package/dist/stories/Card/Card.stories.d.ts +6 -0
  191. package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
  192. package/dist/stories/Checkbox/Checkbox.settings.d.ts +1 -21
  193. package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
  194. package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
  195. package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
  196. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -27
  197. package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
  198. package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
  199. package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
  200. package/dist/stories/Combobox/Combobox.settings.d.ts +2 -54
  201. package/dist/stories/Combobox/Combobox.stories.d.ts +21 -0
  202. package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
  203. package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +8 -0
  204. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +9 -0
  205. package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
  206. package/dist/stories/Dialog/Dialog.settings.d.ts +1 -1
  207. package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
  208. package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
  209. package/dist/stories/Dropdown/Dropdown.settings.d.ts +1 -1
  210. package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
  211. package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
  212. package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
  213. package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
  214. package/dist/stories/Icon/Icon.settings.d.ts +1 -3
  215. package/dist/stories/Icon/Icon.stories.d.ts +8 -0
  216. package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
  217. package/dist/stories/InputText/InputText.settings.d.ts +1 -74
  218. package/dist/stories/InputText/InputText.stories.d.ts +15 -0
  219. package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
  220. package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
  221. package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
  222. package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
  223. package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
  224. package/dist/stories/Nav/Nav.settings.d.ts +30 -0
  225. package/dist/stories/Nav/Nav.stories.d.ts +6 -0
  226. package/dist/stories/Nav/Nav.test.d.ts +2 -0
  227. package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
  228. package/dist/stories/Progress/Progress.settings.d.ts +0 -6
  229. package/dist/stories/Progress/Progress.stories.d.ts +7 -0
  230. package/dist/stories/Radio/Radio.settings.d.ts +1 -19
  231. package/dist/stories/Radio/Radio.stories.d.ts +11 -0
  232. package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
  233. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -27
  234. package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
  235. package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
  236. package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
  237. package/dist/stories/Select/Select.settings.d.ts +1 -47
  238. package/dist/stories/Select/Select.stories.d.ts +15 -0
  239. package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
  240. package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
  241. package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
  242. package/dist/stories/Tab/Tab.settings.d.ts +37 -0
  243. package/dist/stories/Tab/Tab.stories.d.ts +6 -0
  244. package/dist/stories/Tab/Tab.test.d.ts +2 -0
  245. package/dist/stories/Textarea/Textarea.settings.d.ts +1 -43
  246. package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
  247. package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
  248. package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
  249. package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
  250. package/dist/stories/Tooltip/Tooltip.settings.d.ts +2 -39
  251. package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
  252. package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
  253. package/dist/stories/argTypes.d.ts +5 -125
  254. package/dist/test/expect.d.ts +3 -0
  255. package/package.json +112 -56
  256. package/src/assets/icons/detailed.json +1 -1
  257. package/src/assets/icons/normal.json +1 -1
  258. package/src/assets/icons/simple.json +1 -1
  259. package/src/components/VvAccordion/index.ts +22 -7
  260. package/src/components/VvAccordionGroup/index.ts +8 -6
  261. package/src/components/VvAction/VvAction.vue +1 -1
  262. package/src/components/VvAlert/VvAlert.vue +54 -0
  263. package/src/components/VvAlert/index.ts +162 -0
  264. package/src/components/VvAlertGroup/VvAlertGroup.vue +34 -0
  265. package/src/components/VvAlertGroup/index.ts +122 -0
  266. package/src/components/VvAvatar/VvAvatar.vue +21 -0
  267. package/src/components/VvAvatar/index.ts +9 -0
  268. package/src/components/VvAvatarGroup/VvAvatarGroup.vue +65 -0
  269. package/src/components/VvAvatarGroup/index.ts +28 -0
  270. package/src/components/VvBreadcrumb/index.ts +1 -1
  271. package/src/components/VvButton/VvButton.vue +9 -6
  272. package/src/components/VvButton/index.ts +44 -21
  273. package/src/components/VvButtonGroup/VvButtonGroup.vue +2 -2
  274. package/src/components/VvButtonGroup/index.ts +14 -2
  275. package/src/components/VvCard/index.ts +3 -1
  276. package/src/components/VvCheckbox/VvCheckbox.vue +23 -2
  277. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +15 -2
  278. package/src/components/VvCombobox/VvCombobox.vue +41 -24
  279. package/src/components/VvCombobox/index.ts +11 -5
  280. package/src/components/VvDialog/VvDialog.vue +11 -7
  281. package/src/components/VvDialog/index.ts +2 -2
  282. package/src/components/VvDropdown/VvDropdown.vue +23 -5
  283. package/src/components/VvDropdown/VvDropdownItem.vue +2 -2
  284. package/src/components/VvIcon/VvIcon.vue +37 -34
  285. package/src/components/VvIcon/index.ts +3 -3
  286. package/src/components/VvInputText/VvInputText.vue +26 -9
  287. package/src/components/VvNav/VvNav.vue +66 -0
  288. package/src/components/VvNav/index.ts +21 -0
  289. package/src/components/VvNavItemTitle/VvNavItemTitle.vue +11 -0
  290. package/src/components/VvNavSeparator/VvNavSeparator.ts +8 -0
  291. package/src/components/VvRadio/VvRadio.vue +23 -2
  292. package/src/components/VvRadioGroup/VvRadioGroup.vue +15 -2
  293. package/src/components/VvSelect/VvSelect.vue +26 -9
  294. package/src/components/VvTab/VvTab.vue +53 -0
  295. package/src/components/VvTab/index.ts +13 -0
  296. package/src/components/VvTextarea/VvTextarea.vue +26 -9
  297. package/src/components/common/HintSlot.ts +129 -170
  298. package/src/composables/alert/useInjectAlert.ts +8 -0
  299. package/src/composables/alert/useProvideAlert.ts +23 -0
  300. package/src/composables/dropdown/useInjectDropdown.ts +3 -28
  301. package/src/composables/dropdown/useProvideDropdown.ts +14 -15
  302. package/src/composables/useOptions.ts +9 -7
  303. package/src/composables/useVolver.ts +1 -2
  304. package/src/constants.ts +42 -4
  305. package/src/props/index.ts +7 -5
  306. package/src/resolvers/unplugin.ts +6 -3
  307. package/src/stories/Accordion/Accordion.settings.ts +18 -7
  308. package/src/stories/Accordion/Accordion.stories.ts +45 -0
  309. package/src/stories/Accordion/AccordionSlots.stories.ts +29 -0
  310. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +22 -0
  311. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +62 -0
  312. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +53 -0
  313. package/src/stories/Alert/Alert.settings.ts +110 -0
  314. package/src/stories/Alert/Alert.stories.ts +60 -0
  315. package/src/stories/Alert/Alert.test.ts +95 -0
  316. package/src/stories/Alert/AlertModifiers.stories.ts +77 -0
  317. package/src/stories/Alert/AlertSlots.stories.ts +74 -0
  318. package/src/stories/AlertGroup/AlertGroup.settings.ts +110 -0
  319. package/src/stories/AlertGroup/AlertGroup.stories.ts +50 -0
  320. package/src/stories/AlertGroup/AlertGroup.test.ts +76 -0
  321. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +103 -0
  322. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +67 -0
  323. package/src/stories/Avatar/Avatar.settings.ts +37 -0
  324. package/src/stories/Avatar/Avatar.stories.ts +42 -0
  325. package/src/stories/Avatar/Avatar.test.ts +34 -0
  326. package/src/stories/Avatar/AvatarBadge.stories.ts +36 -0
  327. package/src/stories/Avatar/AvatarModifiers.stories.ts +100 -0
  328. package/src/stories/Avatar/AvatarSlots.stories.ts +34 -0
  329. package/src/stories/AvatarGroup/AvatarGroup.settings.ts +60 -0
  330. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
  331. package/src/stories/AvatarGroup/AvatarGroup.test.ts +36 -0
  332. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
  333. package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +39 -0
  334. package/src/stories/Badge/Badge.stories.ts +43 -0
  335. package/src/stories/Badge/BadgeSlots.stories.ts +23 -0
  336. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +41 -0
  337. package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
  338. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +37 -0
  339. package/src/stories/Button/Button.settings.ts +14 -2
  340. package/src/stories/Button/Button.stories.ts +38 -0
  341. package/src/stories/Button/ButtonIcon.stories.ts +67 -0
  342. package/src/stories/Button/ButtonLink.stories.ts +40 -0
  343. package/src/stories/Button/ButtonLoading.stories.ts +41 -0
  344. package/src/stories/Button/ButtonModifiers.stories.ts +158 -0
  345. package/src/stories/Button/ButtonSlots.stories.ts +87 -0
  346. package/src/stories/Button/ButtonState.stories.ts +42 -0
  347. package/src/stories/Button/ButtonToggle.stories.ts +52 -0
  348. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +39 -0
  349. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +39 -0
  350. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +38 -0
  351. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +41 -0
  352. package/src/stories/Card/Card.stories.ts +46 -0
  353. package/src/stories/Card/CardSlots.stories.ts +81 -0
  354. package/src/stories/Checkbox/Checkbox.settings.ts +0 -2
  355. package/src/stories/Checkbox/Checkbox.stories.ts +97 -0
  356. package/src/stories/Checkbox/CheckboxBinary.stories.ts +33 -0
  357. package/src/stories/Checkbox/CheckboxSlots.stories.ts +31 -0
  358. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +87 -0
  359. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +53 -0
  360. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +47 -0
  361. package/src/stories/Combobox/Combobox.settings.ts +3 -23
  362. package/src/stories/Combobox/Combobox.stories.ts +176 -0
  363. package/src/stories/Combobox/Combobox.test.ts +2 -2
  364. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +43 -0
  365. package/src/stories/Combobox/ComboboxMultiple.stories.ts +41 -0
  366. package/src/stories/Combobox/ComboboxOptions.stories.ts +78 -0
  367. package/src/stories/Combobox/ComboboxSlots.stories.ts +104 -0
  368. package/src/stories/Dialog/Dialog.settings.ts +1 -1
  369. package/src/stories/Dialog/Dialog.stories.ts +51 -0
  370. package/src/stories/Dialog/Dialog.test.ts +2 -2
  371. package/src/stories/Dialog/DialogSlots.stories.ts +39 -0
  372. package/src/stories/Dropdown/Dropdown.stories.ts +107 -0
  373. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +49 -0
  374. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +61 -0
  375. package/src/stories/Dropdown/DropdownSlots.stories.ts +95 -0
  376. package/src/stories/Icon/Icon.settings.ts +1 -0
  377. package/src/stories/Icon/Icon.stories.ts +48 -0
  378. package/src/stories/Icon/IconsCollection.stories.ts +53 -0
  379. package/src/stories/InputText/InputText.settings.ts +3 -39
  380. package/src/stories/InputText/InputText.stories.ts +121 -0
  381. package/src/stories/InputText/InputTextIconPosition.stories.ts +43 -0
  382. package/src/stories/InputText/InputTextLength.stories.ts +58 -0
  383. package/src/stories/InputText/InputTextMinMax.stories.ts +51 -0
  384. package/src/stories/InputText/InputTextSlots.stories.ts +39 -0
  385. package/src/stories/InputText/InputTextType.stories.ts +119 -0
  386. package/src/stories/Nav/Nav.settings.ts +34 -0
  387. package/src/stories/Nav/Nav.stories.ts +33 -0
  388. package/src/stories/Nav/Nav.test.ts +32 -0
  389. package/src/stories/Nav/NavModifiers.stories.ts +47 -0
  390. package/src/stories/Progress/Progress.settings.ts +0 -3
  391. package/src/stories/Progress/Progress.stories.ts +41 -0
  392. package/src/stories/Radio/Radio.stories.ts +81 -0
  393. package/src/stories/Radio/RadioSlots.stories.ts +31 -0
  394. package/src/stories/RadioGroup/RadioGroup.stories.ts +88 -0
  395. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +53 -0
  396. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +47 -0
  397. package/src/stories/Select/Select.settings.ts +0 -5
  398. package/src/stories/Select/Select.stories.ts +113 -0
  399. package/src/stories/Select/SelectIconPosition.stories.ts +43 -0
  400. package/src/stories/Select/SelectOptions.stories.ts +77 -0
  401. package/src/stories/Select/SelectSlots.stories.ts +39 -0
  402. package/src/stories/Tab/Tab.settings.ts +41 -0
  403. package/src/stories/Tab/Tab.stories.ts +70 -0
  404. package/src/stories/Tab/Tab.test.ts +37 -0
  405. package/src/stories/Textarea/Textarea.settings.ts +0 -8
  406. package/src/stories/Textarea/Textarea.stories.ts +107 -0
  407. package/src/stories/Textarea/TextareaLength.stories.ts +58 -0
  408. package/src/stories/Textarea/TextareaSlots.stories.ts +39 -0
  409. package/src/stories/Textarea/TextareatIconPosition.stories.ts +43 -0
  410. package/src/stories/Tooltip/Tooltip.settings.ts +4 -4
  411. package/src/stories/Tooltip/Tooltip.stories.ts +40 -0
  412. package/src/stories/Tooltip/TooltipDirective.stories.ts +68 -0
  413. package/src/stories/argTypes.ts +5 -59
  414. package/src/test/expect.ts +15 -0
  415. package/src/types/group.d.ts +5 -3
  416. package/src/stories/Accordion/Accordion.stories.mdx +0 -45
  417. package/src/stories/Accordion/AccordionSlots.stories.mdx +0 -58
  418. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +0 -58
  419. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +0 -59
  420. package/src/stories/Badge/Badge.stories.mdx +0 -51
  421. package/src/stories/Badge/BadgeSlots.stories.mdx +0 -20
  422. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +0 -50
  423. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +0 -43
  424. package/src/stories/Button/Button.stories.mdx +0 -35
  425. package/src/stories/Button/ButtonIcon.stories.mdx +0 -153
  426. package/src/stories/Button/ButtonLink.stories.mdx +0 -72
  427. package/src/stories/Button/ButtonLoading.stories.mdx +0 -108
  428. package/src/stories/Button/ButtonModifiers.stories.mdx +0 -257
  429. package/src/stories/Button/ButtonSlots.stories.mdx +0 -116
  430. package/src/stories/Button/ButtonState.stories.mdx +0 -66
  431. package/src/stories/Button/ButtonToggle.stories.mdx +0 -50
  432. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +0 -37
  433. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +0 -52
  434. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +0 -37
  435. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +0 -73
  436. package/src/stories/Card/Card.stories.mdx +0 -40
  437. package/src/stories/Card/CardSlots.stories.mdx +0 -98
  438. package/src/stories/Checkbox/Checkbox.stories.mdx +0 -164
  439. package/src/stories/Checkbox/CheckboxBinary.stories.mdx +0 -68
  440. package/src/stories/Checkbox/CheckboxSlots.stories.mdx +0 -46
  441. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +0 -135
  442. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +0 -100
  443. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +0 -68
  444. package/src/stories/Combobox/Combobox.stories.mdx +0 -324
  445. package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +0 -78
  446. package/src/stories/Combobox/ComboboxMultiple.stories.mdx +0 -73
  447. package/src/stories/Combobox/ComboboxOptions.stories.mdx +0 -135
  448. package/src/stories/Combobox/ComboboxSlots.stories.mdx +0 -153
  449. package/src/stories/Dialog/Dialog.stories.mdx +0 -56
  450. package/src/stories/Dialog/DialogSlots.stories.mdx +0 -63
  451. package/src/stories/Dropdown/Dropdown.stories.mdx +0 -124
  452. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +0 -41
  453. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +0 -56
  454. package/src/stories/Dropdown/DropdownSlots.stories.mdx +0 -114
  455. package/src/stories/Icon/Icon.stories.mdx +0 -91
  456. package/src/stories/Icon/IconsCollection.stories.mdx +0 -69
  457. package/src/stories/InputText/InputText.stories.mdx +0 -211
  458. package/src/stories/InputText/InputTextIconPosition.stories.mdx +0 -78
  459. package/src/stories/InputText/InputTextLength.stories.mdx +0 -110
  460. package/src/stories/InputText/InputTextMinMax.stories.mdx +0 -112
  461. package/src/stories/InputText/InputTextSlots.stories.mdx +0 -69
  462. package/src/stories/InputText/InputTextType.stories.mdx +0 -259
  463. package/src/stories/Progress/Progress.stories.mdx +0 -30
  464. package/src/stories/Radio/Radio.stories.mdx +0 -128
  465. package/src/stories/Radio/RadioSlots.stories.mdx +0 -46
  466. package/src/stories/RadioGroup/RadioGroup.stories.mdx +0 -135
  467. package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +0 -100
  468. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +0 -68
  469. package/src/stories/Select/Select.stories.mdx +0 -196
  470. package/src/stories/Select/SelectIconPosition.stories.mdx +0 -78
  471. package/src/stories/Select/SelectOptions.stories.mdx +0 -135
  472. package/src/stories/Select/SelectSlots.stories.mdx +0 -48
  473. package/src/stories/Textarea/Textarea.stories.mdx +0 -187
  474. package/src/stories/Textarea/TextareaLength.stories.mdx +0 -110
  475. package/src/stories/Textarea/TextareaSlots.stories.mdx +0 -69
  476. package/src/stories/Textarea/TextareatIconPosition.stories.mdx +0 -78
  477. package/src/stories/Tooltip/Tooltip.stories.mdx +0 -102
  478. package/src/stories/Tooltip/TooltipDirective.stories.mdx +0 -99
@@ -1,6 +1,6 @@
1
- import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, createCommentVNode, useSlots, h, onMounted, withDirectives, vModelCheckbox, createVNode, nextTick, Transition, normalizeStyle, vShow, vModelSelect, createSlots, vModelText, toHandlers, vModelDynamic, vModelRadio } from "vue";
1
+ import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, createCommentVNode, useSlots, h, onMounted, withDirectives, vModelCheckbox, createVNode, createSlots, nextTick, Transition, toHandlers, normalizeStyle, vShow, vModelSelect, vModelText, vModelDynamic, vModelRadio } from "vue";
2
2
  import { nanoid } from "nanoid";
3
- import { useToggle, useStorage, toReactive, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
3
+ import { useToggle, useStorage, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
4
4
  import { iconExists, Icon, addIcon } from "@iconify/vue";
5
5
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
6
6
  import mitt from "mitt";
@@ -69,638 +69,178 @@ const INJECTION_KEY_BUTTON_GROUP = Symbol.for("buttonGroup");
69
69
  const INJECTION_KEY_RADIO_GROUP = Symbol.for("radioGroup");
70
70
  const INJECTION_KEY_CHECK_GROUP = Symbol.for("checkGroup");
71
71
  const INJECTION_KEY_ACCORDION_GROUP = Symbol.for("accordionGroup");
72
- const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for("dropdownTrigger");
73
- const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for("dropdownItem");
74
- const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for("dropdownAction");
75
- function equals(obj1, obj2, field) {
76
- if (field)
77
- return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
78
- else
79
- return deepEquals(obj1, obj2);
80
- }
81
- function deepEquals(a, b) {
82
- if (a === b)
83
- return true;
84
- if (a && b && typeof a == "object" && typeof b == "object") {
85
- const arrA = Array.isArray(a);
86
- const arrB = Array.isArray(b);
87
- let i, length, key;
88
- if (arrA && arrB) {
89
- length = a.length;
90
- if (length != b.length)
91
- return false;
92
- for (i = length; i-- !== 0; )
93
- if (!deepEquals(a[i], b[i]))
94
- return false;
95
- return true;
96
- }
97
- if (arrA != arrB)
98
- return false;
99
- const dateA = a instanceof Date, dateB = b instanceof Date;
100
- if (dateA != dateB)
101
- return false;
102
- if (dateA && dateB)
103
- return a.getTime() == b.getTime();
104
- const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
105
- if (regexpA != regexpB)
106
- return false;
107
- if (regexpA && regexpB)
108
- return a.toString() == b.toString();
109
- const keys = Object.keys(a);
110
- length = keys.length;
111
- if (length !== Object.keys(b).length)
112
- return false;
113
- for (i = length; i-- !== 0; )
114
- if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
115
- return false;
116
- for (i = length; i-- !== 0; ) {
117
- key = keys[i];
118
- if (!deepEquals(a[key], b[key]))
119
- return false;
120
- }
121
- return true;
122
- }
123
- return a !== a && b !== b;
124
- }
125
- function resolveFieldData(data, field) {
126
- if (data && Object.keys(data).length && field) {
127
- if (field.indexOf(".") === -1) {
128
- return data[field];
129
- } else {
130
- const fields = field.split(".");
131
- let value = data;
132
- for (let i = 0, len = fields.length; i < len; ++i) {
133
- if (data == null) {
134
- return null;
135
- }
136
- value = value[fields[i]];
137
- }
138
- return value;
139
- }
140
- } else {
141
- return null;
142
- }
143
- }
144
- function findIndexInList(value, list) {
145
- let index = -1;
146
- if (list) {
147
- for (let i = 0; i < list.length; i++) {
148
- if (equals(list[i], value)) {
149
- index = i;
150
- break;
151
- }
152
- }
153
- }
154
- return index;
155
- }
156
- function contains(value, list) {
157
- if (value != null && list && list.length) {
158
- for (const val of list) {
159
- if (equals(value, val)) {
160
- return true;
161
- }
162
- }
163
- }
164
- return false;
165
- }
166
- function isEmpty(value) {
167
- 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));
168
- }
169
- function removeFromList(value, list) {
170
- const indexElToRemove = findIndexInList(value, list);
171
- if (indexElToRemove > -1) {
172
- return list.filter((el, elIndex) => elIndex !== indexElToRemove);
173
- } else {
174
- return list;
72
+ const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
73
+ "dropdownTrigger"
74
+ );
75
+ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
76
+ "dropdownItem"
77
+ );
78
+ const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
79
+ "dropdownAction"
80
+ );
81
+ const LinkProps = {
82
+ /**
83
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
84
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
85
+ */
86
+ to: {
87
+ type: [String, Object]
88
+ },
89
+ /**
90
+ * Anchor href
91
+ */
92
+ href: String,
93
+ /**
94
+ * Anchor target
95
+ */
96
+ target: {
97
+ type: String,
98
+ validator: (value) => Object.values(AnchorTarget).includes(value)
99
+ },
100
+ /**
101
+ * Anchor rel
102
+ */
103
+ rel: {
104
+ type: String,
105
+ default: "noopener noreferrer"
175
106
  }
176
- }
177
- function isString(value) {
178
- return typeof value === "string" || value instanceof String;
179
- }
180
- function useInjectedGroupState(groupKey) {
181
- const group = inject(groupKey, void 0);
182
- const isInGroup = computed(() => !isEmpty(group));
183
- function getGroupOrLocalRef(propName, props, emit) {
184
- if (group == null ? void 0 : group.value) {
185
- const groupPropValue = unref(group.value)[propName];
186
- return computed({
187
- get() {
188
- return groupPropValue == null ? void 0 : groupPropValue.value;
189
- },
190
- set(value) {
191
- groupPropValue.value = value;
192
- }
193
- });
194
- }
195
- const propRef = toRef(props, propName);
196
- return computed({
197
- get() {
198
- return propRef.value;
199
- },
200
- set(value) {
201
- if (emit)
202
- emit(`update:${propName}`, value);
203
- }
204
- });
107
+ };
108
+ const ValidProps = {
109
+ /**
110
+ * Valid status
111
+ */
112
+ valid: Boolean,
113
+ /**
114
+ * Valid label
115
+ */
116
+ validLabel: [String, Array]
117
+ };
118
+ const InvalidProps = {
119
+ /**
120
+ * Invalid status
121
+ */
122
+ invalid: Boolean,
123
+ /**
124
+ * Invalid label
125
+ */
126
+ invalidLabel: [String, Array]
127
+ };
128
+ const LoadingProps = {
129
+ /**
130
+ * Loading status
131
+ */
132
+ loading: Boolean,
133
+ /**
134
+ * Loading label
135
+ */
136
+ loadingLabel: {
137
+ type: String,
138
+ default: "Loading..."
205
139
  }
206
- return {
207
- group,
208
- isInGroup,
209
- getGroupOrLocalRef
210
- };
211
- }
212
- const VvAccordionProps = {
140
+ };
141
+ const DisabledProps = {
213
142
  /**
214
- * Accordion name
143
+ * Whether the form control is disabled
215
144
  */
216
- name: String,
145
+ disabled: Boolean
146
+ };
147
+ const SelectedProps = {
217
148
  /**
218
- * Header title
149
+ * Whether the item is selected
219
150
  */
220
- title: String,
151
+ selected: Boolean
152
+ };
153
+ const ActiveProps = {
221
154
  /**
222
- * Content text
155
+ * Whether the item is active
223
156
  */
224
- content: String,
157
+ active: Boolean
158
+ };
159
+ const PressedProps = {
225
160
  /**
226
- * (Optional) Defines if item is open. Event "update:modelValue" is emitted on accordion header click
161
+ * Whether the item is pressed
227
162
  */
228
- modelValue: {
229
- type: Boolean,
230
- default: void 0
231
- },
163
+ pressed: Boolean
164
+ };
165
+ const LabelProps = {
232
166
  /**
233
- * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
167
+ * The item label
234
168
  */
235
- modifiers: [String, Array],
169
+ label: [String, Number]
170
+ };
171
+ const ReadonlyProps = {
236
172
  /**
237
- * If true, the accordion will be disabled
173
+ * The value is not editable
238
174
  */
239
- disabled: Boolean,
175
+ readonly: Boolean
176
+ };
177
+ const ModifiersProps = {
240
178
  /**
241
- * If true, the accordion will be opened by default
179
+ * Component BEM modifiers
242
180
  */
243
- not: Boolean
181
+ modifiers: [String, Array]
244
182
  };
245
- const VvAccordionEvents = ["update:modelValue"];
246
- function useGroupProps$3(props, emit) {
247
- const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(
248
- INJECTION_KEY_ACCORDION_GROUP
249
- );
250
- const { title, content } = toRefs(props);
251
- const modelValue = getGroupOrLocalRef("modelValue", props, emit);
252
- const not = getGroupOrLocalRef("not", props);
253
- const collapse = getGroupOrLocalRef("collapse", props);
254
- const modifiers = getGroupOrLocalRef("modifiers", props);
255
- const disabled = computed(
256
- () => {
257
- var _a;
258
- return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
259
- }
260
- );
261
- return {
262
- // group props
263
- modelValue,
264
- not,
265
- isInGroup,
266
- group,
267
- collapse,
268
- modifiers,
269
- disabled,
270
- // local props
271
- title,
272
- content
273
- };
274
- }
275
- function useModifiers(prefix, modifiers, others) {
276
- return computed(() => {
277
- const toReturn = {
278
- [prefix]: true
279
- };
280
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
281
- if (modifiersArray) {
282
- if (Array.isArray(modifiersArray)) {
283
- modifiersArray.forEach((modifier) => {
284
- if (modifier) {
285
- toReturn[`${prefix}--${modifier}`] = true;
286
- }
287
- });
288
- }
289
- }
290
- if (others) {
291
- Object.keys(others.value).forEach((key) => {
292
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
293
- });
294
- }
295
- return toReturn;
296
- });
297
- }
298
- const _hoisted_1$f = ["id", "open"];
299
- const _hoisted_2$c = ["aria-controls", "aria-expanded"];
300
- const _hoisted_3$6 = ["aria-hidden"];
301
- const __default__$m = {
302
- name: "VvAccordion"
183
+ const HintProps = {
184
+ hintLabel: { type: String, default: "" }
303
185
  };
304
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
305
- ...__default__$m,
306
- props: VvAccordionProps,
307
- emits: VvAccordionEvents,
308
- setup(__props, { emit }) {
309
- const props = __props;
310
- const attrs = useAttrs();
311
- const accordionName = computed(
312
- () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
313
- );
314
- const {
315
- modifiers,
316
- title,
317
- content,
318
- disabled,
319
- collapse,
320
- modelValue,
321
- isInGroup,
322
- not
323
- } = useGroupProps$3(props, emit);
324
- const localModelValue = ref(false);
325
- const isOpen = computed({
326
- get: () => {
327
- let toReturn = modelValue.value;
328
- if (isInGroup.value) {
329
- if (collapse.value && Array.isArray(modelValue.value)) {
330
- toReturn = modelValue.value.includes(accordionName.value);
331
- } else {
332
- toReturn = modelValue.value === accordionName.value;
333
- }
334
- } else if (modelValue.value === void 0) {
335
- toReturn = localModelValue.value;
336
- }
337
- return not.value ? !toReturn : toReturn;
338
- },
339
- set: (newValue) => {
340
- if (not.value) {
341
- newValue = !newValue;
342
- }
343
- if (isInGroup.value) {
344
- if (collapse.value && Array.isArray(modelValue.value)) {
345
- if (newValue) {
346
- modelValue.value.push(accordionName.value);
347
- return;
348
- }
349
- modelValue.value = modelValue.value.filter(
350
- (name) => name !== accordionName.value
351
- );
352
- return;
353
- }
354
- modelValue.value = newValue ? accordionName.value : null;
355
- return;
356
- }
357
- if (modelValue.value === void 0 && typeof newValue === "boolean") {
358
- localModelValue.value = newValue;
359
- return;
360
- }
361
- modelValue.value = newValue;
362
- }
363
- });
364
- const bemCssClasses = useModifiers(
365
- "vv-accordion",
366
- modifiers,
367
- computed(() => ({
368
- disabled: disabled.value
369
- }))
370
- );
371
- const onClick = useToggle(isOpen);
372
- return (_ctx, _cache) => {
373
- return openBlock(), createElementBlock("details", {
374
- id: unref(accordionName),
375
- class: normalizeClass(unref(bemCssClasses)),
376
- open: unref(isOpen)
377
- }, [
378
- createElementVNode("summary", {
379
- "aria-controls": unref(accordionName),
380
- "aria-expanded": unref(isOpen),
381
- class: "vv-accordion__summary",
382
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
383
- }, [
384
- renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
385
- createTextVNode(toDisplayString(unref(title)), 1)
386
- ])
387
- ], 8, _hoisted_2$c),
388
- createElementVNode("div", {
389
- "aria-hidden": !unref(isOpen),
390
- class: "vv-accordion__content"
391
- }, [
392
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
393
- createTextVNode(toDisplayString(unref(content)), 1)
394
- ])
395
- ], 8, _hoisted_3$6)
396
- ], 10, _hoisted_1$f);
397
- };
398
- }
399
- });
400
- const VvAccordionGroupProps = {
186
+ const OptionsProps = {
401
187
  /**
402
- * VModel
188
+ * List of options, can be string[] or object[]
403
189
  */
404
- modelValue: [String, Array],
190
+ options: {
191
+ type: Array,
192
+ default: () => []
193
+ },
405
194
  /**
406
- * Accordion items
407
- * @type VvAccordionGroupItem
195
+ * Used when options are objects: key to use for option label
408
196
  */
409
- items: { type: Array, default: () => [] },
197
+ labelKey: { type: [String, Function], default: "label" },
410
198
  /**
411
- * If true, accordion items stay open when another item is opened
199
+ * Used when options are objects: key to use for option label
412
200
  */
413
- collapse: Boolean,
201
+ valueKey: { type: [String, Function], default: "value" },
414
202
  /**
415
- * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
203
+ * Used when options are objects: key to use for option disabled
416
204
  */
417
- modifiers: [String, Array],
205
+ disabledKey: { type: [String, Function], default: "disabled" }
206
+ };
207
+ const CountProps = {
418
208
  /**
419
- * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
209
+ * Show character limit
420
210
  */
421
- itemModifiers: {
422
- type: [String, Array],
423
- default: ""
424
- },
211
+ count: {
212
+ type: [Boolean, String],
213
+ default: false,
214
+ validator: (value) => [true, false, "limit", "countdown"].includes(value)
215
+ }
216
+ };
217
+ const DebounceProps = {
425
218
  /**
426
- * If true, the accordion items will be disabled
219
+ * Milliseconds to wait before emitting the input event
427
220
  */
428
- disabled: Boolean,
221
+ debounce: [Number, String]
222
+ };
223
+ const IconProps = {
429
224
  /**
430
- * If true, the accordion items will be opened by default
225
+ * VvIcon name or props
226
+ * @see VVIcon
431
227
  */
432
- not: Boolean,
228
+ icon: { type: [String, Object] },
433
229
  /**
434
- * Enable local storage persistence
230
+ * VvIcon position
435
231
  */
436
- storeKey: String
232
+ iconPosition: {
233
+ type: String,
234
+ default: Position.before,
235
+ validation: (value) => Object.values(Position).includes(value)
236
+ }
437
237
  };
438
- const VvAccordionGroupEvents = ["update:modelValue"];
439
- function useProvideGroupState(groupState) {
440
- if (Object.keys(groupState).some(
441
- (k) => k !== "key" && !isRef(groupState[k])
442
- ))
443
- throw Error("One or more groupState props aren't ref.");
444
- provide(
445
- groupState.key,
446
- computed(() => groupState)
447
- );
448
- }
449
- const __default__$l = {
450
- name: "VvAccordionGroup"
451
- };
452
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
453
- ...__default__$l,
454
- props: VvAccordionGroupProps,
455
- emits: VvAccordionGroupEvents,
456
- setup(__props, { emit }) {
457
- const props = __props;
458
- const { disabled, collapse, modifiers, itemModifiers, items, not } = toRefs(props);
459
- watchEffect(() => {
460
- if (typeof props.modelValue === "string" && collapse.value) {
461
- console.warn(
462
- `[VvAccordionGroup]: modelValue is a string but collapse is true.`
463
- );
464
- }
465
- });
466
- let localModelValue = ref([]);
467
- watch(
468
- () => props.storeKey,
469
- (newKey) => {
470
- if (newKey) {
471
- localModelValue = useStorage(newKey, localModelValue.value);
472
- } else {
473
- localModelValue = ref([]);
474
- }
475
- },
476
- { immediate: true }
477
- );
478
- const modelValue = computed({
479
- get: () => {
480
- var _a;
481
- if (props.modelValue !== void 0) {
482
- if (!collapse.value) {
483
- return Array.isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
484
- }
485
- return props.modelValue;
486
- }
487
- return !collapse.value ? (_a = localModelValue.value) == null ? void 0 : _a[0] : localModelValue.value;
488
- },
489
- set: (newValue) => {
490
- if (props.modelValue !== void 0) {
491
- if ((Array.isArray(props.modelValue) || collapse.value) && !Array.isArray(newValue)) {
492
- newValue = [newValue];
493
- }
494
- return emit("update:modelValue", newValue);
495
- }
496
- localModelValue.value = Array.isArray(newValue) ? newValue : [newValue];
497
- }
498
- });
499
- useProvideGroupState({
500
- key: INJECTION_KEY_ACCORDION_GROUP,
501
- modelValue,
502
- disabled,
503
- collapse,
504
- modifiers: itemModifiers,
505
- not
506
- });
507
- const bemCssClasses = useModifiers(
508
- "vv-accordion-group",
509
- modifiers,
510
- computed(() => ({
511
- disabled: disabled.value
512
- }))
513
- );
514
- return (_ctx, _cache) => {
515
- return openBlock(), createElementBlock("div", {
516
- class: normalizeClass(unref(bemCssClasses))
517
- }, [
518
- renderSlot(_ctx.$slots, "default", {}, () => [
519
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
520
- return openBlock(), createBlock(_sfc_main$m, mergeProps({
521
- key: item.title
522
- }, {
523
- name: item.name,
524
- title: item.title,
525
- content: item.content
526
- }), {
527
- header: withCtx((data) => [
528
- renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
529
- ]),
530
- details: withCtx((data) => [
531
- renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
532
- ]),
533
- _: 2
534
- }, 1040);
535
- }), 128))
536
- ])
537
- ], 2);
538
- };
539
- }
540
- });
541
- const LinkProps = {
542
- /**
543
- * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
544
- * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
545
- */
546
- to: {
547
- type: [String, Object]
548
- },
549
- /**
550
- * Anchor href
551
- */
552
- href: String,
553
- /**
554
- * Anchor target
555
- */
556
- target: {
557
- type: String,
558
- validator: (value) => Object.values(AnchorTarget).includes(value)
559
- },
560
- /**
561
- * Anchor rel
562
- */
563
- rel: {
564
- type: String,
565
- default: "noopener noreferrer"
566
- }
567
- };
568
- const ValidProps = {
569
- /**
570
- * Valid status
571
- */
572
- valid: Boolean,
573
- /**
574
- * Valid label
575
- */
576
- validLabel: [String, Array]
577
- };
578
- const InvalidProps = {
579
- /**
580
- * Invalid status
581
- */
582
- invalid: Boolean,
583
- /**
584
- * Invalid label
585
- */
586
- invalidLabel: [String, Array]
587
- };
588
- const LoadingProps = {
589
- /**
590
- * Loading status
591
- */
592
- loading: Boolean,
593
- /**
594
- * Loading label
595
- */
596
- loadingLabel: {
597
- type: String,
598
- default: "Loading..."
599
- }
600
- };
601
- const DisabledProps = {
602
- /**
603
- * Whether the form control is disabled
604
- */
605
- disabled: Boolean
606
- };
607
- const SelectedProps = {
608
- /**
609
- * Whether the item is selected
610
- */
611
- selected: Boolean
612
- };
613
- const ActiveProps = {
614
- /**
615
- * Whether the item is active
616
- */
617
- active: Boolean
618
- };
619
- const PressedProps = {
620
- /**
621
- * Whether the item is pressed
622
- */
623
- pressed: Boolean
624
- };
625
- const LabelProps = {
626
- /**
627
- * The item label
628
- */
629
- label: [String, Number]
630
- };
631
- const ReadonlyProps = {
632
- /**
633
- * The value is not editable
634
- */
635
- readonly: Boolean
636
- };
637
- const ModifiersProps = {
638
- /**
639
- * Component BEM modifiers
640
- */
641
- modifiers: [String, Array]
642
- };
643
- const HintProps = {
644
- hintLabel: { type: String, default: "" }
645
- };
646
- const OptionsProps = {
647
- /**
648
- * List of options, can be string[] or object[]
649
- */
650
- options: {
651
- type: Array,
652
- default: () => []
653
- },
654
- /**
655
- * Used when options are objects: key to use for option label
656
- */
657
- labelKey: { type: [String, Function], default: "label" },
658
- /**
659
- * Used when options are objects: key to use for option label
660
- */
661
- valueKey: { type: [String, Function], default: "value" },
662
- /**
663
- * Used when options are objects: key to use for option disabled
664
- */
665
- disabledKey: { type: [String, Function], default: "disabled" }
666
- };
667
- const CountProps = {
668
- /**
669
- * Show character limit
670
- */
671
- count: {
672
- type: [Boolean, String],
673
- default: false,
674
- validator: (value) => [true, false, "limit", "countdown"].includes(value)
675
- }
676
- };
677
- const DebounceProps = {
678
- /**
679
- * Milliseconds to wait before emitting the input event
680
- */
681
- debounce: [Number, String]
682
- };
683
- const IconProps = {
684
- /**
685
- * VvIcon name or props
686
- * @see VVIcon
687
- */
688
- icon: { type: [String, Object] },
689
- /**
690
- * VvIcon position
691
- */
692
- iconPosition: {
693
- type: String,
694
- default: Position.before,
695
- validation: (value) => Object.values(Position).includes(value)
696
- }
697
- };
698
- const TabindexProps = {
699
- /**
700
- * Global attribute tabindex
701
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
702
- */
703
- tabindex: { type: [String, Number], default: 0 }
238
+ const TabindexProps = {
239
+ /**
240
+ * Global attribute tabindex
241
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
242
+ */
243
+ tabindex: { type: [String, Number], default: 0 }
704
244
  };
705
245
  const FloatingLabelProps = {
706
246
  /**
@@ -781,168 +321,650 @@ const DropdownProps = {
781
321
  default: () => ({ padding: 10 })
782
322
  },
783
323
  /**
784
- * Automatically change the position of the dropdown
785
- * @see https://floating-ui.com/docs/autoPlacement
324
+ * Automatically change the position of the dropdown
325
+ * @see https://floating-ui.com/docs/autoPlacement
326
+ */
327
+ autoPlacement: {
328
+ type: [Boolean, Object],
329
+ default: false
330
+ },
331
+ /**
332
+ * Add arrow to the dropdown
333
+ * @see https://floating-ui.com/docs/arrow
334
+ */
335
+ arrow: {
336
+ type: Boolean,
337
+ default: false
338
+ },
339
+ /**
340
+ * Keep open dropdown on click outside
341
+ */
342
+ keepOpen: {
343
+ type: Boolean,
344
+ default: false
345
+ },
346
+ /**
347
+ * Autofocus first item on dropdown open
348
+ */
349
+ autofocusFirst: {
350
+ type: Boolean,
351
+ default: true
352
+ },
353
+ /**
354
+ * Set dropdown width to the same as the trigger
355
+ */
356
+ triggerWidth: {
357
+ type: Boolean
358
+ }
359
+ };
360
+ const IdNameProps = {
361
+ ...IdProps,
362
+ /**
363
+ * Input / Textarea name
364
+ * Name of the form control. Submitted with the form as part of a name/value pair
365
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
366
+ */
367
+ name: { type: String, required: true }
368
+ };
369
+ const AutofocusProps = {
370
+ /**
371
+ * Global attribute autofocus
372
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
373
+ */
374
+ autofocus: Boolean
375
+ };
376
+ const AutocompleteProps = {
377
+ /**
378
+ * Global attribute autocomplete
379
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
380
+ */
381
+ autocomplete: { type: String, default: "off" }
382
+ };
383
+ const InputTextareaProps = {
384
+ ...IdNameProps,
385
+ ...AutofocusProps,
386
+ ...AutocompleteProps,
387
+ ...TabindexProps,
388
+ ...DisabledProps,
389
+ ...ReadonlyProps,
390
+ ...ValidProps,
391
+ ...InvalidProps,
392
+ ...HintProps,
393
+ ...LoadingProps,
394
+ ...ModifiersProps,
395
+ ...CountProps,
396
+ ...DebounceProps,
397
+ ...IconProps,
398
+ ...FloatingLabelProps,
399
+ ...LabelProps,
400
+ /**
401
+ * Input / Textarea minlength
402
+ * Minimum length (number of characters) of value
403
+ * Available for input types: text, search, url, tel, email, password
404
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
405
+ */
406
+ minlength: [String, Number],
407
+ /**
408
+ * Input / Textarea maxlength
409
+ * Maximum length (number of characters) of value
410
+ * Available for input types: text, search, url, tel, email, password
411
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
412
+ */
413
+ maxlength: [String, Number],
414
+ /**
415
+ * Input / Textarea placeholder
416
+ * Text that appears in the form control when it has no value set
417
+ * Available for input types: text, search, url, tel, email, password, number
418
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
419
+ */
420
+ placeholder: String,
421
+ /**
422
+ * Input / Textarea required
423
+ * A value is required or must be check for the form to be submittable
424
+ * Available for all input types except color
425
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
426
+ */
427
+ required: Boolean
428
+ };
429
+ const CheckboxRadioProps = {
430
+ ...IdNameProps,
431
+ ...TabindexProps,
432
+ ...ValidProps,
433
+ ...InvalidProps,
434
+ ...HintProps,
435
+ ...DisabledProps,
436
+ ...ReadonlyProps,
437
+ ...ModifiersProps,
438
+ ...LabelProps,
439
+ ...LoadingProps,
440
+ /**
441
+ * Input value
442
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
443
+ */
444
+ value: [String, Number, Boolean],
445
+ /**
446
+ * Input value
447
+ */
448
+ modelValue: [Object, Number, Boolean, String]
449
+ };
450
+ const CheckboxRadioGroupProps = {
451
+ ...ValidProps,
452
+ ...InvalidProps,
453
+ ...OptionsProps,
454
+ ...HintProps,
455
+ ...DisabledProps,
456
+ ...ReadonlyProps,
457
+ ...ModifiersProps,
458
+ ...LabelProps,
459
+ ...LoadingProps,
460
+ /**
461
+ * Input value
462
+ */
463
+ modelValue: [String, Array, Boolean, Number, Symbol],
464
+ /**
465
+ * Input name
466
+ */
467
+ name: { type: String, required: true },
468
+ /**
469
+ * If true, the group will be displayed in a vertical column
470
+ */
471
+ vertical: Boolean
472
+ };
473
+ const ActionProps = {
474
+ ...DisabledProps,
475
+ ...LabelProps,
476
+ ...PressedProps,
477
+ ...ActiveProps,
478
+ ...LinkProps,
479
+ /**
480
+ * Button type
481
+ */
482
+ type: {
483
+ type: String,
484
+ default: ButtonType.button,
485
+ validator: (value) => Object.values(ButtonType).includes(value)
486
+ }
487
+ };
488
+ function equals(obj1, obj2, field) {
489
+ if (field)
490
+ return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
491
+ else
492
+ return deepEquals(obj1, obj2);
493
+ }
494
+ function deepEquals(a, b) {
495
+ if (a === b)
496
+ return true;
497
+ if (a && b && typeof a == "object" && typeof b == "object") {
498
+ const arrA = Array.isArray(a);
499
+ const arrB = Array.isArray(b);
500
+ let i, length, key;
501
+ if (arrA && arrB) {
502
+ length = a.length;
503
+ if (length != b.length)
504
+ return false;
505
+ for (i = length; i-- !== 0; )
506
+ if (!deepEquals(a[i], b[i]))
507
+ return false;
508
+ return true;
509
+ }
510
+ if (arrA != arrB)
511
+ return false;
512
+ const dateA = a instanceof Date, dateB = b instanceof Date;
513
+ if (dateA != dateB)
514
+ return false;
515
+ if (dateA && dateB)
516
+ return a.getTime() == b.getTime();
517
+ const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
518
+ if (regexpA != regexpB)
519
+ return false;
520
+ if (regexpA && regexpB)
521
+ return a.toString() == b.toString();
522
+ const keys = Object.keys(a);
523
+ length = keys.length;
524
+ if (length !== Object.keys(b).length)
525
+ return false;
526
+ for (i = length; i-- !== 0; )
527
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
528
+ return false;
529
+ for (i = length; i-- !== 0; ) {
530
+ key = keys[i];
531
+ if (!deepEquals(a[key], b[key]))
532
+ return false;
533
+ }
534
+ return true;
535
+ }
536
+ return a !== a && b !== b;
537
+ }
538
+ function resolveFieldData(data, field) {
539
+ if (data && Object.keys(data).length && field) {
540
+ if (field.indexOf(".") === -1) {
541
+ return data[field];
542
+ } else {
543
+ const fields = field.split(".");
544
+ let value = data;
545
+ for (let i = 0, len = fields.length; i < len; ++i) {
546
+ if (data == null) {
547
+ return null;
548
+ }
549
+ value = value[fields[i]];
550
+ }
551
+ return value;
552
+ }
553
+ } else {
554
+ return null;
555
+ }
556
+ }
557
+ function findIndexInList(value, list) {
558
+ let index = -1;
559
+ if (list) {
560
+ for (let i = 0; i < list.length; i++) {
561
+ if (equals(list[i], value)) {
562
+ index = i;
563
+ break;
564
+ }
565
+ }
566
+ }
567
+ return index;
568
+ }
569
+ function contains(value, list) {
570
+ if (value != null && list && list.length) {
571
+ for (const val of list) {
572
+ if (equals(value, val)) {
573
+ return true;
574
+ }
575
+ }
576
+ }
577
+ return false;
578
+ }
579
+ function isEmpty(value) {
580
+ 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));
581
+ }
582
+ function removeFromList(value, list) {
583
+ const indexElToRemove = findIndexInList(value, list);
584
+ if (indexElToRemove > -1) {
585
+ return list.filter((el, elIndex) => elIndex !== indexElToRemove);
586
+ } else {
587
+ return list;
588
+ }
589
+ }
590
+ function isString(value) {
591
+ return typeof value === "string" || value instanceof String;
592
+ }
593
+ function useInjectedGroupState(groupKey) {
594
+ const group = inject(groupKey, void 0);
595
+ const isInGroup = computed(() => !isEmpty(group));
596
+ function getGroupOrLocalRef(propName, props, emit) {
597
+ if (group == null ? void 0 : group.value) {
598
+ const groupPropValue = unref(group.value)[propName];
599
+ return computed({
600
+ get() {
601
+ return groupPropValue == null ? void 0 : groupPropValue.value;
602
+ },
603
+ set(value) {
604
+ groupPropValue.value = value;
605
+ }
606
+ });
607
+ }
608
+ const propRef = toRef(props, propName);
609
+ return computed({
610
+ get() {
611
+ return propRef.value;
612
+ },
613
+ set(value) {
614
+ if (emit)
615
+ emit(`update:${propName}`, value);
616
+ }
617
+ });
618
+ }
619
+ return {
620
+ group,
621
+ isInGroup,
622
+ getGroupOrLocalRef
623
+ };
624
+ }
625
+ const VvAccordionProps = {
626
+ ...ModifiersProps,
627
+ /**
628
+ * Accordion name
629
+ */
630
+ name: String,
631
+ /**
632
+ * Header title
633
+ */
634
+ title: String,
635
+ /**
636
+ * Content text
637
+ */
638
+ content: String,
639
+ /**
640
+ * (Optional) Defines if item is open. Event "update:modelValue" is emitted on accordion header click
641
+ */
642
+ modelValue: {
643
+ type: Boolean,
644
+ default: void 0
645
+ },
646
+ /**
647
+ * If true, the accordion will be disabled
648
+ */
649
+ disabled: Boolean,
650
+ /**
651
+ * If true, the accordion will be opened by default
652
+ */
653
+ not: Boolean
654
+ };
655
+ const VvAccordionEvents = ["update:modelValue"];
656
+ function useGroupProps$3(props, emit) {
657
+ const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(
658
+ INJECTION_KEY_ACCORDION_GROUP
659
+ );
660
+ const { title, content } = toRefs(props);
661
+ const modelValue = getGroupOrLocalRef("modelValue", props, emit);
662
+ const not = getGroupOrLocalRef("not", props);
663
+ const collapse = getGroupOrLocalRef("collapse", props);
664
+ const disabled = computed(
665
+ () => {
666
+ var _a;
667
+ return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
668
+ }
669
+ );
670
+ const modifiers = computed(() => {
671
+ let localModifiers = props.modifiers;
672
+ let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
673
+ const toReturn = /* @__PURE__ */ new Set();
674
+ if (localModifiers) {
675
+ if (!Array.isArray(localModifiers)) {
676
+ localModifiers = localModifiers.split(" ");
677
+ }
678
+ localModifiers.forEach((modifier) => toReturn.add(modifier));
679
+ }
680
+ if (groupModifiers) {
681
+ if (!Array.isArray(groupModifiers)) {
682
+ groupModifiers = groupModifiers.split(" ");
683
+ }
684
+ groupModifiers.forEach((modifier) => toReturn.add(modifier));
685
+ }
686
+ return Array.from(toReturn);
687
+ });
688
+ return {
689
+ // group props
690
+ modelValue,
691
+ not,
692
+ isInGroup,
693
+ group,
694
+ collapse,
695
+ modifiers,
696
+ disabled,
697
+ // local props
698
+ title,
699
+ content
700
+ };
701
+ }
702
+ function useModifiers(prefix, modifiers, others) {
703
+ return computed(() => {
704
+ const toReturn = {
705
+ [prefix]: true
706
+ };
707
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
708
+ if (modifiersArray) {
709
+ if (Array.isArray(modifiersArray)) {
710
+ modifiersArray.forEach((modifier) => {
711
+ if (modifier) {
712
+ toReturn[`${prefix}--${modifier}`] = true;
713
+ }
714
+ });
715
+ }
716
+ }
717
+ if (others) {
718
+ Object.keys(others.value).forEach((key) => {
719
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
720
+ });
721
+ }
722
+ return toReturn;
723
+ });
724
+ }
725
+ const _hoisted_1$f = ["id", "open"];
726
+ const _hoisted_2$c = ["aria-controls", "aria-expanded"];
727
+ const _hoisted_3$6 = ["aria-hidden"];
728
+ const __default__$m = {
729
+ name: "VvAccordion"
730
+ };
731
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
732
+ ...__default__$m,
733
+ props: VvAccordionProps,
734
+ emits: VvAccordionEvents,
735
+ setup(__props, { emit }) {
736
+ const props = __props;
737
+ const attrs = useAttrs();
738
+ const accordionName = computed(
739
+ () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
740
+ );
741
+ const {
742
+ modifiers,
743
+ title,
744
+ content,
745
+ disabled,
746
+ collapse,
747
+ modelValue,
748
+ isInGroup,
749
+ not
750
+ } = useGroupProps$3(props, emit);
751
+ const localModelValue = ref(false);
752
+ const isOpen = computed({
753
+ get: () => {
754
+ let toReturn = modelValue.value;
755
+ if (isInGroup.value) {
756
+ if (collapse.value && Array.isArray(modelValue.value)) {
757
+ toReturn = modelValue.value.includes(accordionName.value);
758
+ } else {
759
+ toReturn = modelValue.value === accordionName.value;
760
+ }
761
+ } else if (modelValue.value === void 0) {
762
+ toReturn = localModelValue.value;
763
+ }
764
+ return not.value ? !toReturn : toReturn;
765
+ },
766
+ set: (newValue) => {
767
+ if (not.value) {
768
+ newValue = !newValue;
769
+ }
770
+ if (isInGroup.value) {
771
+ if (collapse.value && Array.isArray(modelValue.value)) {
772
+ if (newValue) {
773
+ modelValue.value.push(accordionName.value);
774
+ return;
775
+ }
776
+ modelValue.value = modelValue.value.filter(
777
+ (name) => name !== accordionName.value
778
+ );
779
+ return;
780
+ }
781
+ modelValue.value = newValue ? accordionName.value : null;
782
+ return;
783
+ }
784
+ if (modelValue.value === void 0 && typeof newValue === "boolean") {
785
+ localModelValue.value = newValue;
786
+ return;
787
+ }
788
+ modelValue.value = newValue;
789
+ }
790
+ });
791
+ const bemCssClasses = useModifiers(
792
+ "vv-accordion",
793
+ modifiers,
794
+ computed(() => ({
795
+ disabled: disabled.value
796
+ }))
797
+ );
798
+ const onClick = useToggle(isOpen);
799
+ return (_ctx, _cache) => {
800
+ return openBlock(), createElementBlock("details", {
801
+ id: unref(accordionName),
802
+ class: normalizeClass(unref(bemCssClasses)),
803
+ open: unref(isOpen)
804
+ }, [
805
+ createElementVNode("summary", {
806
+ "aria-controls": unref(accordionName),
807
+ "aria-expanded": unref(isOpen),
808
+ class: "vv-accordion__summary",
809
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
810
+ }, [
811
+ renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
812
+ createTextVNode(toDisplayString(unref(title)), 1)
813
+ ])
814
+ ], 8, _hoisted_2$c),
815
+ createElementVNode("div", {
816
+ "aria-hidden": !unref(isOpen),
817
+ class: "vv-accordion__content"
818
+ }, [
819
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
820
+ createTextVNode(toDisplayString(unref(content)), 1)
821
+ ])
822
+ ], 8, _hoisted_3$6)
823
+ ], 10, _hoisted_1$f);
824
+ };
825
+ }
826
+ });
827
+ const VvAccordionGroupProps = {
828
+ ...ModifiersProps,
829
+ /**
830
+ * VModel
786
831
  */
787
- autoPlacement: {
788
- type: [Boolean, Object],
789
- default: false
790
- },
832
+ modelValue: [String, Array],
791
833
  /**
792
- * Add arrow to the dropdown
793
- * @see https://floating-ui.com/docs/arrow
834
+ * Accordion items
835
+ * @type VvAccordionGroupItem
794
836
  */
795
- arrow: {
796
- type: Boolean,
797
- default: false
837
+ items: {
838
+ type: Array,
839
+ default: () => []
798
840
  },
799
841
  /**
800
- * Close dropdown on click outside
842
+ * If true, accordion items stay open when another item is opened
801
843
  */
802
- autoClose: {
803
- type: Boolean,
804
- default: true
805
- },
844
+ collapse: Boolean,
806
845
  /**
807
- * Autofocus first item on dropdown open
846
+ * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
808
847
  */
809
- autofocusFirst: {
810
- type: Boolean,
811
- default: true
848
+ itemModifiers: {
849
+ type: [String, Array],
850
+ default: ""
812
851
  },
813
852
  /**
814
- * Set dropdown width to the same as the trigger
815
- */
816
- triggerWidth: {
817
- type: Boolean
818
- }
819
- };
820
- const IdNameProps = {
821
- ...IdProps,
822
- /**
823
- * Input / Textarea name
824
- * Name of the form control. Submitted with the form as part of a name/value pair
825
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
826
- */
827
- name: { type: String, required: true }
828
- };
829
- const AutofocusProps = {
830
- /**
831
- * Global attribute autofocus
832
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
833
- */
834
- autofocus: Boolean
835
- };
836
- const AutocompleteProps = {
837
- /**
838
- * Global attribute autocomplete
839
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
840
- */
841
- autocomplete: { type: String, default: "off" }
842
- };
843
- const InputTextareaProps = {
844
- ...IdNameProps,
845
- ...AutofocusProps,
846
- ...AutocompleteProps,
847
- ...TabindexProps,
848
- ...DisabledProps,
849
- ...ReadonlyProps,
850
- ...ValidProps,
851
- ...InvalidProps,
852
- ...HintProps,
853
- ...LoadingProps,
854
- ...ModifiersProps,
855
- ...CountProps,
856
- ...DebounceProps,
857
- ...IconProps,
858
- ...FloatingLabelProps,
859
- ...LabelProps,
860
- /**
861
- * Input / Textarea minlength
862
- * Minimum length (number of characters) of value
863
- * Available for input types: text, search, url, tel, email, password
864
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
865
- */
866
- minlength: [String, Number],
867
- /**
868
- * Input / Textarea maxlength
869
- * Maximum length (number of characters) of value
870
- * Available for input types: text, search, url, tel, email, password
871
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
872
- */
873
- maxlength: [String, Number],
874
- /**
875
- * Input / Textarea placeholder
876
- * Text that appears in the form control when it has no value set
877
- * Available for input types: text, search, url, tel, email, password, number
878
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
879
- */
880
- placeholder: String,
881
- /**
882
- * Input / Textarea required
883
- * A value is required or must be check for the form to be submittable
884
- * Available for all input types except color
885
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
853
+ * If true, the accordion items will be disabled
886
854
  */
887
- required: Boolean
888
- };
889
- const CheckboxRadioProps = {
890
- ...IdNameProps,
891
- ...TabindexProps,
892
- ...ValidProps,
893
- ...InvalidProps,
894
- ...HintProps,
895
- ...DisabledProps,
896
- ...ReadonlyProps,
897
- ...ModifiersProps,
898
- ...LabelProps,
855
+ disabled: Boolean,
899
856
  /**
900
- * Input value
901
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
857
+ * If true, the accordion items will be opened by default
902
858
  */
903
- value: [String, Number, Boolean],
859
+ not: Boolean,
904
860
  /**
905
- * Input value
861
+ * Enable local storage persistence
906
862
  */
907
- modelValue: [Object, Number, Boolean, String]
863
+ storeKey: String
908
864
  };
909
- const CheckboxRadioGroupProps = {
910
- ...ValidProps,
911
- ...InvalidProps,
912
- ...OptionsProps,
913
- ...HintProps,
914
- ...DisabledProps,
915
- ...ReadonlyProps,
916
- ...ModifiersProps,
917
- ...LabelProps,
918
- /**
919
- * Input value
920
- */
921
- modelValue: [String, Array, Boolean, Number, Symbol],
922
- /**
923
- * Input name
924
- */
925
- name: { type: String, required: true },
926
- /**
927
- * If true, the group will be displayed in a vertical column
928
- */
929
- vertical: Boolean
865
+ const VvAccordionGroupEvents = ["update:modelValue"];
866
+ function useProvideGroupState(groupState) {
867
+ if (Object.keys(groupState).some(
868
+ (k) => k !== "key" && !isRef(groupState[k])
869
+ ))
870
+ throw Error("One or more groupState props aren't ref.");
871
+ provide(
872
+ groupState.key,
873
+ computed(() => groupState)
874
+ );
875
+ }
876
+ const __default__$l = {
877
+ name: "VvAccordionGroup"
930
878
  };
931
- const ActionProps = {
932
- ...DisabledProps,
933
- ...LabelProps,
934
- ...PressedProps,
935
- ...ActiveProps,
936
- ...LinkProps,
937
- /**
938
- * Button type
939
- */
940
- type: {
941
- type: String,
942
- default: ButtonType.button,
943
- validator: (value) => Object.values(ButtonType).includes(value)
879
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
880
+ ...__default__$l,
881
+ props: VvAccordionGroupProps,
882
+ emits: VvAccordionGroupEvents,
883
+ setup(__props, { emit }) {
884
+ const props = __props;
885
+ const { disabled, collapse, modifiers, itemModifiers, items, not } = toRefs(props);
886
+ watchEffect(() => {
887
+ if (typeof props.modelValue === "string" && collapse.value) {
888
+ console.warn(
889
+ `[VvAccordionGroup]: modelValue is a string but collapse is true.`
890
+ );
891
+ }
892
+ });
893
+ let localModelValue = ref([]);
894
+ watch(
895
+ () => props.storeKey,
896
+ (newKey) => {
897
+ if (newKey) {
898
+ localModelValue = useStorage(newKey, localModelValue.value);
899
+ } else {
900
+ localModelValue = ref([]);
901
+ }
902
+ },
903
+ { immediate: true }
904
+ );
905
+ const modelValue = computed({
906
+ get: () => {
907
+ var _a;
908
+ if (props.modelValue !== void 0) {
909
+ if (!collapse.value) {
910
+ return Array.isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
911
+ }
912
+ return props.modelValue;
913
+ }
914
+ return !collapse.value ? (_a = localModelValue.value) == null ? void 0 : _a[0] : localModelValue.value;
915
+ },
916
+ set: (newValue) => {
917
+ if (props.modelValue !== void 0) {
918
+ if ((Array.isArray(props.modelValue) || collapse.value) && !Array.isArray(newValue)) {
919
+ newValue = [newValue];
920
+ }
921
+ return emit("update:modelValue", newValue);
922
+ }
923
+ localModelValue.value = Array.isArray(newValue) ? newValue : [newValue];
924
+ }
925
+ });
926
+ useProvideGroupState({
927
+ key: INJECTION_KEY_ACCORDION_GROUP,
928
+ modelValue,
929
+ disabled,
930
+ collapse,
931
+ modifiers: itemModifiers,
932
+ not
933
+ });
934
+ const bemCssClasses = useModifiers(
935
+ "vv-accordion-group",
936
+ modifiers,
937
+ computed(() => ({
938
+ disabled: disabled.value
939
+ }))
940
+ );
941
+ return (_ctx, _cache) => {
942
+ return openBlock(), createElementBlock("div", {
943
+ class: normalizeClass(unref(bemCssClasses))
944
+ }, [
945
+ renderSlot(_ctx.$slots, "default", {}, () => [
946
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
947
+ return openBlock(), createBlock(_sfc_main$m, mergeProps({
948
+ key: item.title
949
+ }, {
950
+ name: item.name,
951
+ title: item.title,
952
+ content: item.content
953
+ }), {
954
+ header: withCtx((data) => [
955
+ renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
956
+ ]),
957
+ details: withCtx((data) => [
958
+ renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
959
+ ]),
960
+ _: 2
961
+ }, 1040);
962
+ }), 128))
963
+ ])
964
+ ], 2);
965
+ };
944
966
  }
945
- };
967
+ });
946
968
  const VvBadgeProps = {
947
969
  ...ModifiersProps,
948
970
  value: [String, Number]
@@ -1116,7 +1138,7 @@ const VvIconProps = {
1116
1138
  svg: String,
1117
1139
  /**
1118
1140
  * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
1119
- * @values string | Array<string>
1141
+ * @values string | string[]
1120
1142
  */
1121
1143
  modifiers: {
1122
1144
  type: [String, Array]
@@ -1133,6 +1155,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1133
1155
  props: VvIconProps,
1134
1156
  setup(__props) {
1135
1157
  const props = __props;
1158
+ const hasRotate = computed(() => {
1159
+ if (typeof props.rotate === "string") {
1160
+ return parseFloat(props.rotate);
1161
+ }
1162
+ return props.rotate;
1163
+ });
1136
1164
  const show = ref(true);
1137
1165
  const volver = useVolver();
1138
1166
  const { modifiers } = toRefs(props);
@@ -1141,25 +1169,24 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1141
1169
  return props.provider || (volver == null ? void 0 : volver.iconsProvider);
1142
1170
  });
1143
1171
  const icon = computed(() => {
1144
- const _name = props.name ?? "";
1145
- const iconName = `@${provider.value}:${props.prefix}:${props.name}`;
1146
- if (iconExists(_name)) {
1147
- return _name;
1148
- } else if (iconExists(iconName)) {
1172
+ const name = props.name ?? "";
1173
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
1174
+ if (iconExists(iconName)) {
1149
1175
  return iconName;
1150
- } else {
1151
- return (volver == null ? void 0 : volver.iconsCollections.find(
1152
- (iconsCollection) => {
1153
- const icon2 = `@${provider.value}:${iconsCollection.prefix}:${_name}`;
1154
- if (iconExists(icon2)) {
1155
- return icon2;
1156
- }
1157
- }
1158
- )) || _name;
1159
1176
  }
1177
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
1178
+ (iconsCollection2) => {
1179
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
1180
+ return iconExists(icon2);
1181
+ }
1182
+ );
1183
+ if (iconsCollection) {
1184
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
1185
+ }
1186
+ return name;
1160
1187
  });
1161
1188
  function getSvgContent(svg) {
1162
- let dom = null;
1189
+ let dom;
1163
1190
  if (typeof window === "undefined") {
1164
1191
  const { JSDOM } = require("jsdom");
1165
1192
  dom = new JSDOM().window;
@@ -1190,12 +1217,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1190
1217
  show.value = true;
1191
1218
  }
1192
1219
  }).catch((e) => {
1193
- throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
1220
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
1194
1221
  });
1195
- } else if (props.svg) {
1196
- addIconFromSvg(props.svg);
1197
1222
  }
1198
1223
  }
1224
+ if (props.svg) {
1225
+ addIconFromSvg(props.svg);
1226
+ }
1199
1227
  return (_ctx, _cache) => {
1200
1228
  return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
1201
1229
  key: 0,
@@ -1207,7 +1235,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1207
1235
  horizontalFlip: _ctx.horizontalFlip,
1208
1236
  verticalFlip: _ctx.verticalFlip,
1209
1237
  flip: _ctx.flip,
1210
- rotate: _ctx.rotate,
1238
+ rotate: unref(hasRotate),
1211
1239
  color: _ctx.color,
1212
1240
  onLoad: _ctx.onLoad,
1213
1241
  icon: unref(icon)
@@ -1233,11 +1261,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1233
1261
  ...__default__$h,
1234
1262
  props: VvActionProps,
1235
1263
  emits: VvActionEvents,
1236
- setup(__props, { expose, emit }) {
1264
+ setup(__props, { expose: __expose, emit }) {
1237
1265
  const props = __props;
1238
1266
  const volver = useVolver();
1239
1267
  const element = ref(null);
1240
- expose({ $el: element });
1268
+ __expose({ $el: element });
1241
1269
  const {
1242
1270
  reference: dropdownTriggerReference,
1243
1271
  bus: dropdownEventBus,
@@ -1272,7 +1300,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1272
1300
  const toReturn = {
1273
1301
  ...dropdownAria == null ? void 0 : dropdownAria.value,
1274
1302
  "aria-pressed": pressed.value ? true : void 0,
1275
- role
1303
+ role: role == null ? void 0 : role.value
1276
1304
  };
1277
1305
  switch (hasTag.value) {
1278
1306
  case ActionTag.a:
@@ -1359,22 +1387,38 @@ const VvButtonProps = {
1359
1387
  * Loading icon
1360
1388
  */
1361
1389
  loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
1390
+ /**
1391
+ * Enable button toggle
1392
+ */
1362
1393
  toggle: {
1363
1394
  type: Boolean,
1364
1395
  default: false
1365
1396
  },
1366
- modelValue: String
1397
+ /**
1398
+ * Button toggle value
1399
+ */
1400
+ value: {
1401
+ type: [String, Number, Boolean],
1402
+ default: void 0
1403
+ },
1404
+ /**
1405
+ * Value associated with the unchecked state
1406
+ */
1407
+ uncheckedValue: {
1408
+ type: [String, Number, Boolean],
1409
+ default: void 0
1410
+ },
1411
+ /**
1412
+ * Button toggle model value
1413
+ */
1414
+ modelValue: {
1415
+ type: [String, Number, Boolean],
1416
+ default: void 0
1417
+ }
1367
1418
  };
1368
1419
  function useGroupProps$2(props, emit) {
1369
1420
  const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_BUTTON_GROUP);
1370
- const {
1371
- id,
1372
- iconPosition,
1373
- icon,
1374
- label,
1375
- pressed,
1376
- modifiers: localModifiers
1377
- } = toRefs(props);
1421
+ const { id, iconPosition, icon, label, pressed } = toRefs(props);
1378
1422
  const modelValue = getGroupOrLocalRef("modelValue", props, emit);
1379
1423
  const toggle = getGroupOrLocalRef("toggle", props);
1380
1424
  const unselectable = getGroupOrLocalRef(
@@ -1383,10 +1427,22 @@ function useGroupProps$2(props, emit) {
1383
1427
  );
1384
1428
  const multiple = computed(() => (group == null ? void 0 : group.value.multiple.value) ?? false);
1385
1429
  const modifiers = computed(() => {
1386
- var _a;
1387
- const localValue = (localModifiers == null ? void 0 : localModifiers.value) ? Array.isArray(localModifiers.value) ? localModifiers.value : localModifiers.value.split(" ") : [];
1388
- const groupValue = ((_a = group == null ? void 0 : group.value.itemModifiers) == null ? void 0 : _a.value) ? Array.isArray(group.value.itemModifiers.value) ? group.value.itemModifiers.value : group.value.itemModifiers.value.split(" ") : [];
1389
- return [...localValue, ...groupValue];
1430
+ let localModifiers = props.modifiers;
1431
+ let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
1432
+ const toReturn = /* @__PURE__ */ new Set();
1433
+ if (localModifiers) {
1434
+ if (!Array.isArray(localModifiers)) {
1435
+ localModifiers = localModifiers.split(" ");
1436
+ }
1437
+ localModifiers.forEach((modifier) => toReturn.add(modifier));
1438
+ }
1439
+ if (groupModifiers) {
1440
+ if (!Array.isArray(groupModifiers)) {
1441
+ groupModifiers = groupModifiers.split(" ");
1442
+ }
1443
+ groupModifiers.forEach((modifier) => toReturn.add(modifier));
1444
+ }
1445
+ return Array.from(toReturn);
1390
1446
  });
1391
1447
  const disabled = computed(
1392
1448
  () => {
@@ -1428,7 +1484,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1428
1484
  ...__default__$g,
1429
1485
  props: VvButtonProps,
1430
1486
  emits: VvButtonEvents,
1431
- setup(__props, { expose, emit }) {
1487
+ setup(__props, { expose: __expose, emit }) {
1432
1488
  const props = __props;
1433
1489
  const attrs = useAttrs();
1434
1490
  const slots = useSlots();
@@ -1450,7 +1506,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1450
1506
  var _a;
1451
1507
  return (_a = element.value) == null ? void 0 : _a.$el;
1452
1508
  });
1453
- expose({ $el });
1509
+ __expose({ $el });
1454
1510
  const pressed = computed(() => {
1455
1511
  if (!toggle.value) {
1456
1512
  return props.pressed;
@@ -1478,25 +1534,28 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1478
1534
  const hasIconProps = computed(
1479
1535
  () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
1480
1536
  );
1537
+ const toggleValue = computed(() => {
1538
+ return props.value !== void 0 ? props.value : name.value;
1539
+ });
1481
1540
  const onClick = () => {
1482
1541
  if (toggle.value) {
1483
1542
  if (Array.isArray(modelValue.value)) {
1484
- if (contains(name.value, modelValue.value)) {
1543
+ if (contains(toggleValue.value, modelValue.value)) {
1485
1544
  if (unselectable.value) {
1486
1545
  modelValue.value = modelValue.value.filter(
1487
- (n) => n !== name.value
1546
+ (n) => n !== toggleValue.value
1488
1547
  );
1489
1548
  }
1490
1549
  return;
1491
1550
  }
1492
- modelValue.value.push(name.value);
1551
+ modelValue.value.push(toggleValue.value);
1493
1552
  return;
1494
1553
  }
1495
- if (equals(name.value, modelValue.value) && unselectable.value) {
1496
- modelValue.value = void 0;
1554
+ if (toggleValue.value === modelValue.value && unselectable.value) {
1555
+ modelValue.value = props.uncheckedValue;
1497
1556
  return;
1498
1557
  }
1499
- modelValue.value = name.value;
1558
+ modelValue.value = toggleValue.value;
1500
1559
  }
1501
1560
  };
1502
1561
  return (_ctx, _cache) => {
@@ -1552,10 +1611,16 @@ const VvButtonGroupProps = {
1552
1611
  /**
1553
1612
  * String or String[] of css classes (modifiers) that will be provided to each button'
1554
1613
  */
1555
- itemModifiers: { type: [String, Array], default: void 0 },
1614
+ itemModifiers: {
1615
+ type: [String, Array],
1616
+ default: ""
1617
+ },
1556
1618
  toggle: { type: Boolean, default: false },
1557
1619
  multiple: { type: Boolean, default: false },
1558
- modelValue: { type: [String, Array], default: void 0 }
1620
+ modelValue: {
1621
+ type: [String, Number, Boolean, Array],
1622
+ default: void 0
1623
+ }
1559
1624
  };
1560
1625
  const VvButtonGroupEvents = ["update:modelValue"];
1561
1626
  const __default__$f = {
@@ -1591,7 +1656,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1591
1656
  },
1592
1657
  set: (newValue) => {
1593
1658
  if (newValue !== void 0 && (Array.isArray(props.modelValue) || multiple.value) && !Array.isArray(newValue)) {
1594
- newValue = [newValue];
1659
+ return emit("update:modelValue", [newValue]);
1595
1660
  }
1596
1661
  return emit("update:modelValue", newValue);
1597
1662
  }
@@ -1603,7 +1668,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1603
1668
  toggle,
1604
1669
  multiple,
1605
1670
  unselectable,
1606
- itemModifiers
1671
+ modifiers: itemModifiers
1607
1672
  });
1608
1673
  const bemCssClasses = useModifiers("vv-button-group", modifiers);
1609
1674
  return (_ctx, _cache) => {
@@ -1617,8 +1682,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1617
1682
  }
1618
1683
  });
1619
1684
  const VvCardProps = {
1620
- title: String,
1621
- modifiers: [String, Array]
1685
+ ...ModifiersProps,
1686
+ title: String
1622
1687
  };
1623
1688
  const _hoisted_1$c = {
1624
1689
  key: 0,
@@ -1712,115 +1777,118 @@ function useGroupProps$1(props, emit) {
1712
1777
  disabled
1713
1778
  };
1714
1779
  }
1715
- function joinLines(errors) {
1716
- if (Array.isArray(errors)) {
1717
- return errors.filter((e) => isString(e)).join(" ");
1780
+ function joinLines(items) {
1781
+ if (Array.isArray(items)) {
1782
+ return items.filter((item) => isString(item)).join(" ");
1718
1783
  }
1719
- return errors;
1784
+ return items;
1720
1785
  }
1721
- function HintSlotFactory(parentProps, parentSlots) {
1722
- const {
1723
- invalid: invalidSlot,
1724
- valid: validSlot,
1725
- hint: hintSlot,
1726
- loading: loadingSlot
1727
- } = parentSlots;
1728
- const {
1729
- hintLabel,
1730
- modelValue,
1731
- valid,
1732
- validLabel,
1733
- invalid,
1734
- invalidLabel,
1735
- ...otherProps
1736
- } = toRefs(parentProps);
1737
- const loading = resolveFieldData(otherProps, "loading");
1738
- const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
1739
- const hasInvalid = computed(() => {
1740
- if (!invalid.value) {
1741
- return false;
1742
- }
1743
- if (invalid.value && invalidSlot) {
1744
- return true;
1745
- }
1746
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
1747
- return true;
1748
- }
1749
- if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
1750
- return true;
1751
- }
1752
- return false;
1753
- });
1754
- const hasHint = computed(
1755
- () => !!(hintLabel && hintLabel.value || hintSlot)
1786
+ function HintSlotFactory(props, slots) {
1787
+ const invalidLabel = computed(() => joinLines(props.invalidLabel));
1788
+ const validLabel = computed(() => joinLines(props.validLabel));
1789
+ const loadingLabel = computed(() => props.loadingLabel);
1790
+ const hintLabel = computed(() => props.hintLabel);
1791
+ const hasLoadingLabelOrSlot = computed(
1792
+ () => Boolean(props.loading && (slots.loading || loadingLabel.value))
1793
+ );
1794
+ const hasInvalidLabelOrSlot = computed(
1795
+ () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
1756
1796
  );
1757
- const hasValid = computed(
1758
- () => !!(validLabel && validLabel.value || validSlot)
1797
+ const hasValidLabelOrSlot = computed(
1798
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
1759
1799
  );
1760
- const hasLoading = computed(
1761
- () => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
1800
+ const hasHintLabelOrSlot = computed(
1801
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
1762
1802
  );
1763
1803
  const isVisible = computed(
1764
- () => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
1804
+ () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
1765
1805
  );
1766
- return {
1767
- hasInvalid,
1768
- hasHint,
1769
- hasValid,
1770
- hasLoading,
1771
- HintSlot: {
1772
- name: "HintSlot",
1773
- props: {
1774
- params: {
1775
- type: Object,
1776
- default: () => ({})
1806
+ const hintSlotScope = computed(() => ({
1807
+ modelValue: props.modelValue,
1808
+ valid: props.valid,
1809
+ invalid: props.invalid,
1810
+ loading: props.loading
1811
+ }));
1812
+ const HintSlot = defineComponent({
1813
+ name: "HintSlot",
1814
+ props: {
1815
+ tag: {
1816
+ type: String,
1817
+ default: "small"
1818
+ }
1819
+ },
1820
+ setup() {
1821
+ return {
1822
+ isVisible,
1823
+ invalidLabel,
1824
+ validLabel,
1825
+ loadingLabel,
1826
+ hintLabel,
1827
+ hasInvalidLabelOrSlot,
1828
+ hasValidLabelOrSlot,
1829
+ hasLoadingLabelOrSlot,
1830
+ hasHintLabelOrSlot
1831
+ };
1832
+ },
1833
+ render() {
1834
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1835
+ if (this.isVisible) {
1836
+ let role;
1837
+ if (this.hasInvalidLabelOrSlot) {
1838
+ role = "alert";
1777
1839
  }
1778
- },
1779
- setup(props) {
1780
- const hintContent = computed(() => {
1781
- const slotProps = toReactive({
1782
- hintLabel,
1783
- modelValue,
1784
- valid,
1785
- validLabel,
1786
- invalid,
1787
- invalidLabel,
1788
- loading,
1789
- loadingLabel,
1790
- ...props.params
1791
- });
1792
- if (invalid == null ? void 0 : invalid.value) {
1793
- return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1794
- }
1795
- if (valid == null ? void 0 : valid.value)
1796
- return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1797
- if (loading == null ? void 0 : loading.value)
1798
- return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1799
- return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
1800
- });
1801
- return {
1802
- isVisible,
1803
- hasInvalid,
1804
- hasValid,
1805
- hintContent
1806
- };
1807
- },
1808
- render() {
1809
- if (this.isVisible) {
1840
+ if (this.hasValidLabelOrSlot) {
1841
+ role = "status";
1842
+ }
1843
+ if (this.hasLoadingLabelOrSlot) {
1844
+ return h(
1845
+ this.tag,
1846
+ {
1847
+ role
1848
+ },
1849
+ ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
1850
+ );
1851
+ }
1852
+ if (this.hasInvalidLabelOrSlot) {
1853
+ return h(
1854
+ this.tag,
1855
+ {
1856
+ role
1857
+ },
1858
+ ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
1859
+ );
1860
+ }
1861
+ if (this.hasValidLabelOrSlot) {
1810
1862
  return h(
1811
- "small",
1863
+ this.tag,
1812
1864
  {
1813
- role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
1865
+ role
1814
1866
  },
1815
- this.hintContent
1867
+ ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
1816
1868
  );
1817
1869
  }
1870
+ return h(
1871
+ this.tag,
1872
+ {
1873
+ role
1874
+ },
1875
+ ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
1876
+ );
1818
1877
  }
1878
+ return null;
1819
1879
  }
1880
+ });
1881
+ return {
1882
+ hasInvalidLabelOrSlot,
1883
+ hasHintLabelOrSlot,
1884
+ hasValidLabelOrSlot,
1885
+ hasLoadingLabelOrSlot,
1886
+ hintSlotScope,
1887
+ HintSlot
1820
1888
  };
1821
1889
  }
1822
1890
  const _hoisted_1$b = ["for"];
1823
- const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"];
1891
+ const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
1824
1892
  const __default__$d = {
1825
1893
  name: "VvCheckbox"
1826
1894
  };
@@ -1843,6 +1911,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1843
1911
  isInGroup
1844
1912
  } = useGroupProps$1(props, emit);
1845
1913
  const hasId = useUniqueId(id);
1914
+ const hasHintId = computed(() => `${hasId.value}-hint`);
1846
1915
  const tabindex = computed(() => isDisabled.value ? -1 : props.tabindex);
1847
1916
  const input = ref();
1848
1917
  const isBinary = computed(
@@ -1937,7 +2006,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1937
2006
  input.value.indeterminate = true;
1938
2007
  }
1939
2008
  });
1940
- const { HintSlot } = HintSlotFactory(props, slots);
2009
+ const {
2010
+ HintSlot,
2011
+ hasHintLabelOrSlot,
2012
+ hasInvalidLabelOrSlot,
2013
+ hintSlotScope
2014
+ } = HintSlotFactory(props, slots);
1941
2015
  return (_ctx, _cache) => {
1942
2016
  return openBlock(), createElementBlock("label", {
1943
2017
  class: normalizeClass(unref(bemCssClasses)),
@@ -1954,7 +2028,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1954
2028
  disabled: unref(isDisabled),
1955
2029
  value: unref(hasValue),
1956
2030
  tabindex: unref(tabindex),
1957
- "aria-invalid": unref(isInvalid)
2031
+ "aria-invalid": unref(isInvalid),
2032
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2033
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0
1958
2034
  }, null, 8, _hoisted_2$8), [
1959
2035
  [vModelCheckbox, unref(localModelValue)]
1960
2036
  ]),
@@ -1962,9 +2038,38 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1962
2038
  createTextVNode(toDisplayString(_ctx.label), 1)
1963
2039
  ]),
1964
2040
  createVNode(unref(HintSlot), {
1965
- class: "vv-checkbox__hint",
1966
- params: { value: unref(modelValue) }
1967
- }, null, 8, ["params"])
2041
+ id: unref(hasHintId),
2042
+ class: "vv-checkbox__hint"
2043
+ }, createSlots({ _: 2 }, [
2044
+ _ctx.$slots.hint ? {
2045
+ name: "hint",
2046
+ fn: withCtx(() => [
2047
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2048
+ ]),
2049
+ key: "0"
2050
+ } : void 0,
2051
+ _ctx.$slots.loading ? {
2052
+ name: "loading",
2053
+ fn: withCtx(() => [
2054
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2055
+ ]),
2056
+ key: "1"
2057
+ } : void 0,
2058
+ _ctx.$slots.valid ? {
2059
+ name: "valid",
2060
+ fn: withCtx(() => [
2061
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2062
+ ]),
2063
+ key: "2"
2064
+ } : void 0,
2065
+ _ctx.$slots.invalid ? {
2066
+ name: "invalid",
2067
+ fn: withCtx(() => [
2068
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2069
+ ]),
2070
+ key: "3"
2071
+ } : void 0
2072
+ ]), 1032, ["id"])
1968
2073
  ], 10, _hoisted_1$b);
1969
2074
  };
1970
2075
  }
@@ -1976,7 +2081,9 @@ function useOptions(props) {
1976
2081
  const getOptionLabel = (option) => {
1977
2082
  if (typeof option !== "object" && option !== null)
1978
2083
  return option;
1979
- return typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value];
2084
+ return String(
2085
+ typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value]
2086
+ );
1980
2087
  };
1981
2088
  const getOptionValue = (option) => {
1982
2089
  if (typeof option !== "object" && option !== null)
@@ -2043,7 +2150,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2043
2150
  value: getOptionValue(option)
2044
2151
  };
2045
2152
  };
2046
- const { HintSlot } = HintSlotFactory(props, slots);
2153
+ const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots);
2047
2154
  return (_ctx, _cache) => {
2048
2155
  return openBlock(), createElementBlock("fieldset", {
2049
2156
  class: normalizeClass(unref(bemCssClasses))
@@ -2057,7 +2164,36 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2057
2164
  return openBlock(), createBlock(_sfc_main$d, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
2058
2165
  }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
2059
2166
  ]),
2060
- createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" })
2167
+ createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" }, createSlots({ _: 2 }, [
2168
+ _ctx.$slots.hint ? {
2169
+ name: "hint",
2170
+ fn: withCtx(() => [
2171
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2172
+ ]),
2173
+ key: "0"
2174
+ } : void 0,
2175
+ _ctx.$slots.loading ? {
2176
+ name: "loading",
2177
+ fn: withCtx(() => [
2178
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2179
+ ]),
2180
+ key: "1"
2181
+ } : void 0,
2182
+ _ctx.$slots.valid ? {
2183
+ name: "valid",
2184
+ fn: withCtx(() => [
2185
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2186
+ ]),
2187
+ key: "2"
2188
+ } : void 0,
2189
+ _ctx.$slots.invalid ? {
2190
+ name: "invalid",
2191
+ fn: withCtx(() => [
2192
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2193
+ ]),
2194
+ key: "3"
2195
+ } : void 0
2196
+ ]), 1024)
2061
2197
  ], 2);
2062
2198
  };
2063
2199
  }
@@ -2180,11 +2316,17 @@ const VvComboboxProps = {
2180
2316
  /**
2181
2317
  * Open dropdown on focus
2182
2318
  */
2183
- autoOpen: Boolean,
2319
+ autoOpen: {
2320
+ type: Boolean,
2321
+ default: false
2322
+ },
2184
2323
  /**
2185
- * Close dropdown on select (not multiple)
2324
+ * Keep open dropdown on single select
2186
2325
  */
2187
- autoClose: Boolean
2326
+ keepOpen: {
2327
+ type: Boolean,
2328
+ default: false
2329
+ }
2188
2330
  };
2189
2331
  const VvDropdownProps = {
2190
2332
  ...IdProps,
@@ -2222,19 +2364,14 @@ function useProvideDropdownTrigger({
2222
2364
  const bus = mitt();
2223
2365
  const component = defineComponent({
2224
2366
  name: "VvDropdownTriggerProvider",
2225
- provide() {
2226
- return {
2227
- [INJECTION_KEY_DROPDOWN_TRIGGER]: {
2228
- reference,
2229
- id,
2230
- expanded,
2231
- aria,
2232
- bus
2233
- }
2234
- };
2235
- },
2236
2367
  setup() {
2237
- return {};
2368
+ provide(INJECTION_KEY_DROPDOWN_TRIGGER, {
2369
+ reference,
2370
+ id,
2371
+ expanded,
2372
+ aria,
2373
+ bus
2374
+ });
2238
2375
  },
2239
2376
  render() {
2240
2377
  var _a, _b;
@@ -2263,7 +2400,7 @@ function useProvideDropdownAction({
2263
2400
  expanded
2264
2401
  }) {
2265
2402
  provide(INJECTION_KEY_DROPDOWN_ACTION, {
2266
- role: ActionRoles.menuitem,
2403
+ role: ref(ActionRoles.menuitem),
2267
2404
  expanded
2268
2405
  });
2269
2406
  }
@@ -2275,8 +2412,14 @@ const __default__$b = {
2275
2412
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
2276
2413
  ...__default__$b,
2277
2414
  props: VvDropdownProps,
2278
- emits: ["update:modelValue"],
2279
- setup(__props, { expose, emit }) {
2415
+ emits: [
2416
+ "update:modelValue",
2417
+ "beforeExpand",
2418
+ "beforeCollapse",
2419
+ "afterExpand",
2420
+ "afterCollapse"
2421
+ ],
2422
+ setup(__props, { expose: __expose, emit }) {
2280
2423
  const props = __props;
2281
2424
  const { id } = toRefs(props);
2282
2425
  const hasId = useUniqueId(id);
@@ -2421,7 +2564,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2421
2564
  const init = (el) => {
2422
2565
  referenceEl.value = el;
2423
2566
  };
2424
- expose({ toggle, show, hide, init });
2567
+ __expose({ toggle, show, hide, init });
2425
2568
  watch(expanded, (newValue) => {
2426
2569
  if (newValue && props.autofocusFirst) {
2427
2570
  nextTick(() => {
@@ -2437,7 +2580,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2437
2580
  onClickOutside(
2438
2581
  floatingEl,
2439
2582
  () => {
2440
- if (props.autoClose) {
2583
+ if (!props.keepOpen) {
2441
2584
  expanded.value = false;
2442
2585
  }
2443
2586
  },
@@ -2546,6 +2689,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2546
2689
  activeElement.click();
2547
2690
  }
2548
2691
  });
2692
+ const onTransitionBeforeEnter = () => {
2693
+ emit(expanded.value ? "beforeExpand" : "beforeCollapse");
2694
+ };
2695
+ const onTransitionAfterLeave = () => {
2696
+ emit(expanded.value ? "afterExpand" : "afterCollapse");
2697
+ };
2549
2698
  return (_ctx, _cache) => {
2550
2699
  return openBlock(), createElementBlock(Fragment, null, [
2551
2700
  createVNode(unref(VvDropdownTriggerProvider), null, {
@@ -2554,7 +2703,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2554
2703
  ]),
2555
2704
  _: 3
2556
2705
  }),
2557
- createVNode(Transition, { name: _ctx.transitionName }, {
2706
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers({
2707
+ beforeEnter: onTransitionBeforeEnter,
2708
+ onAfterLeave: onTransitionAfterLeave
2709
+ })), {
2558
2710
  default: withCtx(() => [
2559
2711
  withDirectives(createElementVNode("div", {
2560
2712
  ref_key: "floatingEl",
@@ -2570,7 +2722,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2570
2722
  class: "vv-dropdown__arrow"
2571
2723
  }, null, 4)) : createCommentVNode("", true),
2572
2724
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
2573
- createElementVNode("ul", mergeProps(unref(attrs), {
2725
+ createElementVNode("div", mergeProps(unref(attrs), {
2574
2726
  id: unref(hasId),
2575
2727
  ref_key: "listEl",
2576
2728
  ref: listEl,
@@ -2589,7 +2741,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2589
2741
  ])
2590
2742
  ]),
2591
2743
  _: 3
2592
- }, 8, ["name"])
2744
+ }, 16, ["name"])
2593
2745
  ], 64);
2594
2746
  };
2595
2747
  }
@@ -2612,7 +2764,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2612
2764
  }
2613
2765
  });
2614
2766
  return (_ctx, _cache) => {
2615
- return openBlock(), createElementBlock("li", mergeProps({ role: unref(role) }, {
2767
+ return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
2616
2768
  ref_key: "element",
2617
2769
  ref: element,
2618
2770
  class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
@@ -2826,7 +2978,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2826
2978
  const props = __props;
2827
2979
  const slots = useSlots();
2828
2980
  const select = ref();
2829
- const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
2981
+ const {
2982
+ HintSlot,
2983
+ hasHintLabelOrSlot,
2984
+ hasInvalidLabelOrSlot,
2985
+ hintSlotScope
2986
+ } = HintSlotFactory(props, slots);
2830
2987
  const {
2831
2988
  id,
2832
2989
  modifiers,
@@ -2841,7 +2998,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2841
2998
  multiple
2842
2999
  } = toRefs(props);
2843
3000
  const hasId = useUniqueId(id);
2844
- const hasDescribedBy = computed(() => `${hasId.value}-hint`);
3001
+ const hasHintId = computed(() => `${hasId.value}-hint`);
2845
3002
  const { focused } = useComponentFocus(select, emit);
2846
3003
  const isVisible = useElementVisibility(select);
2847
3004
  watch(isVisible, (newValue) => {
@@ -2894,8 +3051,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2894
3051
  autocomplete: props.autocomplete,
2895
3052
  multiple: props.multiple,
2896
3053
  "aria-invalid": isInvalid.value,
2897
- "aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
2898
- "aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
3054
+ "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
3055
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
2899
3056
  };
2900
3057
  });
2901
3058
  const slotProps = computed(() => ({
@@ -2988,9 +3145,38 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2988
3145
  ])) : createCommentVNode("", true)
2989
3146
  ]),
2990
3147
  createVNode(unref(HintSlot), {
2991
- id: unref(hasDescribedBy),
3148
+ id: unref(hasHintId),
2992
3149
  class: "vv-select__hint"
2993
- }, null, 8, ["id"])
3150
+ }, createSlots({ _: 2 }, [
3151
+ _ctx.$slots.hint ? {
3152
+ name: "hint",
3153
+ fn: withCtx(() => [
3154
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3155
+ ]),
3156
+ key: "0"
3157
+ } : void 0,
3158
+ _ctx.$slots.loading ? {
3159
+ name: "loading",
3160
+ fn: withCtx(() => [
3161
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3162
+ ]),
3163
+ key: "1"
3164
+ } : void 0,
3165
+ _ctx.$slots.valid ? {
3166
+ name: "valid",
3167
+ fn: withCtx(() => [
3168
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3169
+ ]),
3170
+ key: "2"
3171
+ } : void 0,
3172
+ _ctx.$slots.invalid ? {
3173
+ name: "invalid",
3174
+ fn: withCtx(() => [
3175
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3176
+ ]),
3177
+ key: "3"
3178
+ } : void 0
3179
+ ]), 1032, ["id"])
2994
3180
  ], 2);
2995
3181
  };
2996
3182
  }
@@ -3050,13 +3236,13 @@ function useDefaults(componentName, propsDefinition, props) {
3050
3236
  }
3051
3237
  const _hoisted_1$5 = ["id"];
3052
3238
  const _hoisted_2$5 = ["id", "for"];
3053
- const _hoisted_3$3 = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"];
3239
+ const _hoisted_3$3 = ["id", "aria-controls", "placeholder"];
3054
3240
  const _hoisted_4$2 = {
3055
3241
  key: 0,
3056
3242
  class: "vv-select__input-before"
3057
3243
  };
3058
3244
  const _hoisted_5$2 = { class: "vv-select__inner" };
3059
- const _hoisted_6$2 = ["aria-labelledby", "tabindex"];
3245
+ const _hoisted_6$2 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
3060
3246
  const _hoisted_7$2 = ["aria-label", "onClick"];
3061
3247
  const _hoisted_8$1 = {
3062
3248
  key: 1,
@@ -3084,7 +3270,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3084
3270
  }
3085
3271
  return option.options && option.options.length > 0;
3086
3272
  };
3087
- const { HintSlot } = HintSlotFactory(props, slots);
3273
+ const {
3274
+ HintSlot,
3275
+ hasHintLabelOrSlot,
3276
+ hasInvalidLabelOrSlot,
3277
+ hintSlotScope
3278
+ } = HintSlotFactory(props, slots);
3088
3279
  const inputEl = ref(null);
3089
3280
  const inputSearchEl = ref(null);
3090
3281
  const wrapperEl = ref(null);
@@ -3132,19 +3323,18 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3132
3323
  return;
3133
3324
  expanded.value = false;
3134
3325
  };
3135
- watch(expanded, (newValue) => {
3326
+ const onAfterExpand = () => {
3136
3327
  if (searchable.value) {
3137
- nextTick(() => {
3138
- if (newValue) {
3139
- if (inputSearchEl.value) {
3140
- inputSearchEl.value.focus();
3141
- }
3142
- return;
3143
- }
3144
- searchText.value = "";
3145
- });
3328
+ if (inputSearchEl.value) {
3329
+ inputSearchEl.value.focus();
3330
+ }
3146
3331
  }
3147
- });
3332
+ };
3333
+ const onAfterCollapse = () => {
3334
+ if (searchable.value) {
3335
+ searchText.value = "";
3336
+ }
3337
+ };
3148
3338
  const {
3149
3339
  id,
3150
3340
  icon,
@@ -3233,11 +3423,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3233
3423
  const hasValue = computed(() => {
3234
3424
  return selectedOptions.value.map((option) => getOptionLabel(option)).join(props.separator);
3235
3425
  });
3236
- watch(selectedOptions, () => {
3237
- if (!props.multiple && props.autoClose) {
3238
- collapse();
3239
- }
3240
- });
3241
3426
  const onClickInput = () => {
3242
3427
  props.autoOpen ? expand() : toggleExpanded();
3243
3428
  };
@@ -3261,7 +3446,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3261
3446
  toReturn = [value];
3262
3447
  }
3263
3448
  } else {
3264
- if (props.autoClose) {
3449
+ if (!props.keepOpen) {
3265
3450
  collapse();
3266
3451
  }
3267
3452
  if (props.unselectable && value === props.modelValue) {
@@ -3307,7 +3492,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3307
3492
  flip: props.flip,
3308
3493
  autoPlacement: props.autoPlacement,
3309
3494
  arrow: props.arrow,
3310
- autoClose: props.autoClose,
3311
3495
  autofocusFirst: searchable.value ? false : props.autofocusFirst,
3312
3496
  triggerWidth: props.triggerWidth,
3313
3497
  modifiers: props.dropdownModifiers
@@ -3347,7 +3531,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3347
3531
  modelValue: unref(expanded),
3348
3532
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(expanded) ? expanded.value = $event : null)
3349
3533
  }, unref(dropdownProps), {
3350
- role: unref(DropdownRole).listbox
3534
+ role: unref(DropdownRole).listbox,
3535
+ onAfterExpand,
3536
+ onAfterCollapse
3351
3537
  }), createSlots({
3352
3538
  default: withCtx(({ aria }) => [
3353
3539
  _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
@@ -3362,9 +3548,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3362
3548
  ref_key: "inputEl",
3363
3549
  ref: inputEl
3364
3550
  }, aria, {
3365
- "aria-labelledby": unref(hasLabelId),
3366
3551
  class: "vv-select__input",
3367
3552
  role: "combobox",
3553
+ "aria-expanded": unref(expanded),
3554
+ "aria-labelledby": unref(hasLabelId),
3555
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
3556
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
3368
3557
  tabindex: unref(hasTabindex),
3369
3558
  onClickPassive: onClickInput
3370
3559
  }), [
@@ -3500,8 +3689,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3500
3689
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
3501
3690
  "aria-autocomplete": "list",
3502
3691
  "aria-controls": unref(hasDropdownId),
3503
- "aria-labelledby": unref(hasLabelId),
3504
- "aria-describedby": unref(hasHintId),
3505
3692
  autocomplete: "off",
3506
3693
  spellcheck: "false",
3507
3694
  type: "search",
@@ -3526,7 +3713,36 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3526
3713
  createVNode(unref(HintSlot), {
3527
3714
  id: unref(hasHintId),
3528
3715
  class: "vv-select__hint"
3529
- }, null, 8, ["id"])
3716
+ }, createSlots({ _: 2 }, [
3717
+ _ctx.$slots.hint ? {
3718
+ name: "hint",
3719
+ fn: withCtx(() => [
3720
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3721
+ ]),
3722
+ key: "0"
3723
+ } : void 0,
3724
+ _ctx.$slots.loading ? {
3725
+ name: "loading",
3726
+ fn: withCtx(() => [
3727
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3728
+ ]),
3729
+ key: "1"
3730
+ } : void 0,
3731
+ _ctx.$slots.valid ? {
3732
+ name: "valid",
3733
+ fn: withCtx(() => [
3734
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3735
+ ]),
3736
+ key: "2"
3737
+ } : void 0,
3738
+ _ctx.$slots.invalid ? {
3739
+ name: "invalid",
3740
+ fn: withCtx(() => [
3741
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3742
+ ]),
3743
+ key: "3"
3744
+ } : void 0
3745
+ ]), 1032, ["id"])
3530
3746
  ], 10, _hoisted_1$5)) : (openBlock(), createBlock(_sfc_main$7, mergeProps({ key: 1 }, unref(selectProps), {
3531
3747
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => emit("update:modelValue", $event))
3532
3748
  }), null, 16));
@@ -3556,9 +3772,9 @@ const VvDialogProps = {
3556
3772
  */
3557
3773
  size: String,
3558
3774
  /**
3559
- * Close dialog on click outside
3775
+ * Keep open dialog on click outside
3560
3776
  */
3561
- autoClose: { type: Boolean, default: true }
3777
+ keepOpen: { type: Boolean, default: false }
3562
3778
  };
3563
3779
  const _hoisted_1$4 = {
3564
3780
  key: 0,
@@ -3576,8 +3792,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3576
3792
  ...__default__$5,
3577
3793
  props: VvDialogProps,
3578
3794
  emits: VvDialogEvents,
3579
- setup(__props, { expose, emit }) {
3795
+ setup(__props, { expose: __expose, emit }) {
3580
3796
  const props = __props;
3797
+ const dialogEl = ref();
3581
3798
  const localModelValue = ref(false);
3582
3799
  const modelValue = computed({
3583
3800
  get() {
@@ -3590,13 +3807,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3590
3807
  emit("update:modelValue", value);
3591
3808
  }
3592
3809
  });
3593
- const htmlAttrIsOpen = ref(true);
3594
3810
  const modalWrapper = ref(null);
3595
3811
  const dialogAttrs = computed(() => {
3596
3812
  const { id } = props;
3597
3813
  return {
3598
- id,
3599
- open: htmlAttrIsOpen.value
3814
+ id
3600
3815
  };
3601
3816
  });
3602
3817
  const dialogClass = computed(() => {
@@ -3608,16 +3823,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3608
3823
  const transitioName = computed(() => `vv-dialog--${props.transition}`);
3609
3824
  const dialogTransitionHandlers = {
3610
3825
  "before-enter": () => {
3611
- htmlAttrIsOpen.value = true;
3826
+ var _a;
3827
+ (_a = dialogEl.value) == null ? void 0 : _a.showModal();
3612
3828
  emit("open");
3613
3829
  },
3614
3830
  "after-leave": () => {
3615
- htmlAttrIsOpen.value = false;
3831
+ var _a;
3832
+ (_a = dialogEl.value) == null ? void 0 : _a.close();
3616
3833
  emit("close");
3617
3834
  }
3618
3835
  };
3619
3836
  onClickOutside(modalWrapper, () => {
3620
- if (props.autoClose) {
3837
+ if (!props.keepOpen) {
3621
3838
  modelValue.value = false;
3622
3839
  }
3623
3840
  });
@@ -3627,7 +3844,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3627
3844
  function open() {
3628
3845
  modelValue.value = true;
3629
3846
  }
3630
- expose({ close, open });
3847
+ __expose({ close, open });
3631
3848
  onKeyStroke("Escape", (e) => {
3632
3849
  if (modelValue.value) {
3633
3850
  e.preventDefault();
@@ -3637,7 +3854,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3637
3854
  return (_ctx, _cache) => {
3638
3855
  return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers)), {
3639
3856
  default: withCtx(() => [
3640
- withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), { class: unref(dialogClass) }), [
3857
+ withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), {
3858
+ ref_key: "dialogEl",
3859
+ ref: dialogEl,
3860
+ class: unref(dialogClass)
3861
+ }), [
3641
3862
  createElementVNode("article", {
3642
3863
  ref_key: "modalWrapper",
3643
3864
  ref: modalWrapper,
@@ -4176,12 +4397,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4176
4397
  ...__default__$4,
4177
4398
  props: VvInputTextProps,
4178
4399
  emits: VvInputTextEvents,
4179
- setup(__props, { expose, emit }) {
4400
+ setup(__props, { expose: __expose, emit }) {
4180
4401
  const props = __props;
4181
4402
  const slots = useSlots();
4182
4403
  const inputEl = ref();
4183
4404
  const innerEl = ref();
4184
- expose({ $inner: innerEl });
4405
+ __expose({ $inner: innerEl });
4185
4406
  const {
4186
4407
  id,
4187
4408
  icon,
@@ -4194,7 +4415,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4194
4415
  loading
4195
4416
  } = toRefs(props);
4196
4417
  const hasId = useUniqueId(id);
4197
- const hasDescribedBy = computed(() => `${hasId.value}-hint`);
4418
+ const hasHintId = computed(() => `${hasId.value}-hint`);
4198
4419
  const inputTextPlaceholder = computed(
4199
4420
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
4200
4421
  );
@@ -4330,8 +4551,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4330
4551
  required: props.required,
4331
4552
  autocomplete: props.autocomplete,
4332
4553
  "aria-invalid": isInvalid.value,
4333
- "aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
4334
- "aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
4554
+ "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
4555
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
4335
4556
  };
4336
4557
  if (type === INPUT_TYPES.DATE || type === INPUT_TYPES.MONTH || type === INPUT_TYPES.WEEK || type === INPUT_TYPES.TIME || type === INPUT_TYPES.DATETIME_LOCAL || type === INPUT_TYPES.NUMBER) {
4337
4558
  toReturn.step = props.step;
@@ -4360,7 +4581,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4360
4581
  stepDown: onStepDown,
4361
4582
  clear: onClear
4362
4583
  }));
4363
- const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
4584
+ const {
4585
+ HintSlot,
4586
+ hasHintLabelOrSlot,
4587
+ hasInvalidLabelOrSlot,
4588
+ hintSlotScope
4589
+ } = HintSlotFactory(props, slots);
4364
4590
  const PasswordInputActions = VvInputTextActionsFactory(
4365
4591
  INPUT_TYPES.PASSWORD,
4366
4592
  props
@@ -4475,9 +4701,38 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4475
4701
  ])) : createCommentVNode("", true)
4476
4702
  ]),
4477
4703
  createVNode(unref(HintSlot), {
4478
- id: unref(hasDescribedBy),
4704
+ id: unref(hasHintId),
4479
4705
  class: "vv-input-text__hint"
4480
- }, null, 8, ["id"])
4706
+ }, createSlots({ _: 2 }, [
4707
+ _ctx.$slots.hint ? {
4708
+ name: "hint",
4709
+ fn: withCtx(() => [
4710
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4711
+ ]),
4712
+ key: "0"
4713
+ } : void 0,
4714
+ _ctx.$slots.loading ? {
4715
+ name: "loading",
4716
+ fn: withCtx(() => [
4717
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4718
+ ]),
4719
+ key: "1"
4720
+ } : void 0,
4721
+ _ctx.$slots.valid ? {
4722
+ name: "valid",
4723
+ fn: withCtx(() => [
4724
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4725
+ ]),
4726
+ key: "2"
4727
+ } : void 0,
4728
+ _ctx.$slots.invalid ? {
4729
+ name: "invalid",
4730
+ fn: withCtx(() => [
4731
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4732
+ ]),
4733
+ key: "3"
4734
+ } : void 0
4735
+ ]), 1032, ["id"])
4481
4736
  ], 2);
4482
4737
  };
4483
4738
  }
@@ -4572,7 +4827,7 @@ function useGroupProps(props, emit) {
4572
4827
  };
4573
4828
  }
4574
4829
  const _hoisted_1$2 = ["for"];
4575
- const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"];
4830
+ const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
4576
4831
  const __default__$2 = {
4577
4832
  name: "VvRadio"
4578
4833
  };
@@ -4585,6 +4840,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4585
4840
  const slots = useSlots();
4586
4841
  const { id, disabled, readonly, modelValue, valid, invalid } = useGroupProps(props, emit);
4587
4842
  const hasId = useUniqueId(id);
4843
+ const hasHintId = computed(() => `${hasId.value}-hint`);
4588
4844
  const tabindex = computed(() => isDisabled.value ? -1 : props.tabindex);
4589
4845
  const input = ref();
4590
4846
  const isDisabled = computed(() => disabled.value || readonly.value);
@@ -4627,7 +4883,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4627
4883
  readonly: readonly.value
4628
4884
  }))
4629
4885
  );
4630
- const { HintSlot } = HintSlotFactory(props, slots);
4886
+ const {
4887
+ HintSlot,
4888
+ hasHintLabelOrSlot,
4889
+ hasInvalidLabelOrSlot,
4890
+ hintSlotScope
4891
+ } = HintSlotFactory(props, slots);
4631
4892
  return (_ctx, _cache) => {
4632
4893
  return openBlock(), createElementBlock("label", {
4633
4894
  class: normalizeClass(unref(bemCssClasses)),
@@ -4644,7 +4905,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4644
4905
  disabled: unref(isDisabled),
4645
4906
  value: unref(hasValue),
4646
4907
  tabindex: unref(tabindex),
4647
- "aria-invalid": unref(isInvalid)
4908
+ "aria-invalid": unref(isInvalid),
4909
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
4910
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0
4648
4911
  }, null, 8, _hoisted_2$2), [
4649
4912
  [vModelRadio, unref(localModelValue)]
4650
4913
  ]),
@@ -4652,9 +4915,38 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4652
4915
  createTextVNode(toDisplayString(_ctx.label), 1)
4653
4916
  ]),
4654
4917
  createVNode(unref(HintSlot), {
4655
- class: "vv-radio__hint",
4656
- params: { value: unref(modelValue) }
4657
- }, null, 8, ["params"])
4918
+ id: unref(hasHintId),
4919
+ class: "vv-radio__hint"
4920
+ }, createSlots({ _: 2 }, [
4921
+ _ctx.$slots.hint ? {
4922
+ name: "hint",
4923
+ fn: withCtx(() => [
4924
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4925
+ ]),
4926
+ key: "0"
4927
+ } : void 0,
4928
+ _ctx.$slots.loading ? {
4929
+ name: "loading",
4930
+ fn: withCtx(() => [
4931
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4932
+ ]),
4933
+ key: "1"
4934
+ } : void 0,
4935
+ _ctx.$slots.valid ? {
4936
+ name: "valid",
4937
+ fn: withCtx(() => [
4938
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4939
+ ]),
4940
+ key: "2"
4941
+ } : void 0,
4942
+ _ctx.$slots.invalid ? {
4943
+ name: "invalid",
4944
+ fn: withCtx(() => [
4945
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4946
+ ]),
4947
+ key: "3"
4948
+ } : void 0
4949
+ ]), 1032, ["id"])
4658
4950
  ], 10, _hoisted_1$2);
4659
4951
  };
4660
4952
  }
@@ -4703,7 +4995,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4703
4995
  value: getOptionValue(option)
4704
4996
  };
4705
4997
  };
4706
- const { HintSlot } = HintSlotFactory(props, slots);
4998
+ const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots);
4707
4999
  return (_ctx, _cache) => {
4708
5000
  return openBlock(), createElementBlock("fieldset", {
4709
5001
  class: normalizeClass(unref(bemCssClasses))
@@ -4717,7 +5009,36 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4717
5009
  return openBlock(), createBlock(_sfc_main$2, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
4718
5010
  }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
4719
5011
  ]),
4720
- createVNode(unref(HintSlot), { class: "vv-radio-group__hint" })
5012
+ createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
5013
+ _ctx.$slots.hint ? {
5014
+ name: "hint",
5015
+ fn: withCtx(() => [
5016
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5017
+ ]),
5018
+ key: "0"
5019
+ } : void 0,
5020
+ _ctx.$slots.loading ? {
5021
+ name: "loading",
5022
+ fn: withCtx(() => [
5023
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5024
+ ]),
5025
+ key: "1"
5026
+ } : void 0,
5027
+ _ctx.$slots.valid ? {
5028
+ name: "valid",
5029
+ fn: withCtx(() => [
5030
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5031
+ ]),
5032
+ key: "2"
5033
+ } : void 0,
5034
+ _ctx.$slots.invalid ? {
5035
+ name: "invalid",
5036
+ fn: withCtx(() => [
5037
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5038
+ ]),
5039
+ key: "3"
5040
+ } : void 0
5041
+ ]), 1024)
4721
5042
  ], 2);
4722
5043
  };
4723
5044
  }
@@ -4804,7 +5125,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4804
5125
  modifiers
4805
5126
  } = toRefs(props);
4806
5127
  const hasId = useUniqueId(id);
4807
- const hasDescribedBy = computed(() => `${hasId.value}-hint`);
5128
+ const hasHintId = computed(() => `${hasId.value}-hint`);
4808
5129
  const hasPlaceholder = computed(
4809
5130
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
4810
5131
  );
@@ -4839,7 +5160,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4839
5160
  }
4840
5161
  return void 0;
4841
5162
  });
4842
- const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
5163
+ const {
5164
+ HintSlot,
5165
+ hasHintLabelOrSlot,
5166
+ hasInvalidLabelOrSlot,
5167
+ hintSlotScope
5168
+ } = HintSlotFactory(props, slots);
4843
5169
  const bemCssClasses = useModifiers(
4844
5170
  "vv-textarea",
4845
5171
  modifiers,
@@ -4873,8 +5199,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4873
5199
  wrap: props.wrap,
4874
5200
  spellcheck: props.spellcheck,
4875
5201
  "aria-invalid": isInvalid.value,
4876
- "aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
4877
- "aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
5202
+ "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
5203
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
4878
5204
  })
4879
5205
  );
4880
5206
  const slotProps = computed(() => ({
@@ -4932,9 +5258,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4932
5258
  ])) : createCommentVNode("", true)
4933
5259
  ]),
4934
5260
  createVNode(unref(HintSlot), {
4935
- id: unref(hasDescribedBy),
5261
+ id: unref(hasHintId),
4936
5262
  class: "vv-textarea__hint"
4937
- }, null, 8, ["id"])
5263
+ }, createSlots({ _: 2 }, [
5264
+ _ctx.$slots.hint ? {
5265
+ name: "hint",
5266
+ fn: withCtx(() => [
5267
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5268
+ ]),
5269
+ key: "0"
5270
+ } : void 0,
5271
+ _ctx.$slots.loading ? {
5272
+ name: "loading",
5273
+ fn: withCtx(() => [
5274
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5275
+ ]),
5276
+ key: "1"
5277
+ } : void 0,
5278
+ _ctx.$slots.valid ? {
5279
+ name: "valid",
5280
+ fn: withCtx(() => [
5281
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5282
+ ]),
5283
+ key: "2"
5284
+ } : void 0,
5285
+ _ctx.$slots.invalid ? {
5286
+ name: "invalid",
5287
+ fn: withCtx(() => [
5288
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5289
+ ]),
5290
+ key: "3"
5291
+ } : void 0
5292
+ ]), 1032, ["id"])
4938
5293
  ], 2);
4939
5294
  };
4940
5295
  }