@volverjs/ui-vue 0.0.6-beta.7 → 0.0.7-beta.1

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 (422) hide show
  1. package/README.md +3 -5
  2. package/auto-imports.d.ts +2 -0
  3. package/dist/components/VvAccordion/VvAccordion.es.js +220 -4
  4. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  5. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -8
  6. package/dist/components/VvAccordion/index.d.ts +1 -4
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +221 -8
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +6 -6
  10. package/dist/components/VvAccordionGroup/index.d.ts +2 -5
  11. package/dist/components/VvAction/VvAction.es.js +12 -8
  12. package/dist/components/VvAction/VvAction.umd.js +1 -1
  13. package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
  14. package/dist/components/VvAction/index.d.ts +1 -1
  15. package/dist/components/VvAlert/VvAlert.es.js +661 -0
  16. package/dist/components/VvAlert/VvAlert.umd.js +1 -0
  17. package/dist/components/VvAlert/VvAlert.vue.d.ts +104 -0
  18. package/dist/components/VvAlert/index.d.ts +95 -0
  19. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +799 -0
  20. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -0
  21. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +89 -0
  22. package/dist/components/VvAlertGroup/index.d.ts +55 -0
  23. package/dist/components/VvAvatar/VvAvatar.es.js +3 -3
  24. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -2
  25. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +3 -3
  26. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -2
  27. package/dist/components/VvBadge/VvBadge.es.js +3 -3
  28. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  29. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -3
  30. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +3 -3
  31. package/dist/components/VvButton/VvButton.es.js +14 -10
  32. package/dist/components/VvButton/VvButton.umd.js +1 -1
  33. package/dist/components/VvButton/VvButton.vue.d.ts +13 -13
  34. package/dist/components/VvButton/index.d.ts +2 -2
  35. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +3 -3
  36. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
  37. package/dist/components/VvCard/VvCard.es.js +221 -2
  38. package/dist/components/VvCard/VvCard.umd.js +1 -1
  39. package/dist/components/VvCard/VvCard.vue.d.ts +5 -5
  40. package/dist/components/VvCheckbox/VvCheckbox.es.js +3 -3
  41. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +18 -18
  42. package/dist/components/VvCheckbox/index.d.ts +3 -3
  43. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +3 -3
  44. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +16 -16
  45. package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
  46. package/dist/components/VvCombobox/VvCombobox.es.js +65 -60
  47. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  48. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +56 -44
  49. package/dist/components/VvCombobox/index.d.ts +13 -7
  50. package/dist/components/VvDialog/VvDialog.es.js +19 -14
  51. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  52. package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -7
  53. package/dist/components/VvDialog/index.d.ts +2 -2
  54. package/dist/components/VvDropdown/VvDropdown.es.js +22 -23
  55. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  56. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +16 -16
  57. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +4 -4
  58. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -2
  59. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
  60. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -4
  61. package/dist/components/VvDropdown/index.d.ts +1 -1
  62. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -11
  63. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  64. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +9 -5
  65. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  66. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +3 -3
  67. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +12 -8
  68. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  69. package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
  70. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  71. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  72. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  73. package/dist/components/VvInputText/VvInputText.es.js +5 -5
  74. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  75. package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -30
  76. package/dist/components/VvInputText/index.d.ts +5 -5
  77. package/dist/components/VvNav/VvNav.es.js +12 -8
  78. package/dist/components/VvNav/VvNav.umd.js +1 -1
  79. package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
  80. package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +1 -1
  81. package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +1 -1
  82. package/dist/components/VvProgress/VvProgress.es.js +3 -3
  83. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  84. package/dist/components/VvRadio/VvRadio.es.js +3 -3
  85. package/dist/components/VvRadio/VvRadio.vue.d.ts +18 -18
  86. package/dist/components/VvRadio/index.d.ts +3 -3
  87. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +3 -3
  88. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +16 -16
  89. package/dist/components/VvRadioGroup/index.d.ts +3 -3
  90. package/dist/components/VvSelect/VvSelect.es.js +3 -3
  91. package/dist/components/VvSelect/VvSelect.vue.d.ts +26 -26
  92. package/dist/components/VvSelect/index.d.ts +4 -4
  93. package/dist/components/VvTab/VvTab.es.js +12 -8
  94. package/dist/components/VvTab/VvTab.umd.js +1 -1
  95. package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
  96. package/dist/components/VvTextarea/VvTextarea.es.js +3 -3
  97. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +24 -24
  98. package/dist/components/VvTextarea/index.d.ts +3 -3
  99. package/dist/components/VvTooltip/VvTooltip.es.js +3 -3
  100. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
  101. package/dist/components/common/HintSlot.d.ts +1 -1
  102. package/dist/components/index.es.js +773 -769
  103. package/dist/components/index.umd.js +1 -1
  104. package/dist/composables/alert/useInjectAlert.d.ts +9 -0
  105. package/dist/composables/alert/useProvideAlert.d.ts +10 -0
  106. package/dist/composables/dropdown/useInjectDropdown.d.ts +17 -16
  107. package/dist/composables/dropdown/useProvideDropdown.d.ts +7 -3
  108. package/dist/composables/useVolver.d.ts +1 -2
  109. package/dist/constants.d.ts +33 -4
  110. package/dist/directives/index.es.js +3 -3
  111. package/dist/directives/v-tooltip.es.js +3 -3
  112. package/dist/icons.es.js +3 -3
  113. package/dist/icons.umd.js +1 -1
  114. package/dist/props/index.d.ts +16 -16
  115. package/dist/resolvers/unplugin.es.js +6 -3
  116. package/dist/resolvers/unplugin.umd.js +1 -1
  117. package/dist/stories/Accordion/Accordion.settings.d.ts +18 -17
  118. package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
  119. package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
  120. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +23 -4
  121. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +134 -0
  122. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +894 -0
  123. package/dist/stories/Alert/Alert.settings.d.ts +105 -0
  124. package/dist/stories/Alert/Alert.stories.d.ts +9 -0
  125. package/dist/stories/Alert/Alert.test.d.ts +2 -0
  126. package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
  127. package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
  128. package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +97 -0
  129. package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
  130. package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
  131. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
  132. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
  133. package/dist/stories/Avatar/Avatar.settings.d.ts +2 -33
  134. package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
  135. package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
  136. package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
  137. package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
  138. package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +0 -6
  139. package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
  140. package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
  141. package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
  142. package/dist/stories/Badge/Badge.settings.d.ts +0 -3
  143. package/dist/stories/Badge/Badge.stories.d.ts +7 -0
  144. package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
  145. package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
  146. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
  147. package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
  148. package/dist/stories/Button/Button.settings.d.ts +1 -18
  149. package/dist/stories/Button/Button.stories.d.ts +6 -0
  150. package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
  151. package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
  152. package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
  153. package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
  154. package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
  155. package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
  156. package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
  157. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +0 -4
  158. package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
  159. package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
  160. package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
  161. package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
  162. package/dist/stories/Card/Card.settings.d.ts +0 -3
  163. package/dist/stories/Card/Card.stories.d.ts +6 -0
  164. package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
  165. package/dist/stories/Checkbox/Checkbox.settings.d.ts +1 -21
  166. package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
  167. package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
  168. package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
  169. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -27
  170. package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
  171. package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
  172. package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
  173. package/dist/stories/Combobox/Combobox.settings.d.ts +2 -54
  174. package/dist/stories/Combobox/Combobox.stories.d.ts +21 -0
  175. package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
  176. package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +8 -0
  177. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +9 -0
  178. package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
  179. package/dist/stories/Dialog/Dialog.settings.d.ts +1 -1
  180. package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
  181. package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
  182. package/dist/stories/Dropdown/Dropdown.settings.d.ts +1 -1
  183. package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
  184. package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
  185. package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
  186. package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
  187. package/dist/stories/Icon/Icon.settings.d.ts +1 -3
  188. package/dist/stories/Icon/Icon.stories.d.ts +8 -0
  189. package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
  190. package/dist/stories/InputText/InputText.settings.d.ts +1 -74
  191. package/dist/stories/InputText/InputText.stories.d.ts +15 -0
  192. package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
  193. package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
  194. package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
  195. package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
  196. package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
  197. package/dist/stories/Nav/Nav.settings.d.ts +0 -3
  198. package/dist/stories/Nav/Nav.stories.d.ts +6 -0
  199. package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
  200. package/dist/stories/Progress/Progress.settings.d.ts +0 -6
  201. package/dist/stories/Progress/Progress.stories.d.ts +7 -0
  202. package/dist/stories/Radio/Radio.settings.d.ts +1 -19
  203. package/dist/stories/Radio/Radio.stories.d.ts +11 -0
  204. package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
  205. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -27
  206. package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
  207. package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
  208. package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
  209. package/dist/stories/Select/Select.settings.d.ts +1 -47
  210. package/dist/stories/Select/Select.stories.d.ts +15 -0
  211. package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
  212. package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
  213. package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
  214. package/dist/stories/Tab/Tab.stories.d.ts +6 -0
  215. package/dist/stories/Textarea/Textarea.settings.d.ts +1 -43
  216. package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
  217. package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
  218. package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
  219. package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
  220. package/dist/stories/Tooltip/Tooltip.settings.d.ts +2 -39
  221. package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
  222. package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
  223. package/dist/stories/argTypes.d.ts +5 -125
  224. package/package.json +66 -49
  225. package/src/assets/icons/detailed.json +1 -1
  226. package/src/assets/icons/normal.json +1 -1
  227. package/src/assets/icons/simple.json +1 -1
  228. package/src/components/VvAccordion/index.ts +2 -4
  229. package/src/components/VvAccordionGroup/index.ts +3 -4
  230. package/src/components/VvAction/VvAction.vue +1 -1
  231. package/src/components/VvAlert/VvAlert.vue +54 -0
  232. package/src/components/VvAlert/index.ts +162 -0
  233. package/src/components/VvAlertGroup/VvAlertGroup.vue +34 -0
  234. package/src/components/VvAlertGroup/index.ts +122 -0
  235. package/src/components/VvCard/index.ts +3 -1
  236. package/src/components/VvCombobox/VvCombobox.vue +22 -26
  237. package/src/components/VvCombobox/index.ts +9 -3
  238. package/src/components/VvDialog/VvDialog.vue +11 -7
  239. package/src/components/VvDialog/index.ts +2 -2
  240. package/src/components/VvDropdown/VvDropdown.vue +8 -4
  241. package/src/components/VvDropdown/VvDropdownItem.vue +2 -2
  242. package/src/composables/alert/useInjectAlert.ts +8 -0
  243. package/src/composables/alert/useProvideAlert.ts +23 -0
  244. package/src/composables/dropdown/useInjectDropdown.ts +3 -28
  245. package/src/composables/dropdown/useProvideDropdown.ts +14 -15
  246. package/src/composables/useVolver.ts +1 -2
  247. package/src/constants.ts +42 -4
  248. package/src/props/index.ts +3 -3
  249. package/src/resolvers/unplugin.ts +6 -3
  250. package/src/stories/Accordion/Accordion.settings.ts +18 -7
  251. package/src/stories/Accordion/Accordion.stories.ts +45 -0
  252. package/src/stories/Accordion/AccordionSlots.stories.ts +29 -0
  253. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +22 -0
  254. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +62 -0
  255. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +53 -0
  256. package/src/stories/Alert/Alert.settings.ts +110 -0
  257. package/src/stories/Alert/Alert.stories.ts +60 -0
  258. package/src/stories/Alert/Alert.test.ts +95 -0
  259. package/src/stories/Alert/AlertModifiers.stories.ts +77 -0
  260. package/src/stories/Alert/AlertSlots.stories.ts +74 -0
  261. package/src/stories/AlertGroup/AlertGroup.settings.ts +110 -0
  262. package/src/stories/AlertGroup/AlertGroup.stories.ts +50 -0
  263. package/src/stories/AlertGroup/AlertGroup.test.ts +76 -0
  264. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +103 -0
  265. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +67 -0
  266. package/src/stories/Avatar/Avatar.settings.ts +7 -6
  267. package/src/stories/Avatar/Avatar.stories.ts +42 -0
  268. package/src/stories/Avatar/Avatar.test.ts +1 -1
  269. package/src/stories/Avatar/AvatarBadge.stories.ts +36 -0
  270. package/src/stories/Avatar/AvatarModifiers.stories.ts +100 -0
  271. package/src/stories/Avatar/AvatarSlots.stories.ts +34 -0
  272. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
  273. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
  274. package/src/stories/AvatarGroup/{AvatarGroupSlotDefault.stories.mdx → AvatarGroupSlotDefault.stories.ts} +24 -30
  275. package/src/stories/Badge/Badge.stories.ts +43 -0
  276. package/src/stories/Badge/BadgeSlots.stories.ts +23 -0
  277. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +41 -0
  278. package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
  279. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +37 -0
  280. package/src/stories/Button/Button.settings.ts +2 -11
  281. package/src/stories/Button/Button.stories.ts +38 -0
  282. package/src/stories/Button/ButtonIcon.stories.ts +67 -0
  283. package/src/stories/Button/ButtonLink.stories.ts +40 -0
  284. package/src/stories/Button/ButtonLoading.stories.ts +41 -0
  285. package/src/stories/Button/ButtonModifiers.stories.ts +158 -0
  286. package/src/stories/Button/ButtonSlots.stories.ts +87 -0
  287. package/src/stories/Button/ButtonState.stories.ts +42 -0
  288. package/src/stories/Button/ButtonToggle.stories.ts +52 -0
  289. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +39 -0
  290. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +39 -0
  291. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +38 -0
  292. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +41 -0
  293. package/src/stories/Card/Card.stories.ts +46 -0
  294. package/src/stories/Card/CardSlots.stories.ts +81 -0
  295. package/src/stories/Checkbox/Checkbox.settings.ts +0 -2
  296. package/src/stories/Checkbox/Checkbox.stories.ts +97 -0
  297. package/src/stories/Checkbox/CheckboxBinary.stories.ts +33 -0
  298. package/src/stories/Checkbox/CheckboxSlots.stories.ts +31 -0
  299. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +87 -0
  300. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +53 -0
  301. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +47 -0
  302. package/src/stories/Combobox/Combobox.settings.ts +3 -23
  303. package/src/stories/Combobox/Combobox.stories.ts +176 -0
  304. package/src/stories/Combobox/Combobox.test.ts +2 -2
  305. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +43 -0
  306. package/src/stories/Combobox/ComboboxMultiple.stories.ts +41 -0
  307. package/src/stories/Combobox/ComboboxOptions.stories.ts +78 -0
  308. package/src/stories/Combobox/ComboboxSlots.stories.ts +104 -0
  309. package/src/stories/Dialog/Dialog.settings.ts +1 -1
  310. package/src/stories/Dialog/Dialog.stories.ts +51 -0
  311. package/src/stories/Dialog/Dialog.test.ts +2 -2
  312. package/src/stories/Dialog/DialogSlots.stories.ts +39 -0
  313. package/src/stories/Dropdown/Dropdown.stories.ts +107 -0
  314. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +49 -0
  315. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +61 -0
  316. package/src/stories/Dropdown/DropdownSlots.stories.ts +95 -0
  317. package/src/stories/Icon/Icon.settings.ts +1 -0
  318. package/src/stories/Icon/Icon.stories.ts +48 -0
  319. package/src/stories/Icon/IconsCollection.stories.ts +53 -0
  320. package/src/stories/InputText/InputText.settings.ts +3 -39
  321. package/src/stories/InputText/InputText.stories.ts +121 -0
  322. package/src/stories/InputText/InputTextIconPosition.stories.ts +43 -0
  323. package/src/stories/InputText/InputTextLength.stories.ts +58 -0
  324. package/src/stories/InputText/InputTextMinMax.stories.ts +51 -0
  325. package/src/stories/InputText/InputTextSlots.stories.ts +39 -0
  326. package/src/stories/InputText/InputTextType.stories.ts +119 -0
  327. package/src/stories/Nav/Nav.stories.ts +33 -0
  328. package/src/stories/Nav/NavModifiers.stories.ts +47 -0
  329. package/src/stories/Progress/Progress.settings.ts +0 -3
  330. package/src/stories/Progress/Progress.stories.ts +41 -0
  331. package/src/stories/Radio/Radio.stories.ts +81 -0
  332. package/src/stories/Radio/RadioSlots.stories.ts +31 -0
  333. package/src/stories/RadioGroup/RadioGroup.stories.ts +88 -0
  334. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +53 -0
  335. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +47 -0
  336. package/src/stories/Select/Select.settings.ts +0 -5
  337. package/src/stories/Select/Select.stories.ts +113 -0
  338. package/src/stories/Select/SelectIconPosition.stories.ts +43 -0
  339. package/src/stories/Select/SelectOptions.stories.ts +77 -0
  340. package/src/stories/Select/SelectSlots.stories.ts +39 -0
  341. package/src/stories/Tab/Tab.stories.ts +70 -0
  342. package/src/stories/Textarea/Textarea.settings.ts +0 -8
  343. package/src/stories/Textarea/Textarea.stories.ts +107 -0
  344. package/src/stories/Textarea/TextareaLength.stories.ts +58 -0
  345. package/src/stories/Textarea/TextareaSlots.stories.ts +39 -0
  346. package/src/stories/Textarea/TextareatIconPosition.stories.ts +43 -0
  347. package/src/stories/Tooltip/Tooltip.settings.ts +4 -4
  348. package/src/stories/Tooltip/Tooltip.stories.ts +40 -0
  349. package/src/stories/Tooltip/TooltipDirective.stories.ts +68 -0
  350. package/src/stories/argTypes.ts +5 -59
  351. package/src/stories/Accordion/Accordion.stories.mdx +0 -45
  352. package/src/stories/Accordion/AccordionSlots.stories.mdx +0 -58
  353. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +0 -58
  354. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +0 -59
  355. package/src/stories/Avatar/Avatar.stories.mdx +0 -40
  356. package/src/stories/Avatar/AvatarBadge.stories.mdx +0 -41
  357. package/src/stories/Avatar/AvatarModifiers.stories.mdx +0 -87
  358. package/src/stories/Avatar/AvatarSlotDefault.stories.mdx +0 -29
  359. package/src/stories/AvatarGroup/AvatarGroup.stories.mdx +0 -30
  360. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.mdx +0 -24
  361. package/src/stories/Badge/Badge.stories.mdx +0 -51
  362. package/src/stories/Badge/BadgeSlots.stories.mdx +0 -20
  363. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +0 -50
  364. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +0 -43
  365. package/src/stories/Button/Button.stories.mdx +0 -35
  366. package/src/stories/Button/ButtonIcon.stories.mdx +0 -153
  367. package/src/stories/Button/ButtonLink.stories.mdx +0 -72
  368. package/src/stories/Button/ButtonLoading.stories.mdx +0 -108
  369. package/src/stories/Button/ButtonModifiers.stories.mdx +0 -257
  370. package/src/stories/Button/ButtonSlots.stories.mdx +0 -116
  371. package/src/stories/Button/ButtonState.stories.mdx +0 -66
  372. package/src/stories/Button/ButtonToggle.stories.mdx +0 -112
  373. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +0 -37
  374. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +0 -52
  375. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +0 -37
  376. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +0 -73
  377. package/src/stories/Card/Card.stories.mdx +0 -40
  378. package/src/stories/Card/CardSlots.stories.mdx +0 -98
  379. package/src/stories/Checkbox/Checkbox.stories.mdx +0 -164
  380. package/src/stories/Checkbox/CheckboxBinary.stories.mdx +0 -68
  381. package/src/stories/Checkbox/CheckboxSlots.stories.mdx +0 -46
  382. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +0 -135
  383. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +0 -100
  384. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +0 -68
  385. package/src/stories/Combobox/Combobox.stories.mdx +0 -324
  386. package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +0 -78
  387. package/src/stories/Combobox/ComboboxMultiple.stories.mdx +0 -73
  388. package/src/stories/Combobox/ComboboxOptions.stories.mdx +0 -135
  389. package/src/stories/Combobox/ComboboxSlots.stories.mdx +0 -153
  390. package/src/stories/Dialog/Dialog.stories.mdx +0 -56
  391. package/src/stories/Dialog/DialogSlots.stories.mdx +0 -63
  392. package/src/stories/Dropdown/Dropdown.stories.mdx +0 -124
  393. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +0 -41
  394. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +0 -56
  395. package/src/stories/Dropdown/DropdownSlots.stories.mdx +0 -114
  396. package/src/stories/Icon/Icon.stories.mdx +0 -91
  397. package/src/stories/Icon/IconsCollection.stories.mdx +0 -69
  398. package/src/stories/InputText/InputText.stories.mdx +0 -211
  399. package/src/stories/InputText/InputTextIconPosition.stories.mdx +0 -78
  400. package/src/stories/InputText/InputTextLength.stories.mdx +0 -110
  401. package/src/stories/InputText/InputTextMinMax.stories.mdx +0 -112
  402. package/src/stories/InputText/InputTextSlots.stories.mdx +0 -69
  403. package/src/stories/InputText/InputTextType.stories.mdx +0 -259
  404. package/src/stories/Nav/Nav.stories.mdx +0 -28
  405. package/src/stories/Nav/NavModifiers.stories.mdx +0 -48
  406. package/src/stories/Progress/Progress.stories.mdx +0 -30
  407. package/src/stories/Radio/Radio.stories.mdx +0 -128
  408. package/src/stories/Radio/RadioSlots.stories.mdx +0 -46
  409. package/src/stories/RadioGroup/RadioGroup.stories.mdx +0 -135
  410. package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +0 -100
  411. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +0 -68
  412. package/src/stories/Select/Select.stories.mdx +0 -196
  413. package/src/stories/Select/SelectIconPosition.stories.mdx +0 -78
  414. package/src/stories/Select/SelectOptions.stories.mdx +0 -135
  415. package/src/stories/Select/SelectSlots.stories.mdx +0 -48
  416. package/src/stories/Tab/Tab.stories.mdx +0 -65
  417. package/src/stories/Textarea/Textarea.stories.mdx +0 -187
  418. package/src/stories/Textarea/TextareaLength.stories.mdx +0 -110
  419. package/src/stories/Textarea/TextareaSlots.stories.mdx +0 -69
  420. package/src/stories/Textarea/TextareatIconPosition.stories.mdx +0 -78
  421. package/src/stories/Tooltip/Tooltip.stories.mdx +0 -102
  422. package/src/stories/Tooltip/TooltipDirective.stories.mdx +0 -99
@@ -69,658 +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 disabled = computed(
255
- () => {
256
- var _a;
257
- return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
258
- }
259
- );
260
- const modifiers = computed(() => {
261
- let localModifiers = props.modifiers;
262
- let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
263
- const toReturn = /* @__PURE__ */ new Set();
264
- if (localModifiers) {
265
- if (!Array.isArray(localModifiers)) {
266
- localModifiers = localModifiers.split(" ");
267
- }
268
- localModifiers.forEach((modifier) => toReturn.add(modifier));
269
- }
270
- if (groupModifiers) {
271
- if (!Array.isArray(groupModifiers)) {
272
- groupModifiers = groupModifiers.split(" ");
273
- }
274
- groupModifiers.forEach((modifier) => toReturn.add(modifier));
275
- }
276
- return Array.from(toReturn);
277
- });
278
- return {
279
- // group props
280
- modelValue,
281
- not,
282
- isInGroup,
283
- group,
284
- collapse,
285
- modifiers,
286
- disabled,
287
- // local props
288
- title,
289
- content
290
- };
291
- }
292
- function useModifiers(prefix, modifiers, others) {
293
- return computed(() => {
294
- const toReturn = {
295
- [prefix]: true
296
- };
297
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
298
- if (modifiersArray) {
299
- if (Array.isArray(modifiersArray)) {
300
- modifiersArray.forEach((modifier) => {
301
- if (modifier) {
302
- toReturn[`${prefix}--${modifier}`] = true;
303
- }
304
- });
305
- }
306
- }
307
- if (others) {
308
- Object.keys(others.value).forEach((key) => {
309
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
310
- });
311
- }
312
- return toReturn;
313
- });
314
- }
315
- const _hoisted_1$f = ["id", "open"];
316
- const _hoisted_2$c = ["aria-controls", "aria-expanded"];
317
- const _hoisted_3$6 = ["aria-hidden"];
318
- const __default__$m = {
319
- name: "VvAccordion"
183
+ const HintProps = {
184
+ hintLabel: { type: String, default: "" }
320
185
  };
321
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
322
- ...__default__$m,
323
- props: VvAccordionProps,
324
- emits: VvAccordionEvents,
325
- setup(__props, { emit }) {
326
- const props = __props;
327
- const attrs = useAttrs();
328
- const accordionName = computed(
329
- () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
330
- );
331
- const {
332
- modifiers,
333
- title,
334
- content,
335
- disabled,
336
- collapse,
337
- modelValue,
338
- isInGroup,
339
- not
340
- } = useGroupProps$3(props, emit);
341
- const localModelValue = ref(false);
342
- const isOpen = computed({
343
- get: () => {
344
- let toReturn = modelValue.value;
345
- if (isInGroup.value) {
346
- if (collapse.value && Array.isArray(modelValue.value)) {
347
- toReturn = modelValue.value.includes(accordionName.value);
348
- } else {
349
- toReturn = modelValue.value === accordionName.value;
350
- }
351
- } else if (modelValue.value === void 0) {
352
- toReturn = localModelValue.value;
353
- }
354
- return not.value ? !toReturn : toReturn;
355
- },
356
- set: (newValue) => {
357
- if (not.value) {
358
- newValue = !newValue;
359
- }
360
- if (isInGroup.value) {
361
- if (collapse.value && Array.isArray(modelValue.value)) {
362
- if (newValue) {
363
- modelValue.value.push(accordionName.value);
364
- return;
365
- }
366
- modelValue.value = modelValue.value.filter(
367
- (name) => name !== accordionName.value
368
- );
369
- return;
370
- }
371
- modelValue.value = newValue ? accordionName.value : null;
372
- return;
373
- }
374
- if (modelValue.value === void 0 && typeof newValue === "boolean") {
375
- localModelValue.value = newValue;
376
- return;
377
- }
378
- modelValue.value = newValue;
379
- }
380
- });
381
- const bemCssClasses = useModifiers(
382
- "vv-accordion",
383
- modifiers,
384
- computed(() => ({
385
- disabled: disabled.value
386
- }))
387
- );
388
- const onClick = useToggle(isOpen);
389
- return (_ctx, _cache) => {
390
- return openBlock(), createElementBlock("details", {
391
- id: unref(accordionName),
392
- class: normalizeClass(unref(bemCssClasses)),
393
- open: unref(isOpen)
394
- }, [
395
- createElementVNode("summary", {
396
- "aria-controls": unref(accordionName),
397
- "aria-expanded": unref(isOpen),
398
- class: "vv-accordion__summary",
399
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
400
- }, [
401
- renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
402
- createTextVNode(toDisplayString(unref(title)), 1)
403
- ])
404
- ], 8, _hoisted_2$c),
405
- createElementVNode("div", {
406
- "aria-hidden": !unref(isOpen),
407
- class: "vv-accordion__content"
408
- }, [
409
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
410
- createTextVNode(toDisplayString(unref(content)), 1)
411
- ])
412
- ], 8, _hoisted_3$6)
413
- ], 10, _hoisted_1$f);
414
- };
415
- }
416
- });
417
- const VvAccordionGroupProps = {
418
- /**
419
- * VModel
420
- */
421
- modelValue: [String, Array],
186
+ const OptionsProps = {
422
187
  /**
423
- * Accordion items
424
- * @type VvAccordionGroupItem
188
+ * List of options, can be string[] or object[]
425
189
  */
426
- items: {
190
+ options: {
427
191
  type: Array,
428
192
  default: () => []
429
193
  },
430
194
  /**
431
- * If true, accordion items stay open when another item is opened
195
+ * Used when options are objects: key to use for option label
432
196
  */
433
- collapse: Boolean,
197
+ labelKey: { type: [String, Function], default: "label" },
434
198
  /**
435
- * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
199
+ * Used when options are objects: key to use for option label
436
200
  */
437
- modifiers: [String, Array],
201
+ valueKey: { type: [String, Function], default: "value" },
438
202
  /**
439
- * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
203
+ * Used when options are objects: key to use for option disabled
440
204
  */
441
- itemModifiers: {
442
- type: [String, Array],
443
- default: ""
444
- },
205
+ disabledKey: { type: [String, Function], default: "disabled" }
206
+ };
207
+ const CountProps = {
445
208
  /**
446
- * If true, the accordion items will be disabled
209
+ * Show character limit
447
210
  */
448
- disabled: Boolean,
211
+ count: {
212
+ type: [Boolean, String],
213
+ default: false,
214
+ validator: (value) => [true, false, "limit", "countdown"].includes(value)
215
+ }
216
+ };
217
+ const DebounceProps = {
449
218
  /**
450
- * If true, the accordion items will be opened by default
219
+ * Milliseconds to wait before emitting the input event
451
220
  */
452
- not: Boolean,
221
+ debounce: [Number, String]
222
+ };
223
+ const IconProps = {
453
224
  /**
454
- * Enable local storage persistence
225
+ * VvIcon name or props
226
+ * @see VVIcon
455
227
  */
456
- storeKey: String
228
+ icon: { type: [String, Object] },
229
+ /**
230
+ * VvIcon position
231
+ */
232
+ iconPosition: {
233
+ type: String,
234
+ default: Position.before,
235
+ validation: (value) => Object.values(Position).includes(value)
236
+ }
457
237
  };
458
- const VvAccordionGroupEvents = ["update:modelValue"];
459
- function useProvideGroupState(groupState) {
460
- if (Object.keys(groupState).some(
461
- (k) => k !== "key" && !isRef(groupState[k])
462
- ))
463
- throw Error("One or more groupState props aren't ref.");
464
- provide(
465
- groupState.key,
466
- computed(() => groupState)
467
- );
468
- }
469
- const __default__$l = {
470
- name: "VvAccordionGroup"
471
- };
472
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
473
- ...__default__$l,
474
- props: VvAccordionGroupProps,
475
- emits: VvAccordionGroupEvents,
476
- setup(__props, { emit }) {
477
- const props = __props;
478
- const { disabled, collapse, modifiers, itemModifiers, items, not } = toRefs(props);
479
- watchEffect(() => {
480
- if (typeof props.modelValue === "string" && collapse.value) {
481
- console.warn(
482
- `[VvAccordionGroup]: modelValue is a string but collapse is true.`
483
- );
484
- }
485
- });
486
- let localModelValue = ref([]);
487
- watch(
488
- () => props.storeKey,
489
- (newKey) => {
490
- if (newKey) {
491
- localModelValue = useStorage(newKey, localModelValue.value);
492
- } else {
493
- localModelValue = ref([]);
494
- }
495
- },
496
- { immediate: true }
497
- );
498
- const modelValue = computed({
499
- get: () => {
500
- var _a;
501
- if (props.modelValue !== void 0) {
502
- if (!collapse.value) {
503
- return Array.isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
504
- }
505
- return props.modelValue;
506
- }
507
- return !collapse.value ? (_a = localModelValue.value) == null ? void 0 : _a[0] : localModelValue.value;
508
- },
509
- set: (newValue) => {
510
- if (props.modelValue !== void 0) {
511
- if ((Array.isArray(props.modelValue) || collapse.value) && !Array.isArray(newValue)) {
512
- newValue = [newValue];
513
- }
514
- return emit("update:modelValue", newValue);
515
- }
516
- localModelValue.value = Array.isArray(newValue) ? newValue : [newValue];
517
- }
518
- });
519
- useProvideGroupState({
520
- key: INJECTION_KEY_ACCORDION_GROUP,
521
- modelValue,
522
- disabled,
523
- collapse,
524
- modifiers: itemModifiers,
525
- not
526
- });
527
- const bemCssClasses = useModifiers(
528
- "vv-accordion-group",
529
- modifiers,
530
- computed(() => ({
531
- disabled: disabled.value
532
- }))
533
- );
534
- return (_ctx, _cache) => {
535
- return openBlock(), createElementBlock("div", {
536
- class: normalizeClass(unref(bemCssClasses))
537
- }, [
538
- renderSlot(_ctx.$slots, "default", {}, () => [
539
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
540
- return openBlock(), createBlock(_sfc_main$m, mergeProps({
541
- key: item.title
542
- }, {
543
- name: item.name,
544
- title: item.title,
545
- content: item.content
546
- }), {
547
- header: withCtx((data) => [
548
- renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
549
- ]),
550
- details: withCtx((data) => [
551
- renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
552
- ]),
553
- _: 2
554
- }, 1040);
555
- }), 128))
556
- ])
557
- ], 2);
558
- };
559
- }
560
- });
561
- const LinkProps = {
562
- /**
563
- * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
564
- * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
565
- */
566
- to: {
567
- type: [String, Object]
568
- },
569
- /**
570
- * Anchor href
571
- */
572
- href: String,
573
- /**
574
- * Anchor target
575
- */
576
- target: {
577
- type: String,
578
- validator: (value) => Object.values(AnchorTarget).includes(value)
579
- },
580
- /**
581
- * Anchor rel
582
- */
583
- rel: {
584
- type: String,
585
- default: "noopener noreferrer"
586
- }
587
- };
588
- const ValidProps = {
589
- /**
590
- * Valid status
591
- */
592
- valid: Boolean,
593
- /**
594
- * Valid label
595
- */
596
- validLabel: [String, Array]
597
- };
598
- const InvalidProps = {
599
- /**
600
- * Invalid status
601
- */
602
- invalid: Boolean,
603
- /**
604
- * Invalid label
605
- */
606
- invalidLabel: [String, Array]
607
- };
608
- const LoadingProps = {
609
- /**
610
- * Loading status
611
- */
612
- loading: Boolean,
613
- /**
614
- * Loading label
615
- */
616
- loadingLabel: {
617
- type: String,
618
- default: "Loading..."
619
- }
620
- };
621
- const DisabledProps = {
622
- /**
623
- * Whether the form control is disabled
624
- */
625
- disabled: Boolean
626
- };
627
- const SelectedProps = {
628
- /**
629
- * Whether the item is selected
630
- */
631
- selected: Boolean
632
- };
633
- const ActiveProps = {
634
- /**
635
- * Whether the item is active
636
- */
637
- active: Boolean
638
- };
639
- const PressedProps = {
640
- /**
641
- * Whether the item is pressed
642
- */
643
- pressed: Boolean
644
- };
645
- const LabelProps = {
646
- /**
647
- * The item label
648
- */
649
- label: [String, Number]
650
- };
651
- const ReadonlyProps = {
652
- /**
653
- * The value is not editable
654
- */
655
- readonly: Boolean
656
- };
657
- const ModifiersProps = {
658
- /**
659
- * Component BEM modifiers
660
- */
661
- modifiers: [String, Array]
662
- };
663
- const HintProps = {
664
- hintLabel: { type: String, default: "" }
665
- };
666
- const OptionsProps = {
667
- /**
668
- * List of options, can be string[] or object[]
669
- */
670
- options: {
671
- type: Array,
672
- default: () => []
673
- },
674
- /**
675
- * Used when options are objects: key to use for option label
676
- */
677
- labelKey: { type: [String, Function], default: "label" },
678
- /**
679
- * Used when options are objects: key to use for option label
680
- */
681
- valueKey: { type: [String, Function], default: "value" },
682
- /**
683
- * Used when options are objects: key to use for option disabled
684
- */
685
- disabledKey: { type: [String, Function], default: "disabled" }
686
- };
687
- const CountProps = {
688
- /**
689
- * Show character limit
690
- */
691
- count: {
692
- type: [Boolean, String],
693
- default: false,
694
- validator: (value) => [true, false, "limit", "countdown"].includes(value)
695
- }
696
- };
697
- const DebounceProps = {
698
- /**
699
- * Milliseconds to wait before emitting the input event
700
- */
701
- debounce: [Number, String]
702
- };
703
- const IconProps = {
704
- /**
705
- * VvIcon name or props
706
- * @see VVIcon
707
- */
708
- icon: { type: [String, Object] },
709
- /**
710
- * VvIcon position
711
- */
712
- iconPosition: {
713
- type: String,
714
- default: Position.before,
715
- validation: (value) => Object.values(Position).includes(value)
716
- }
717
- };
718
- const TabindexProps = {
719
- /**
720
- * Global attribute tabindex
721
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
722
- */
723
- 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 }
724
244
  };
725
245
  const FloatingLabelProps = {
726
246
  /**
@@ -817,11 +337,11 @@ const DropdownProps = {
817
337
  default: false
818
338
  },
819
339
  /**
820
- * Close dropdown on click outside
340
+ * Keep open dropdown on click outside
821
341
  */
822
- autoClose: {
342
+ keepOpen: {
823
343
  type: Boolean,
824
- default: true
344
+ default: false
825
345
  },
826
346
  /**
827
347
  * Autofocus first item on dropdown open
@@ -872,99 +392,579 @@ const InputTextareaProps = {
872
392
  ...HintProps,
873
393
  ...LoadingProps,
874
394
  ...ModifiersProps,
875
- ...CountProps,
876
- ...DebounceProps,
877
- ...IconProps,
878
- ...FloatingLabelProps,
879
- ...LabelProps,
880
- /**
881
- * Input / Textarea minlength
882
- * Minimum length (number of characters) of value
883
- * Available for input types: text, search, url, tel, email, password
884
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
885
- */
886
- minlength: [String, Number],
887
- /**
888
- * Input / Textarea maxlength
889
- * Maximum length (number of characters) of value
890
- * Available for input types: text, search, url, tel, email, password
891
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
892
- */
893
- maxlength: [String, Number],
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,
894
829
  /**
895
- * Input / Textarea placeholder
896
- * Text that appears in the form control when it has no value set
897
- * Available for input types: text, search, url, tel, email, password, number
898
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
830
+ * VModel
899
831
  */
900
- placeholder: String,
832
+ modelValue: [String, Array],
901
833
  /**
902
- * Input / Textarea required
903
- * A value is required or must be check for the form to be submittable
904
- * Available for all input types except color
905
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
834
+ * Accordion items
835
+ * @type VvAccordionGroupItem
906
836
  */
907
- required: Boolean
908
- };
909
- const CheckboxRadioProps = {
910
- ...IdNameProps,
911
- ...TabindexProps,
912
- ...ValidProps,
913
- ...InvalidProps,
914
- ...HintProps,
915
- ...DisabledProps,
916
- ...ReadonlyProps,
917
- ...ModifiersProps,
918
- ...LabelProps,
919
- ...LoadingProps,
837
+ items: {
838
+ type: Array,
839
+ default: () => []
840
+ },
920
841
  /**
921
- * Input value
922
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
842
+ * If true, accordion items stay open when another item is opened
923
843
  */
924
- value: [String, Number, Boolean],
844
+ collapse: Boolean,
925
845
  /**
926
- * Input value
846
+ * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
927
847
  */
928
- modelValue: [Object, Number, Boolean, String]
929
- };
930
- const CheckboxRadioGroupProps = {
931
- ...ValidProps,
932
- ...InvalidProps,
933
- ...OptionsProps,
934
- ...HintProps,
935
- ...DisabledProps,
936
- ...ReadonlyProps,
937
- ...ModifiersProps,
938
- ...LabelProps,
939
- ...LoadingProps,
848
+ itemModifiers: {
849
+ type: [String, Array],
850
+ default: ""
851
+ },
940
852
  /**
941
- * Input value
853
+ * If true, the accordion items will be disabled
942
854
  */
943
- modelValue: [String, Array, Boolean, Number, Symbol],
855
+ disabled: Boolean,
944
856
  /**
945
- * Input name
857
+ * If true, the accordion items will be opened by default
946
858
  */
947
- name: { type: String, required: true },
859
+ not: Boolean,
948
860
  /**
949
- * If true, the group will be displayed in a vertical column
861
+ * Enable local storage persistence
950
862
  */
951
- vertical: Boolean
863
+ storeKey: String
952
864
  };
953
- const ActionProps = {
954
- ...DisabledProps,
955
- ...LabelProps,
956
- ...PressedProps,
957
- ...ActiveProps,
958
- ...LinkProps,
959
- /**
960
- * Button type
961
- */
962
- type: {
963
- type: String,
964
- default: ButtonType.button,
965
- validator: (value) => Object.values(ButtonType).includes(value)
966
- }
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"
967
878
  };
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
+ };
966
+ }
967
+ });
968
968
  const VvBadgeProps = {
969
969
  ...ModifiersProps,
970
970
  value: [String, Number]
@@ -1261,11 +1261,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1261
1261
  ...__default__$h,
1262
1262
  props: VvActionProps,
1263
1263
  emits: VvActionEvents,
1264
- setup(__props, { expose, emit }) {
1264
+ setup(__props, { expose: __expose, emit }) {
1265
1265
  const props = __props;
1266
1266
  const volver = useVolver();
1267
1267
  const element = ref(null);
1268
- expose({ $el: element });
1268
+ __expose({ $el: element });
1269
1269
  const {
1270
1270
  reference: dropdownTriggerReference,
1271
1271
  bus: dropdownEventBus,
@@ -1300,7 +1300,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1300
1300
  const toReturn = {
1301
1301
  ...dropdownAria == null ? void 0 : dropdownAria.value,
1302
1302
  "aria-pressed": pressed.value ? true : void 0,
1303
- role
1303
+ role: role == null ? void 0 : role.value
1304
1304
  };
1305
1305
  switch (hasTag.value) {
1306
1306
  case ActionTag.a:
@@ -1484,7 +1484,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1484
1484
  ...__default__$g,
1485
1485
  props: VvButtonProps,
1486
1486
  emits: VvButtonEvents,
1487
- setup(__props, { expose, emit }) {
1487
+ setup(__props, { expose: __expose, emit }) {
1488
1488
  const props = __props;
1489
1489
  const attrs = useAttrs();
1490
1490
  const slots = useSlots();
@@ -1506,7 +1506,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1506
1506
  var _a;
1507
1507
  return (_a = element.value) == null ? void 0 : _a.$el;
1508
1508
  });
1509
- expose({ $el });
1509
+ __expose({ $el });
1510
1510
  const pressed = computed(() => {
1511
1511
  if (!toggle.value) {
1512
1512
  return props.pressed;
@@ -1682,8 +1682,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1682
1682
  }
1683
1683
  });
1684
1684
  const VvCardProps = {
1685
- title: String,
1686
- modifiers: [String, Array]
1685
+ ...ModifiersProps,
1686
+ title: String
1687
1687
  };
1688
1688
  const _hoisted_1$c = {
1689
1689
  key: 0,
@@ -2316,11 +2316,17 @@ const VvComboboxProps = {
2316
2316
  /**
2317
2317
  * Open dropdown on focus
2318
2318
  */
2319
- autoOpen: Boolean,
2319
+ autoOpen: {
2320
+ type: Boolean,
2321
+ default: false
2322
+ },
2320
2323
  /**
2321
- * Close dropdown on select (not multiple)
2324
+ * Keep open dropdown on single select
2322
2325
  */
2323
- autoClose: Boolean
2326
+ keepOpen: {
2327
+ type: Boolean,
2328
+ default: false
2329
+ }
2324
2330
  };
2325
2331
  const VvDropdownProps = {
2326
2332
  ...IdProps,
@@ -2358,19 +2364,14 @@ function useProvideDropdownTrigger({
2358
2364
  const bus = mitt();
2359
2365
  const component = defineComponent({
2360
2366
  name: "VvDropdownTriggerProvider",
2361
- provide() {
2362
- return {
2363
- [INJECTION_KEY_DROPDOWN_TRIGGER]: {
2364
- reference,
2365
- id,
2366
- expanded,
2367
- aria,
2368
- bus
2369
- }
2370
- };
2371
- },
2372
2367
  setup() {
2373
- return {};
2368
+ provide(INJECTION_KEY_DROPDOWN_TRIGGER, {
2369
+ reference,
2370
+ id,
2371
+ expanded,
2372
+ aria,
2373
+ bus
2374
+ });
2374
2375
  },
2375
2376
  render() {
2376
2377
  var _a, _b;
@@ -2399,7 +2400,7 @@ function useProvideDropdownAction({
2399
2400
  expanded
2400
2401
  }) {
2401
2402
  provide(INJECTION_KEY_DROPDOWN_ACTION, {
2402
- role: ActionRoles.menuitem,
2403
+ role: ref(ActionRoles.menuitem),
2403
2404
  expanded
2404
2405
  });
2405
2406
  }
@@ -2418,7 +2419,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2418
2419
  "afterExpand",
2419
2420
  "afterCollapse"
2420
2421
  ],
2421
- setup(__props, { expose, emit }) {
2422
+ setup(__props, { expose: __expose, emit }) {
2422
2423
  const props = __props;
2423
2424
  const { id } = toRefs(props);
2424
2425
  const hasId = useUniqueId(id);
@@ -2563,7 +2564,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2563
2564
  const init = (el) => {
2564
2565
  referenceEl.value = el;
2565
2566
  };
2566
- expose({ toggle, show, hide, init });
2567
+ __expose({ toggle, show, hide, init });
2567
2568
  watch(expanded, (newValue) => {
2568
2569
  if (newValue && props.autofocusFirst) {
2569
2570
  nextTick(() => {
@@ -2579,7 +2580,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2579
2580
  onClickOutside(
2580
2581
  floatingEl,
2581
2582
  () => {
2582
- if (props.autoClose) {
2583
+ if (!props.keepOpen) {
2583
2584
  expanded.value = false;
2584
2585
  }
2585
2586
  },
@@ -2682,7 +2683,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2682
2683
  }
2683
2684
  });
2684
2685
  onKeyStroke([" ", "Enter"], (e) => {
2685
- if (expanded.value && focused.value) {
2686
+ if (expanded.value && focused.value && e.target !== document.activeElement) {
2686
2687
  e.preventDefault();
2687
2688
  const activeElement = document.activeElement;
2688
2689
  activeElement.click();
@@ -2721,7 +2722,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2721
2722
  class: "vv-dropdown__arrow"
2722
2723
  }, null, 4)) : createCommentVNode("", true),
2723
2724
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
2724
- createElementVNode("ul", mergeProps(unref(attrs), {
2725
+ createElementVNode("div", mergeProps(unref(attrs), {
2725
2726
  id: unref(hasId),
2726
2727
  ref_key: "listEl",
2727
2728
  ref: listEl,
@@ -2763,7 +2764,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2763
2764
  }
2764
2765
  });
2765
2766
  return (_ctx, _cache) => {
2766
- return openBlock(), createElementBlock("li", mergeProps({ role: unref(role) }, {
2767
+ return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
2767
2768
  ref_key: "element",
2768
2769
  ref: element,
2769
2770
  class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
@@ -2961,7 +2962,7 @@ const _hoisted_5$3 = ["id"];
2961
2962
  const _hoisted_6$3 = ["disabled", "hidden"];
2962
2963
  const _hoisted_7$3 = ["disabled", "value"];
2963
2964
  const _hoisted_8$2 = ["disabled", "label"];
2964
- const _hoisted_9 = ["disabled", "value"];
2965
+ const _hoisted_9$1 = ["disabled", "value"];
2965
2966
  const _hoisted_10 = {
2966
2967
  key: 1,
2967
2968
  class: "vv-select__input-after"
@@ -3126,7 +3127,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3126
3127
  key: `group-${index}-item-${i}`,
3127
3128
  disabled: unref(getOptionDisabled)(item),
3128
3129
  value: unref(getOptionValue)(item)
3129
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9);
3130
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
3130
3131
  }), 128))
3131
3132
  ], 8, _hoisted_8$2))
3132
3133
  ], 64);
@@ -3242,8 +3243,12 @@ const _hoisted_4$2 = {
3242
3243
  };
3243
3244
  const _hoisted_5$2 = { class: "vv-select__inner" };
3244
3245
  const _hoisted_6$2 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
3245
- const _hoisted_7$2 = ["aria-label", "onClick"];
3246
- const _hoisted_8$1 = {
3246
+ const _hoisted_7$2 = {
3247
+ key: 0,
3248
+ class: "vv-select__value"
3249
+ };
3250
+ const _hoisted_8$1 = ["aria-label", "onClick"];
3251
+ const _hoisted_9 = {
3247
3252
  key: 1,
3248
3253
  class: "vv-select__input-after"
3249
3254
  };
@@ -3373,12 +3378,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3373
3378
  invalid: invalid.value,
3374
3379
  dirty: isDirty.value,
3375
3380
  focus: focused.value,
3376
- floating: floating.value
3381
+ floating: floating.value,
3382
+ badges: props.badges
3377
3383
  }))
3378
3384
  );
3379
- const hasOptions = computed(
3380
- () => props.searchable ? filteredOptions.value : props.options
3381
- );
3382
3385
  const {
3383
3386
  getOptionLabel,
3384
3387
  getOptionValue,
@@ -3422,11 +3425,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3422
3425
  const hasValue = computed(() => {
3423
3426
  return selectedOptions.value.map((option) => getOptionLabel(option)).join(props.separator);
3424
3427
  });
3425
- watch(selectedOptions, () => {
3426
- if (!props.multiple && props.autoClose) {
3427
- collapse();
3428
- }
3429
- });
3430
3428
  const onClickInput = () => {
3431
3429
  props.autoOpen ? expand() : toggleExpanded();
3432
3430
  };
@@ -3450,7 +3448,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3450
3448
  toReturn = [value];
3451
3449
  }
3452
3450
  } else {
3453
- if (props.autoClose) {
3451
+ if (!props.keepOpen) {
3454
3452
  collapse();
3455
3453
  }
3456
3454
  if (props.unselectable && value === props.modelValue) {
@@ -3473,7 +3471,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3473
3471
  disabled: disabled.value,
3474
3472
  readonly: readonly.value,
3475
3473
  modifiers: props.modifiers,
3476
- options: hasOptions.value,
3474
+ options: props.options,
3477
3475
  labelKey: props.labelKey,
3478
3476
  valueKey: props.valueKey,
3479
3477
  icon: props.icon,
@@ -3496,7 +3494,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3496
3494
  flip: props.flip,
3497
3495
  autoPlacement: props.autoPlacement,
3498
3496
  arrow: props.arrow,
3499
- autoClose: props.autoClose,
3500
3497
  autofocusFirst: searchable.value ? false : props.autofocusFirst,
3501
3498
  triggerWidth: props.triggerWidth,
3502
3499
  modifiers: props.dropdownModifiers
@@ -3506,16 +3503,20 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3506
3503
  invalid: props.invalid,
3507
3504
  modelValue: props.modelValue
3508
3505
  }));
3509
- onKeyStroke([" ", "Enter"], (e) => {
3510
- if (props.autoOpen) {
3511
- return;
3512
- }
3513
- if (!expanded.value && focused.value) {
3514
- e.preventDefault();
3515
- e.stopImmediatePropagation();
3516
- toggleExpanded();
3517
- }
3518
- });
3506
+ onKeyStroke(
3507
+ [" ", "Enter"],
3508
+ (e) => {
3509
+ if (props.autoOpen) {
3510
+ return;
3511
+ }
3512
+ if (!expanded.value && focused.value) {
3513
+ e.preventDefault();
3514
+ e.stopImmediatePropagation();
3515
+ toggleExpanded();
3516
+ }
3517
+ },
3518
+ { target: inputEl }
3519
+ );
3519
3520
  return (_ctx, _cache) => {
3520
3521
  return !_ctx.native ? (openBlock(), createElementBlock("div", {
3521
3522
  key: 0,
@@ -3564,9 +3565,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3564
3565
  }), [
3565
3566
  renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
3566
3567
  unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3567
- !_ctx.badges ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3568
- createTextVNode(toDisplayString(unref(hasValue)), 1)
3569
- ], 64)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
3568
+ !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
3570
3569
  return openBlock(), createBlock(_sfc_main$k, {
3571
3570
  key: index,
3572
3571
  modifiers: _ctx.badgeModifiers,
@@ -3580,7 +3579,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3580
3579
  onClick: withModifiers(($event) => onInput(option), ["stop"])
3581
3580
  }, [
3582
3581
  createVNode(_sfc_main$i, { name: "close" })
3583
- ], 8, _hoisted_7$2)) : createCommentVNode("", true)
3582
+ ], 8, _hoisted_8$1)) : createCommentVNode("", true)
3584
3583
  ]),
3585
3584
  _: 2
3586
3585
  }, 1032, ["modifiers"]);
@@ -3595,7 +3594,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3595
3594
  class: "vv-select__icon vv-select__icon-after"
3596
3595
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
3597
3596
  ]),
3598
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
3597
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
3599
3598
  renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3600
3599
  ])) : createCommentVNode("", true)
3601
3600
  ]),
@@ -3777,9 +3776,9 @@ const VvDialogProps = {
3777
3776
  */
3778
3777
  size: String,
3779
3778
  /**
3780
- * Close dialog on click outside
3779
+ * Keep open dialog on click outside
3781
3780
  */
3782
- autoClose: { type: Boolean, default: true }
3781
+ keepOpen: { type: Boolean, default: false }
3783
3782
  };
3784
3783
  const _hoisted_1$4 = {
3785
3784
  key: 0,
@@ -3797,8 +3796,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3797
3796
  ...__default__$5,
3798
3797
  props: VvDialogProps,
3799
3798
  emits: VvDialogEvents,
3800
- setup(__props, { expose, emit }) {
3799
+ setup(__props, { expose: __expose, emit }) {
3801
3800
  const props = __props;
3801
+ const dialogEl = ref();
3802
3802
  const localModelValue = ref(false);
3803
3803
  const modelValue = computed({
3804
3804
  get() {
@@ -3811,13 +3811,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3811
3811
  emit("update:modelValue", value);
3812
3812
  }
3813
3813
  });
3814
- const htmlAttrIsOpen = ref(true);
3815
3814
  const modalWrapper = ref(null);
3816
3815
  const dialogAttrs = computed(() => {
3817
3816
  const { id } = props;
3818
3817
  return {
3819
- id,
3820
- open: htmlAttrIsOpen.value
3818
+ id
3821
3819
  };
3822
3820
  });
3823
3821
  const dialogClass = computed(() => {
@@ -3829,16 +3827,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3829
3827
  const transitioName = computed(() => `vv-dialog--${props.transition}`);
3830
3828
  const dialogTransitionHandlers = {
3831
3829
  "before-enter": () => {
3832
- htmlAttrIsOpen.value = true;
3830
+ var _a;
3831
+ (_a = dialogEl.value) == null ? void 0 : _a.showModal();
3833
3832
  emit("open");
3834
3833
  },
3835
3834
  "after-leave": () => {
3836
- htmlAttrIsOpen.value = false;
3835
+ var _a;
3836
+ (_a = dialogEl.value) == null ? void 0 : _a.close();
3837
3837
  emit("close");
3838
3838
  }
3839
3839
  };
3840
3840
  onClickOutside(modalWrapper, () => {
3841
- if (props.autoClose) {
3841
+ if (!props.keepOpen) {
3842
3842
  modelValue.value = false;
3843
3843
  }
3844
3844
  });
@@ -3848,7 +3848,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3848
3848
  function open() {
3849
3849
  modelValue.value = true;
3850
3850
  }
3851
- expose({ close, open });
3851
+ __expose({ close, open });
3852
3852
  onKeyStroke("Escape", (e) => {
3853
3853
  if (modelValue.value) {
3854
3854
  e.preventDefault();
@@ -3858,7 +3858,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3858
3858
  return (_ctx, _cache) => {
3859
3859
  return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers)), {
3860
3860
  default: withCtx(() => [
3861
- withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), { class: unref(dialogClass) }), [
3861
+ withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), {
3862
+ ref_key: "dialogEl",
3863
+ ref: dialogEl,
3864
+ class: unref(dialogClass)
3865
+ }), [
3862
3866
  createElementVNode("article", {
3863
3867
  ref_key: "modalWrapper",
3864
3868
  ref: modalWrapper,
@@ -4397,12 +4401,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4397
4401
  ...__default__$4,
4398
4402
  props: VvInputTextProps,
4399
4403
  emits: VvInputTextEvents,
4400
- setup(__props, { expose, emit }) {
4404
+ setup(__props, { expose: __expose, emit }) {
4401
4405
  const props = __props;
4402
4406
  const slots = useSlots();
4403
4407
  const inputEl = ref();
4404
4408
  const innerEl = ref();
4405
- expose({ $inner: innerEl });
4409
+ __expose({ $inner: innerEl });
4406
4410
  const {
4407
4411
  id,
4408
4412
  icon,