@volverjs/ui-vue 0.0.3-beta.3 → 0.0.3

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 (830) hide show
  1. package/README.md +4 -3
  2. package/auto-imports.d.ts +10 -6
  3. package/bin/icons.cjs +8 -8
  4. package/bin/icons.js +8 -8
  5. package/dist/Volver.d.ts +39 -13
  6. package/dist/components/VvAccordion/VvAccordion.es.js +68 -41
  7. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  8. package/dist/components/VvAccordion/index.d.ts +2 -2
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +128 -79
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
  12. package/dist/components/VvBadge/VvBadge.es.js +22 -17
  13. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  14. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +48 -57
  15. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  16. package/dist/components/VvButton/VvButton.es.js +313 -172
  17. package/dist/components/VvButton/VvButton.umd.js +1 -1
  18. package/dist/components/VvButton/VvButton.vue.d.ts +21 -24
  19. package/dist/components/VvButton/index.d.ts +13 -19
  20. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +55 -40
  21. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  22. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
  23. package/dist/components/VvCard/VvCard.es.js +22 -24
  24. package/dist/components/VvCard/VvCard.umd.js +1 -1
  25. package/dist/components/VvCheckbox/VvCheckbox.es.js +197 -138
  26. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  27. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +5 -3
  28. package/dist/components/VvCheckbox/index.d.ts +5 -9
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +270 -181
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +12 -1
  32. package/dist/components/VvCheckboxGroup/index.d.ts +5 -0
  33. package/dist/components/VvCombobox/VvCombobox.es.js +1127 -452
  34. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  35. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +254 -21
  36. package/dist/components/VvCombobox/index.d.ts +134 -13
  37. package/dist/components/VvDialog/VvDialog.es.js +169 -78
  38. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  39. package/dist/components/VvDialog/VvDialog.vue.d.ts +3 -9
  40. package/dist/components/VvDialog/index.d.ts +16 -4
  41. package/dist/components/VvDropdown/VvDropdown.es.js +331 -90
  42. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  43. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +184 -51
  44. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +9 -0
  45. package/dist/components/VvDropdown/index.d.ts +73 -31
  46. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +23 -0
  47. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -0
  48. package/dist/components/VvIcon/VvIcon.es.js +82 -19
  49. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  50. package/dist/components/VvInputText/VvInputText.es.js +509 -294
  51. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  52. package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
  53. package/dist/components/VvInputText/index.d.ts +4 -4
  54. package/dist/components/VvProgress/VvProgress.es.js +43 -19
  55. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  56. package/dist/components/VvRadio/VvRadio.es.js +159 -114
  57. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  58. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -2
  59. package/dist/components/VvRadio/index.d.ts +5 -3
  60. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +233 -158
  61. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  62. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +12 -1
  63. package/dist/components/VvRadioGroup/index.d.ts +5 -0
  64. package/dist/components/VvSelect/VvSelect.es.js +366 -201
  65. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  66. package/dist/components/VvSelect/VvSelect.vue.d.ts +33 -17
  67. package/dist/components/VvSelect/index.d.ts +8 -4
  68. package/dist/components/VvTextarea/VvTextarea.es.js +381 -202
  69. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  70. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +9 -9
  71. package/dist/components/VvTextarea/index.d.ts +8 -5
  72. package/dist/components/VvTooltip/VvTooltip.es.js +34 -14
  73. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  74. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +11 -5
  75. package/dist/components/VvTooltip/index.d.ts +7 -9
  76. package/dist/components/index.es.js +2324 -1339
  77. package/dist/components/index.umd.js +1 -1
  78. package/dist/composables/dropdown/useInjectDropdown.d.ts +31 -0
  79. package/dist/composables/dropdown/useProvideDropdown.d.ts +36 -0
  80. package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
  81. package/dist/composables/group/useProvideGroupState.d.ts +2 -2
  82. package/dist/composables/useComponentIcon.d.ts +10 -0
  83. package/dist/composables/useModifiers.d.ts +1 -9
  84. package/dist/composables/useOptions.d.ts +2 -1
  85. package/dist/composables/useUniqueId.d.ts +2 -0
  86. package/dist/composables/useVolver.d.ts +2 -0
  87. package/dist/constants.d.ts +29 -4
  88. package/dist/directives/index.d.ts +4 -0
  89. package/dist/directives/v-tooltip.d.ts +3 -0
  90. package/dist/icons.d.ts +9 -0
  91. package/dist/icons.es.js +30 -21
  92. package/dist/icons.umd.js +1 -1
  93. package/dist/index.d.ts +1 -1
  94. package/dist/index.es.js +2463 -1393
  95. package/dist/index.umd.js +1 -1
  96. package/dist/props/index.d.ts +149 -23
  97. package/dist/resolvers/unplugin.es.js +20 -20
  98. package/dist/resolvers/unplugin.umd.js +1 -1
  99. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +14 -0
  100. package/dist/stories/Combobox/Combobox.settings.d.ts +226 -3
  101. package/dist/stories/Dropdown/Dropdown.settings.d.ts +138 -28
  102. package/dist/stories/Dropdown/Dropdown.test.d.ts +1 -1
  103. package/dist/stories/InputText/InputText.settings.d.ts +24 -24
  104. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +14 -0
  105. package/dist/stories/Select/Select.settings.d.ts +15 -1
  106. package/dist/stories/Textarea/Textarea.settings.d.ts +24 -24
  107. package/dist/stories/Tooltip/Tooltip.settings.d.ts +1 -1
  108. package/dist/stories/argTypes.d.ts +164 -3
  109. package/package.json +52 -42
  110. package/src/Volver.ts +145 -33
  111. package/src/assets/icons/detailed/add-circle.svg +12 -1
  112. package/src/assets/icons/detailed/add.svg +8 -1
  113. package/src/assets/icons/detailed/align-center.svg +12 -1
  114. package/src/assets/icons/detailed/align-justify.svg +12 -1
  115. package/src/assets/icons/detailed/align-left.svg +12 -1
  116. package/src/assets/icons/detailed/align-right.svg +12 -1
  117. package/src/assets/icons/detailed/analysis-2.svg +20 -1
  118. package/src/assets/icons/detailed/analysis-3.svg +8 -1
  119. package/src/assets/icons/detailed/analysis.svg +16 -1
  120. package/src/assets/icons/detailed/apple.svg +16 -1
  121. package/src/assets/icons/detailed/arrow-down.svg +8 -1
  122. package/src/assets/icons/detailed/arrow-left.svg +8 -1
  123. package/src/assets/icons/detailed/arrow-right.svg +8 -1
  124. package/src/assets/icons/detailed/arrow-up.svg +8 -1
  125. package/src/assets/icons/detailed/attachment.svg +8 -1
  126. package/src/assets/icons/detailed/back-to-front.svg +17 -1
  127. package/src/assets/icons/detailed/bell-active.svg +14 -1
  128. package/src/assets/icons/detailed/bell.svg +14 -1
  129. package/src/assets/icons/detailed/bold.svg +8 -1
  130. package/src/assets/icons/detailed/bookmark-active.svg +12 -1
  131. package/src/assets/icons/detailed/bookmark.svg +12 -1
  132. package/src/assets/icons/detailed/building.svg +26 -1
  133. package/src/assets/icons/detailed/bullet-list.svg +22 -1
  134. package/src/assets/icons/detailed/calendar.svg +26 -1
  135. package/src/assets/icons/detailed/camera-off.svg +12 -1
  136. package/src/assets/icons/detailed/camera-on.svg +17 -1
  137. package/src/assets/icons/detailed/catalog.svg +15 -1
  138. package/src/assets/icons/detailed/certificate.svg +10 -1
  139. package/src/assets/icons/detailed/chat.svg +6 -1
  140. package/src/assets/icons/detailed/check-badge.svg +9 -1
  141. package/src/assets/icons/detailed/check-circle.svg +10 -1
  142. package/src/assets/icons/detailed/check.svg +6 -1
  143. package/src/assets/icons/detailed/checkbox.svg +8 -1
  144. package/src/assets/icons/detailed/chevron-down-circle.svg +10 -1
  145. package/src/assets/icons/detailed/chevron-down.svg +6 -1
  146. package/src/assets/icons/detailed/chevron-left-circle.svg +10 -1
  147. package/src/assets/icons/detailed/chevron-left.svg +6 -1
  148. package/src/assets/icons/detailed/chevron-right-circle.svg +7 -1
  149. package/src/assets/icons/detailed/chevron-up-circle.svg +10 -1
  150. package/src/assets/icons/detailed/chevron-up.svg +6 -1
  151. package/src/assets/icons/detailed/circle.svg +8 -0
  152. package/src/assets/icons/detailed/classroom.svg +38 -1
  153. package/src/assets/icons/detailed/clear-field.svg +14 -1
  154. package/src/assets/icons/detailed/clear-style.svg +9 -1
  155. package/src/assets/icons/detailed/close-circle.svg +14 -1
  156. package/src/assets/icons/detailed/close-loader.svg +6 -1
  157. package/src/assets/icons/detailed/close.svg +8 -1
  158. package/src/assets/icons/detailed/coffee.svg +21 -1
  159. package/src/assets/icons/detailed/color.svg +20 -1
  160. package/src/assets/icons/detailed/contact-us.svg +27 -1
  161. package/src/assets/icons/detailed/copy.svg +10 -1
  162. package/src/assets/icons/detailed/courses.svg +22 -1
  163. package/src/assets/icons/detailed/dashboard.svg +20 -1
  164. package/src/assets/icons/detailed/download.svg +10 -1
  165. package/src/assets/icons/detailed/drag.svg +10 -1
  166. package/src/assets/icons/detailed/duplicate.svg +23 -1
  167. package/src/assets/icons/detailed/edit.svg +16 -1
  168. package/src/assets/icons/detailed/elearning.svg +13 -1
  169. package/src/assets/icons/detailed/email.svg +11 -1
  170. package/src/assets/icons/detailed/error-2.svg +8 -1
  171. package/src/assets/icons/detailed/error.svg +12 -1
  172. package/src/assets/icons/detailed/exercise.svg +26 -1
  173. package/src/assets/icons/detailed/external-link.svg +11 -1
  174. package/src/assets/icons/detailed/extract.svg +20 -1
  175. package/src/assets/icons/detailed/eye-off.svg +15 -1
  176. package/src/assets/icons/detailed/eye-on.svg +8 -1
  177. package/src/assets/icons/detailed/fail.svg +11 -1
  178. package/src/assets/icons/detailed/fast-back.svg +20 -1
  179. package/src/assets/icons/detailed/fast-forward.svg +20 -1
  180. package/src/assets/icons/detailed/file-add.svg +19 -1
  181. package/src/assets/icons/detailed/file-duplicate.svg +16 -1
  182. package/src/assets/icons/detailed/file-remove.svg +17 -1
  183. package/src/assets/icons/detailed/file-required.svg +23 -1
  184. package/src/assets/icons/detailed/file.svg +13 -1
  185. package/src/assets/icons/detailed/filter-2.svg +22 -1
  186. package/src/assets/icons/detailed/filter-active.svg +12 -1
  187. package/src/assets/icons/detailed/filter.svg +12 -1
  188. package/src/assets/icons/detailed/flag.svg +11 -1
  189. package/src/assets/icons/detailed/folder.svg +14 -1
  190. package/src/assets/icons/detailed/full-width.svg +11 -1
  191. package/src/assets/icons/detailed/go-to-back.svg +19 -1
  192. package/src/assets/icons/detailed/grid.svg +20 -1
  193. package/src/assets/icons/detailed/group-add.svg +24 -1
  194. package/src/assets/icons/detailed/group.svg +16 -1
  195. package/src/assets/icons/detailed/heart-active.svg +12 -1
  196. package/src/assets/icons/detailed/heart.svg +12 -1
  197. package/src/assets/icons/detailed/highlighter.svg +10 -1
  198. package/src/assets/icons/detailed/home.svg +12 -1
  199. package/src/assets/icons/detailed/hourglass.svg +12 -1
  200. package/src/assets/icons/detailed/image.svg +15 -1
  201. package/src/assets/icons/detailed/info-badge.svg +9 -1
  202. package/src/assets/icons/detailed/information.svg +12 -1
  203. package/src/assets/icons/detailed/italic.svg +10 -1
  204. package/src/assets/icons/detailed/key.svg +5 -1
  205. package/src/assets/icons/detailed/language.svg +14 -1
  206. package/src/assets/icons/detailed/learning-path.svg +7 -1
  207. package/src/assets/icons/detailed/light-off.svg +10 -1
  208. package/src/assets/icons/detailed/light-on.svg +18 -1
  209. package/src/assets/icons/detailed/link.svg +12 -1
  210. package/src/assets/icons/detailed/lock.svg +13 -1
  211. package/src/assets/icons/detailed/login.svg +11 -1
  212. package/src/assets/icons/detailed/logout.svg +11 -1
  213. package/src/assets/icons/detailed/maximaze.svg +12 -1
  214. package/src/assets/icons/detailed/menu.svg +9 -1
  215. package/src/assets/icons/detailed/merge.svg +20 -1
  216. package/src/assets/icons/detailed/minimize.svg +14 -1
  217. package/src/assets/icons/detailed/mixed-class.svg +40 -1
  218. package/src/assets/icons/detailed/more-horizontal.svg +7 -1
  219. package/src/assets/icons/detailed/more-vertical.svg +7 -1
  220. package/src/assets/icons/detailed/news.svg +12 -1
  221. package/src/assets/icons/detailed/no-prerequisites.svg +13 -1
  222. package/src/assets/icons/detailed/notes.svg +14 -1
  223. package/src/assets/icons/detailed/number-code.svg +34 -1
  224. package/src/assets/icons/detailed/numbered-list.svg +18 -1
  225. package/src/assets/icons/detailed/on-site.svg +22 -1
  226. package/src/assets/icons/detailed/order-down.svg +12 -1
  227. package/src/assets/icons/detailed/order-up.svg +12 -1
  228. package/src/assets/icons/detailed/paste.svg +14 -1
  229. package/src/assets/icons/detailed/pausa.svg +8 -1
  230. package/src/assets/icons/detailed/pdf.svg +12 -1
  231. package/src/assets/icons/detailed/phone.svg +10 -1
  232. package/src/assets/icons/detailed/pin-map.svg +12 -1
  233. package/src/assets/icons/detailed/pin.svg +15 -1
  234. package/src/assets/icons/detailed/pizza.svg +17 -1
  235. package/src/assets/icons/detailed/play.svg +11 -1
  236. package/src/assets/icons/detailed/plug-in.svg +10 -1
  237. package/src/assets/icons/detailed/pointer.svg +12 -1
  238. package/src/assets/icons/detailed/printer.svg +26 -1
  239. package/src/assets/icons/detailed/profile-add.svg +20 -1
  240. package/src/assets/icons/detailed/profile.svg +10 -1
  241. package/src/assets/icons/detailed/push-pin-off.svg +11 -1
  242. package/src/assets/icons/detailed/push-pin-on.svg +9 -1
  243. package/src/assets/icons/detailed/qrcode.svg +28 -1
  244. package/src/assets/icons/detailed/question-badge.svg +10 -1
  245. package/src/assets/icons/detailed/radio.svg +8 -1
  246. package/src/assets/icons/detailed/redo.svg +9 -1
  247. package/src/assets/icons/detailed/relations.svg +32 -1
  248. package/src/assets/icons/detailed/reload.svg +13 -1
  249. package/src/assets/icons/detailed/remove-circle.svg +10 -1
  250. package/src/assets/icons/detailed/remove.svg +5 -1
  251. package/src/assets/icons/detailed/reorder.svg +12 -1
  252. package/src/assets/icons/detailed/repeat.svg +12 -1
  253. package/src/assets/icons/detailed/repository.svg +18 -1
  254. package/src/assets/icons/detailed/request-form.svg +18 -1
  255. package/src/assets/icons/detailed/resize-100%.svg +15 -1
  256. package/src/assets/icons/detailed/resize-height.svg +12 -1
  257. package/src/assets/icons/detailed/resize-width.svg +12 -1
  258. package/src/assets/icons/detailed/search.svg +12 -1
  259. package/src/assets/icons/detailed/sequential-prerequisites.svg +20 -1
  260. package/src/assets/icons/detailed/settings.svg +14 -1
  261. package/src/assets/icons/detailed/share.svg +20 -1
  262. package/src/assets/icons/detailed/sketch.svg +12 -1
  263. package/src/assets/icons/detailed/skills.svg +20 -1
  264. package/src/assets/icons/detailed/skip-back.svg +12 -1
  265. package/src/assets/icons/detailed/skip-forward.svg +13 -1
  266. package/src/assets/icons/detailed/sms.svg +18 -1
  267. package/src/assets/icons/detailed/sso-access.svg +18 -1
  268. package/src/assets/icons/detailed/star-active.svg +6 -1
  269. package/src/assets/icons/detailed/star.svg +6 -1
  270. package/src/assets/icons/detailed/success.svg +10 -1
  271. package/src/assets/icons/detailed/sun.svg +24 -1
  272. package/src/assets/icons/detailed/sunrise.svg +18 -1
  273. package/src/assets/icons/detailed/support.svg +18 -1
  274. package/src/assets/icons/detailed/survey.svg +24 -1
  275. package/src/assets/icons/detailed/table.svg +11 -1
  276. package/src/assets/icons/detailed/tematic-channels.svg +12 -1
  277. package/src/assets/icons/detailed/test.svg +14 -1
  278. package/src/assets/icons/detailed/text-body.svg +8 -1
  279. package/src/assets/icons/detailed/text-edit.svg +11 -1
  280. package/src/assets/icons/detailed/text-style.svg +10 -1
  281. package/src/assets/icons/detailed/time.svg +10 -1
  282. package/src/assets/icons/detailed/toilet-piper.svg +15 -1
  283. package/src/assets/icons/detailed/training-points.svg +16 -1
  284. package/src/assets/icons/detailed/trash.svg +19 -1
  285. package/src/assets/icons/detailed/underline.svg +8 -1
  286. package/src/assets/icons/detailed/undo.svg +9 -1
  287. package/src/assets/icons/detailed/unlock.svg +13 -1
  288. package/src/assets/icons/detailed/upload.svg +10 -1
  289. package/src/assets/icons/detailed/user-add.svg +16 -1
  290. package/src/assets/icons/detailed/user-badge.svg +11 -1
  291. package/src/assets/icons/detailed/user.svg +8 -1
  292. package/src/assets/icons/detailed/video-off.svg +17 -1
  293. package/src/assets/icons/detailed/video-on.svg +16 -1
  294. package/src/assets/icons/detailed/video-rec.svg +19 -1
  295. package/src/assets/icons/detailed/view-card.svg +12 -1
  296. package/src/assets/icons/detailed/view-list.svg +20 -1
  297. package/src/assets/icons/detailed/view.svg +7 -1
  298. package/src/assets/icons/detailed/voice-off.svg +14 -1
  299. package/src/assets/icons/detailed/voice-on.svg +16 -1
  300. package/src/assets/icons/detailed/volume-down.svg +14 -1
  301. package/src/assets/icons/detailed/volume-off.svg +19 -1
  302. package/src/assets/icons/detailed/volume-up.svg +16 -1
  303. package/src/assets/icons/detailed/warning.svg +16 -1
  304. package/src/assets/icons/detailed/webinar.svg +57 -1
  305. package/src/assets/icons/detailed/whiteboard.svg +16 -1
  306. package/src/assets/icons/detailed/wine.svg +22 -1
  307. package/src/assets/icons/detailed/zip.svg +17 -1
  308. package/src/assets/icons/detailed/zoom-in.svg +18 -1
  309. package/src/assets/icons/detailed/zoom-out.svg +16 -1
  310. package/src/assets/icons/detailed.json +1 -1
  311. package/src/assets/icons/normal/add-circle.svg +12 -1
  312. package/src/assets/icons/normal/add.svg +4 -1
  313. package/src/assets/icons/normal/align-center.svg +11 -1
  314. package/src/assets/icons/normal/align-justify.svg +11 -1
  315. package/src/assets/icons/normal/align-left.svg +11 -1
  316. package/src/assets/icons/normal/align-right.svg +11 -1
  317. package/src/assets/icons/normal/analysis-2.svg +18 -1
  318. package/src/assets/icons/normal/analysis-3.svg +8 -1
  319. package/src/assets/icons/normal/analysis.svg +14 -1
  320. package/src/assets/icons/normal/apple.svg +16 -1
  321. package/src/assets/icons/normal/arrow-down.svg +8 -1
  322. package/src/assets/icons/normal/arrow-left.svg +8 -1
  323. package/src/assets/icons/normal/arrow-right.svg +8 -1
  324. package/src/assets/icons/normal/arrow-up.svg +8 -1
  325. package/src/assets/icons/normal/attachment.svg +6 -1
  326. package/src/assets/icons/normal/back-to-front.svg +15 -1
  327. package/src/assets/icons/normal/bell-active.svg +14 -1
  328. package/src/assets/icons/normal/bell.svg +14 -1
  329. package/src/assets/icons/normal/bold.svg +8 -1
  330. package/src/assets/icons/normal/bookmark active.svg +12 -1
  331. package/src/assets/icons/normal/bookmark.svg +10 -1
  332. package/src/assets/icons/normal/building.svg +21 -1
  333. package/src/assets/icons/normal/bulleted-list.svg +23 -1
  334. package/src/assets/icons/normal/calendar.svg +20 -1
  335. package/src/assets/icons/normal/camera-off.svg +17 -1
  336. package/src/assets/icons/normal/camera-on.svg +16 -1
  337. package/src/assets/icons/normal/catalog.svg +13 -1
  338. package/src/assets/icons/normal/certificate.svg +12 -1
  339. package/src/assets/icons/normal/chat.svg +6 -1
  340. package/src/assets/icons/normal/check-badge.svg +9 -1
  341. package/src/assets/icons/normal/check-circle.svg +10 -1
  342. package/src/assets/icons/normal/check.svg +4 -1
  343. package/src/assets/icons/normal/checkbox.svg +8 -1
  344. package/src/assets/icons/normal/chevron-down-circle.svg +10 -1
  345. package/src/assets/icons/normal/chevron-down.svg +6 -1
  346. package/src/assets/icons/normal/chevron-left-circle.svg +10 -1
  347. package/src/assets/icons/normal/chevron-left.svg +6 -1
  348. package/src/assets/icons/normal/chevron-right-circle.svg +10 -1
  349. package/src/assets/icons/normal/chevron-right.svg +7 -1
  350. package/src/assets/icons/normal/chevron-up-circle.svg +10 -1
  351. package/src/assets/icons/normal/chevron-up.svg +6 -1
  352. package/src/assets/icons/normal/circle.svg +8 -0
  353. package/src/assets/icons/normal/classroom.svg +36 -1
  354. package/src/assets/icons/normal/clear-field.svg +14 -1
  355. package/src/assets/icons/normal/clear-style.svg +18 -1
  356. package/src/assets/icons/normal/close-circle.svg +14 -1
  357. package/src/assets/icons/normal/close-loader.svg +6 -1
  358. package/src/assets/icons/normal/close.svg +8 -1
  359. package/src/assets/icons/normal/coffee.svg +26 -1
  360. package/src/assets/icons/normal/color.svg +18 -1
  361. package/src/assets/icons/normal/contact-us.svg +29 -1
  362. package/src/assets/icons/normal/copy.svg +10 -1
  363. package/src/assets/icons/normal/courses.svg +22 -1
  364. package/src/assets/icons/normal/dashboard.svg +18 -1
  365. package/src/assets/icons/normal/download.svg +10 -1
  366. package/src/assets/icons/normal/drag.svg +5 -1
  367. package/src/assets/icons/normal/dulicate.svg +22 -1
  368. package/src/assets/icons/normal/edit.svg +16 -1
  369. package/src/assets/icons/normal/elearning.svg +16 -1
  370. package/src/assets/icons/normal/email.svg +11 -1
  371. package/src/assets/icons/normal/error-2.svg +8 -1
  372. package/src/assets/icons/normal/error.svg +12 -1
  373. package/src/assets/icons/normal/exercise.svg +26 -1
  374. package/src/assets/icons/normal/external-link.svg +11 -1
  375. package/src/assets/icons/normal/extract.svg +14 -1
  376. package/src/assets/icons/normal/eye-off.svg +14 -1
  377. package/src/assets/icons/normal/eye-on.svg +16 -1
  378. package/src/assets/icons/normal/fail.svg +11 -1
  379. package/src/assets/icons/normal/fast-back.svg +19 -1
  380. package/src/assets/icons/normal/fast-forward.svg +17 -1
  381. package/src/assets/icons/normal/file-add.svg +16 -1
  382. package/src/assets/icons/normal/file-duplicate.svg +22 -1
  383. package/src/assets/icons/normal/file-remove.svg +14 -1
  384. package/src/assets/icons/normal/file-required.svg +24 -1
  385. package/src/assets/icons/normal/file.svg +13 -1
  386. package/src/assets/icons/normal/filter-2.svg +20 -1
  387. package/src/assets/icons/normal/filter-active.svg +12 -1
  388. package/src/assets/icons/normal/filter.svg +12 -1
  389. package/src/assets/icons/normal/flag.svg +10 -1
  390. package/src/assets/icons/normal/folder.svg +12 -1
  391. package/src/assets/icons/normal/full-width.svg +9 -1
  392. package/src/assets/icons/normal/go-to-back.svg +19 -1
  393. package/src/assets/icons/normal/grid.svg +20 -1
  394. package/src/assets/icons/normal/group-add.svg +18 -1
  395. package/src/assets/icons/normal/group.svg +14 -1
  396. package/src/assets/icons/normal/heart-active.svg +10 -1
  397. package/src/assets/icons/normal/heart.svg +10 -1
  398. package/src/assets/icons/normal/highlighter.svg +11 -1
  399. package/src/assets/icons/normal/home.svg +12 -1
  400. package/src/assets/icons/normal/hourglass.svg +8 -1
  401. package/src/assets/icons/normal/image.svg +15 -1
  402. package/src/assets/icons/normal/info-badge.svg +9 -1
  403. package/src/assets/icons/normal/information.svg +12 -1
  404. package/src/assets/icons/normal/italic.svg +10 -1
  405. package/src/assets/icons/normal/key.svg +8 -1
  406. package/src/assets/icons/normal/language.svg +14 -1
  407. package/src/assets/icons/normal/learning-path.svg +7 -1
  408. package/src/assets/icons/normal/light-off.svg +10 -1
  409. package/src/assets/icons/normal/light-on.svg +17 -1
  410. package/src/assets/icons/normal/link.svg +12 -1
  411. package/src/assets/icons/normal/lock.svg +12 -1
  412. package/src/assets/icons/normal/login.svg +10 -1
  413. package/src/assets/icons/normal/logout.svg +10 -1
  414. package/src/assets/icons/normal/maximize.svg +10 -1
  415. package/src/assets/icons/normal/menu.svg +8 -1
  416. package/src/assets/icons/normal/merge.svg +20 -1
  417. package/src/assets/icons/normal/minimize.svg +12 -1
  418. package/src/assets/icons/normal/mixed-class.svg +36 -1
  419. package/src/assets/icons/normal/more-horizontal.svg +7 -1
  420. package/src/assets/icons/normal/more-vertical.svg +7 -1
  421. package/src/assets/icons/normal/news.svg +9 -1
  422. package/src/assets/icons/normal/no-prerequisites.svg +12 -1
  423. package/src/assets/icons/normal/notes.svg +15 -1
  424. package/src/assets/icons/normal/number-code.svg +34 -1
  425. package/src/assets/icons/normal/numbered-list.svg +19 -1
  426. package/src/assets/icons/normal/on-site.svg +18 -1
  427. package/src/assets/icons/normal/order-down.svg +12 -1
  428. package/src/assets/icons/normal/order-up.svg +11 -1
  429. package/src/assets/icons/normal/paste.svg +14 -1
  430. package/src/assets/icons/normal/pausa.svg +7 -1
  431. package/src/assets/icons/normal/pdf.svg +12 -1
  432. package/src/assets/icons/normal/phone.svg +10 -1
  433. package/src/assets/icons/normal/pin-map.svg +10 -1
  434. package/src/assets/icons/normal/pin.svg +12 -1
  435. package/src/assets/icons/normal/pizza.svg +17 -1
  436. package/src/assets/icons/normal/play.svg +9 -1
  437. package/src/assets/icons/normal/plug-in.svg +10 -1
  438. package/src/assets/icons/normal/pointer.svg +12 -1
  439. package/src/assets/icons/normal/printer.svg +28 -1
  440. package/src/assets/icons/normal/profile-add.svg +28 -1
  441. package/src/assets/icons/normal/profile.svg +15 -1
  442. package/src/assets/icons/normal/push pin on.svg +9 -1
  443. package/src/assets/icons/normal/push-pin-off.svg +23 -1
  444. package/src/assets/icons/normal/qrcode.svg +26 -1
  445. package/src/assets/icons/normal/question-badge.svg +10 -1
  446. package/src/assets/icons/normal/radio.svg +8 -1
  447. package/src/assets/icons/normal/redo.svg +9 -1
  448. package/src/assets/icons/normal/relations.svg +28 -1
  449. package/src/assets/icons/normal/reload.svg +12 -1
  450. package/src/assets/icons/normal/remove-circle.svg +10 -1
  451. package/src/assets/icons/normal/remove.svg +4 -1
  452. package/src/assets/icons/normal/reorder.svg +12 -1
  453. package/src/assets/icons/normal/repeat.svg +12 -1
  454. package/src/assets/icons/normal/repository.svg +18 -1
  455. package/src/assets/icons/normal/request-form.svg +18 -1
  456. package/src/assets/icons/normal/resize-100%.svg +17 -1
  457. package/src/assets/icons/normal/resize-height.svg +12 -1
  458. package/src/assets/icons/normal/resize-width.svg +12 -1
  459. package/src/assets/icons/normal/search.svg +10 -1
  460. package/src/assets/icons/normal/sequential-prerequisites.svg +20 -1
  461. package/src/assets/icons/normal/settings.svg +14 -1
  462. package/src/assets/icons/normal/share.svg +20 -1
  463. package/src/assets/icons/normal/sketch.svg +11 -1
  464. package/src/assets/icons/normal/skills.svg +16 -1
  465. package/src/assets/icons/normal/skip-back.svg +12 -1
  466. package/src/assets/icons/normal/skip-forward.svg +13 -1
  467. package/src/assets/icons/normal/sms.svg +20 -1
  468. package/src/assets/icons/normal/sso-access.svg +20 -1
  469. package/src/assets/icons/normal/star-active.svg +4 -1
  470. package/src/assets/icons/normal/star.svg +4 -1
  471. package/src/assets/icons/normal/success.svg +10 -1
  472. package/src/assets/icons/normal/sun.svg +24 -1
  473. package/src/assets/icons/normal/sunrise.svg +18 -1
  474. package/src/assets/icons/normal/support.svg +18 -1
  475. package/src/assets/icons/normal/survey.svg +24 -1
  476. package/src/assets/icons/normal/table.svg +11 -1
  477. package/src/assets/icons/normal/tematic-channels.svg +10 -1
  478. package/src/assets/icons/normal/test.svg +15 -1
  479. package/src/assets/icons/normal/text-body.svg +8 -1
  480. package/src/assets/icons/normal/text-edit.svg +11 -1
  481. package/src/assets/icons/normal/text-style.svg +10 -1
  482. package/src/assets/icons/normal/time.svg +10 -1
  483. package/src/assets/icons/normal/toilet-paper.svg +15 -1
  484. package/src/assets/icons/normal/training-points.svg +16 -1
  485. package/src/assets/icons/normal/trash.svg +19 -1
  486. package/src/assets/icons/normal/underline.svg +8 -1
  487. package/src/assets/icons/normal/undo.svg +9 -1
  488. package/src/assets/icons/normal/unlock.svg +13 -1
  489. package/src/assets/icons/normal/upload.svg +10 -1
  490. package/src/assets/icons/normal/user-add.svg +14 -1
  491. package/src/assets/icons/normal/user-badge.svg +11 -1
  492. package/src/assets/icons/normal/user.svg +5 -1
  493. package/src/assets/icons/normal/video-off.svg +11 -1
  494. package/src/assets/icons/normal/video-on.svg +20 -1
  495. package/src/assets/icons/normal/video-rec.svg +23 -1
  496. package/src/assets/icons/normal/view-card.svg +10 -1
  497. package/src/assets/icons/normal/view-list.svg +18 -1
  498. package/src/assets/icons/normal/view.svg +8 -1
  499. package/src/assets/icons/normal/voice-off.svg +18 -1
  500. package/src/assets/icons/normal/voice-on.svg +15 -1
  501. package/src/assets/icons/normal/volume-down.svg +14 -1
  502. package/src/assets/icons/normal/volume-off.svg +18 -1
  503. package/src/assets/icons/normal/volume-up.svg +16 -1
  504. package/src/assets/icons/normal/warning.svg +16 -1
  505. package/src/assets/icons/normal/webinar.svg +36 -1
  506. package/src/assets/icons/normal/whiteboard.svg +17 -1
  507. package/src/assets/icons/normal/wine.svg +22 -1
  508. package/src/assets/icons/normal/zip.svg +19 -1
  509. package/src/assets/icons/normal/zoom-in.svg +16 -1
  510. package/src/assets/icons/normal/zoom-out.svg +14 -1
  511. package/src/assets/icons/normal.json +1 -1
  512. package/src/assets/icons/simple/add-circle.svg +12 -1
  513. package/src/assets/icons/simple/add.svg +8 -1
  514. package/src/assets/icons/simple/align-center.svg +12 -1
  515. package/src/assets/icons/simple/align-justify.svg +12 -1
  516. package/src/assets/icons/simple/align-left.svg +12 -1
  517. package/src/assets/icons/simple/align-right.svg +12 -1
  518. package/src/assets/icons/simple/analysis-2.svg +21 -1
  519. package/src/assets/icons/simple/analysis-3.svg +8 -1
  520. package/src/assets/icons/simple/analysis.svg +16 -1
  521. package/src/assets/icons/simple/apple.svg +18 -1
  522. package/src/assets/icons/simple/arrow-down.svg +8 -1
  523. package/src/assets/icons/simple/arrow-left.svg +8 -1
  524. package/src/assets/icons/simple/arrow-right.svg +8 -1
  525. package/src/assets/icons/simple/arrow-up.svg +8 -1
  526. package/src/assets/icons/simple/attachment.svg +10 -1
  527. package/src/assets/icons/simple/bck-to-front.svg +19 -1
  528. package/src/assets/icons/simple/bell-active.svg +14 -1
  529. package/src/assets/icons/simple/bell.svg +14 -1
  530. package/src/assets/icons/simple/bold.svg +8 -1
  531. package/src/assets/icons/simple/bookmark-active.svg +12 -1
  532. package/src/assets/icons/simple/bookmark.svg +12 -1
  533. package/src/assets/icons/simple/building.svg +25 -1
  534. package/src/assets/icons/simple/bulleted-list.svg +22 -1
  535. package/src/assets/icons/simple/calendar.svg +22 -1
  536. package/src/assets/icons/simple/camera-off.svg +12 -1
  537. package/src/assets/icons/simple/camera-on.svg +16 -1
  538. package/src/assets/icons/simple/catalog.svg +14 -1
  539. package/src/assets/icons/simple/certificate.svg +15 -1
  540. package/src/assets/icons/simple/chat.svg +9 -1
  541. package/src/assets/icons/simple/check-badge.svg +9 -1
  542. package/src/assets/icons/simple/check-circle.svg +10 -1
  543. package/src/assets/icons/simple/check.svg +6 -1
  544. package/src/assets/icons/simple/checkbox.svg +6 -1
  545. package/src/assets/icons/simple/chevron-down-circle.svg +10 -1
  546. package/src/assets/icons/simple/chevron-down.svg +6 -1
  547. package/src/assets/icons/simple/chevron-left-circle.svg +10 -1
  548. package/src/assets/icons/simple/chevron-left.svg +6 -1
  549. package/src/assets/icons/simple/chevron-right-circle.svg +10 -1
  550. package/src/assets/icons/simple/chevron-right.svg +7 -1
  551. package/src/assets/icons/simple/chevron-up-circle.svg +10 -1
  552. package/src/assets/icons/simple/chevron-up.svg +6 -1
  553. package/src/assets/icons/simple/circle.svg +8 -0
  554. package/src/assets/icons/simple/classroom.svg +38 -1
  555. package/src/assets/icons/simple/clear-field.svg +11 -1
  556. package/src/assets/icons/simple/clear-style.svg +15 -1
  557. package/src/assets/icons/simple/close-circle.svg +14 -1
  558. package/src/assets/icons/simple/close-loader.svg +6 -1
  559. package/src/assets/icons/simple/close.svg +10 -1
  560. package/src/assets/icons/simple/coffee.svg +28 -1
  561. package/src/assets/icons/simple/color.svg +20 -1
  562. package/src/assets/icons/simple/contact-us.svg +26 -1
  563. package/src/assets/icons/simple/copy.svg +10 -1
  564. package/src/assets/icons/simple/courses.svg +21 -1
  565. package/src/assets/icons/simple/dashboard.svg +20 -1
  566. package/src/assets/icons/simple/download.svg +10 -1
  567. package/src/assets/icons/simple/drag.svg +10 -1
  568. package/src/assets/icons/simple/duplicate.svg +24 -1
  569. package/src/assets/icons/simple/edit.svg +17 -1
  570. package/src/assets/icons/simple/elearning.svg +17 -1
  571. package/src/assets/icons/simple/email.svg +11 -1
  572. package/src/assets/icons/simple/error-2.svg +8 -1
  573. package/src/assets/icons/simple/error.svg +12 -1
  574. package/src/assets/icons/simple/exercise.svg +30 -1
  575. package/src/assets/icons/simple/external-link.svg +13 -1
  576. package/src/assets/icons/simple/extract.svg +17 -1
  577. package/src/assets/icons/simple/eye-off.svg +13 -1
  578. package/src/assets/icons/simple/eye-on.svg +11 -1
  579. package/src/assets/icons/simple/fail.svg +11 -1
  580. package/src/assets/icons/simple/fast-back.svg +20 -1
  581. package/src/assets/icons/simple/fast-forward.svg +19 -1
  582. package/src/assets/icons/simple/file-add.svg +20 -1
  583. package/src/assets/icons/simple/file-duplicate.svg +22 -1
  584. package/src/assets/icons/simple/file-remove.svg +18 -1
  585. package/src/assets/icons/simple/file-required.svg +24 -1
  586. package/src/assets/icons/simple/file.svg +14 -1
  587. package/src/assets/icons/simple/filter-2.svg +24 -1
  588. package/src/assets/icons/simple/filter-active.svg +13 -1
  589. package/src/assets/icons/simple/filter.svg +12 -1
  590. package/src/assets/icons/simple/flag.svg +12 -1
  591. package/src/assets/icons/simple/folder.svg +14 -1
  592. package/src/assets/icons/simple/full-width.svg +11 -1
  593. package/src/assets/icons/simple/go-to-back.svg +18 -1
  594. package/src/assets/icons/simple/grid.svg +20 -1
  595. package/src/assets/icons/simple/group-add.svg +24 -1
  596. package/src/assets/icons/simple/group.svg +18 -1
  597. package/src/assets/icons/simple/heart-active.svg +12 -1
  598. package/src/assets/icons/simple/heart.svg +12 -1
  599. package/src/assets/icons/simple/highlighter.svg +12 -1
  600. package/src/assets/icons/simple/home.svg +13 -1
  601. package/src/assets/icons/simple/hourglass.svg +11 -1
  602. package/src/assets/icons/simple/image.svg +15 -1
  603. package/src/assets/icons/simple/info-badge.svg +9 -1
  604. package/src/assets/icons/simple/information.svg +12 -1
  605. package/src/assets/icons/simple/italic.svg +12 -1
  606. package/src/assets/icons/simple/key.svg +11 -1
  607. package/src/assets/icons/simple/language.svg +12 -1
  608. package/src/assets/icons/simple/learning-path.svg +9 -1
  609. package/src/assets/icons/simple/light-off.svg +7 -1
  610. package/src/assets/icons/simple/light-on.svg +18 -1
  611. package/src/assets/icons/simple/link.svg +14 -1
  612. package/src/assets/icons/simple/lock.svg +13 -1
  613. package/src/assets/icons/simple/login.svg +11 -1
  614. package/src/assets/icons/simple/logout.svg +11 -1
  615. package/src/assets/icons/simple/maximaze.svg +12 -1
  616. package/src/assets/icons/simple/menu.svg +10 -1
  617. package/src/assets/icons/simple/merge.svg +20 -1
  618. package/src/assets/icons/simple/minimaze.svg +12 -1
  619. package/src/assets/icons/simple/mixed-class.svg +40 -1
  620. package/src/assets/icons/simple/more-horizontal.svg +8 -1
  621. package/src/assets/icons/simple/more-vertical.svg +8 -1
  622. package/src/assets/icons/simple/news.svg +12 -1
  623. package/src/assets/icons/simple/no-prerequisites.svg +17 -1
  624. package/src/assets/icons/simple/notes.svg +14 -1
  625. package/src/assets/icons/simple/number-code.svg +29 -1
  626. package/src/assets/icons/simple/numbered-list.svg +18 -1
  627. package/src/assets/icons/simple/on-site.svg +18 -1
  628. package/src/assets/icons/simple/order-down.svg +12 -1
  629. package/src/assets/icons/simple/order-up.svg +12 -1
  630. package/src/assets/icons/simple/paste.svg +14 -1
  631. package/src/assets/icons/simple/pausa.svg +8 -1
  632. package/src/assets/icons/simple/pdf.svg +12 -1
  633. package/src/assets/icons/simple/phone.svg +10 -1
  634. package/src/assets/icons/simple/pin-map.svg +13 -1
  635. package/src/assets/icons/simple/pin.svg +14 -1
  636. package/src/assets/icons/simple/pizza.svg +17 -1
  637. package/src/assets/icons/simple/play.svg +10 -1
  638. package/src/assets/icons/simple/plug-in.svg +10 -1
  639. package/src/assets/icons/simple/pointer.svg +6 -1
  640. package/src/assets/icons/simple/printer.svg +28 -1
  641. package/src/assets/icons/simple/profile-add.svg +28 -1
  642. package/src/assets/icons/simple/profile.svg +13 -1
  643. package/src/assets/icons/simple/push-pin-off.svg +11 -1
  644. package/src/assets/icons/simple/push-pin-on.svg +12 -1
  645. package/src/assets/icons/simple/qrcode.svg +26 -1
  646. package/src/assets/icons/simple/question-badge.svg +10 -1
  647. package/src/assets/icons/simple/radio.svg +8 -1
  648. package/src/assets/icons/simple/redo.svg +9 -1
  649. package/src/assets/icons/simple/relations.svg +28 -1
  650. package/src/assets/icons/simple/reload.svg +12 -1
  651. package/src/assets/icons/simple/remove-circle.svg +10 -1
  652. package/src/assets/icons/simple/remove.svg +6 -1
  653. package/src/assets/icons/simple/repeart.svg +14 -1
  654. package/src/assets/icons/simple/repository.svg +18 -1
  655. package/src/assets/icons/simple/request-form.svg +20 -1
  656. package/src/assets/icons/simple/resize-100%.svg +15 -1
  657. package/src/assets/icons/simple/resize-height.svg +12 -1
  658. package/src/assets/icons/simple/resize-width.svg +14 -1
  659. package/src/assets/icons/simple/search.svg +10 -1
  660. package/src/assets/icons/simple/sequential-prerequisites.svg +22 -1
  661. package/src/assets/icons/simple/settings.svg +17 -1
  662. package/src/assets/icons/simple/share.svg +21 -1
  663. package/src/assets/icons/simple/sketch.svg +13 -1
  664. package/src/assets/icons/simple/skills.svg +17 -1
  665. package/src/assets/icons/simple/skip-back.svg +14 -1
  666. package/src/assets/icons/simple/skip-forward.svg +14 -1
  667. package/src/assets/icons/simple/sms.svg +22 -1
  668. package/src/assets/icons/simple/sso-access.svg +20 -1
  669. package/src/assets/icons/simple/star-active.svg +6 -1
  670. package/src/assets/icons/simple/star.svg +6 -1
  671. package/src/assets/icons/simple/success.svg +12 -1
  672. package/src/assets/icons/simple/sun.svg +22 -1
  673. package/src/assets/icons/simple/sunrise.svg +18 -1
  674. package/src/assets/icons/simple/support.svg +18 -1
  675. package/src/assets/icons/simple/survey.svg +32 -1
  676. package/src/assets/icons/simple/table.svg +11 -1
  677. package/src/assets/icons/simple/tematic-channels.svg +15 -1
  678. package/src/assets/icons/simple/test.svg +23 -1
  679. package/src/assets/icons/simple/text-body.svg +7 -1
  680. package/src/assets/icons/simple/text-edit.svg +11 -1
  681. package/src/assets/icons/simple/text-style.svg +10 -1
  682. package/src/assets/icons/simple/time.svg +10 -1
  683. package/src/assets/icons/simple/toilet-paper.svg +17 -1
  684. package/src/assets/icons/simple/training-points.svg +18 -1
  685. package/src/assets/icons/simple/trash.svg +20 -1
  686. package/src/assets/icons/simple/underline.svg +9 -1
  687. package/src/assets/icons/simple/undo.svg +9 -1
  688. package/src/assets/icons/simple/unlock.svg +15 -1
  689. package/src/assets/icons/simple/upload.svg +10 -1
  690. package/src/assets/icons/simple/user-add.svg +18 -1
  691. package/src/assets/icons/simple/user-badge.svg +12 -1
  692. package/src/assets/icons/simple/user.svg +8 -1
  693. package/src/assets/icons/simple/video-off.svg +17 -1
  694. package/src/assets/icons/simple/video-on.svg +17 -1
  695. package/src/assets/icons/simple/video-rec.svg +20 -1
  696. package/src/assets/icons/simple/view-card.svg +12 -1
  697. package/src/assets/icons/simple/view-list.svg +20 -1
  698. package/src/assets/icons/simple/view.svg +17 -1
  699. package/src/assets/icons/simple/voice-off.svg +16 -1
  700. package/src/assets/icons/simple/voice-on.svg +16 -1
  701. package/src/assets/icons/simple/volume-down.svg +15 -1
  702. package/src/assets/icons/simple/volume-off.svg +16 -1
  703. package/src/assets/icons/simple/volume-up.svg +16 -1
  704. package/src/assets/icons/simple/warning.svg +14 -1
  705. package/src/assets/icons/simple/webinar.svg +19 -1
  706. package/src/assets/icons/simple/whiteboard.svg +16 -1
  707. package/src/assets/icons/simple/wine.svg +24 -1
  708. package/src/assets/icons/simple/zip.svg +22 -1
  709. package/src/assets/icons/simple/zoom-in.svg +18 -1
  710. package/src/assets/icons/simple/zoom-out.svg +17 -1
  711. package/src/assets/icons/simple.json +1 -1
  712. package/src/components/VvAccordion/VvAccordion.vue +16 -9
  713. package/src/components/VvAccordion/index.ts +5 -3
  714. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +16 -11
  715. package/src/components/VvBadge/VvBadge.vue +3 -3
  716. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +5 -5
  717. package/src/components/VvButton/VvButton.vue +82 -46
  718. package/src/components/VvButton/index.ts +20 -20
  719. package/src/components/VvButtonGroup/VvButtonGroup.vue +7 -10
  720. package/src/components/VvCard/VvCard.vue +6 -3
  721. package/src/components/VvCheckbox/VvCheckbox.vue +17 -12
  722. package/src/components/VvCheckbox/index.ts +7 -5
  723. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +21 -19
  724. package/src/components/VvCombobox/VvCombobox.vue +318 -101
  725. package/src/components/VvCombobox/index.ts +59 -5
  726. package/src/components/VvDialog/VvDialog.vue +14 -6
  727. package/src/components/VvDialog/index.ts +18 -1
  728. package/src/components/VvDropdown/VvDropdown.vue +344 -95
  729. package/src/components/VvDropdown/VvDropdownItem.vue +32 -0
  730. package/src/components/VvDropdown/index.ts +25 -23
  731. package/src/components/VvIcon/VvIcon.vue +16 -16
  732. package/src/components/VvInputText/VvInputText.vue +45 -34
  733. package/src/components/VvProgress/VvProgress.vue +7 -5
  734. package/src/components/VvRadio/VvRadio.vue +16 -14
  735. package/src/components/VvRadio/index.ts +6 -3
  736. package/src/components/VvRadioGroup/VvRadioGroup.vue +20 -16
  737. package/src/components/VvSelect/VvSelect.vue +69 -56
  738. package/src/components/VvSelect/index.ts +2 -2
  739. package/src/components/VvTextarea/VvTextarea.vue +46 -33
  740. package/src/components/VvTooltip/VvTooltip.vue +16 -10
  741. package/src/components/VvTooltip/index.ts +8 -11
  742. package/src/components/common/HintSlot.ts +5 -4
  743. package/src/composables/dropdown/useInjectDropdown.ts +51 -0
  744. package/src/composables/dropdown/useProvideDropdown.ts +97 -0
  745. package/src/composables/group/useInjectedGroupState.ts +7 -7
  746. package/src/composables/group/useProvideGroupState.ts +3 -3
  747. package/src/composables/useComponentIcon.ts +41 -0
  748. package/src/composables/useModifiers.ts +31 -91
  749. package/src/composables/useOptions.ts +11 -3
  750. package/src/composables/useUniqueId.ts +5 -0
  751. package/src/composables/useVolver.ts +6 -0
  752. package/src/constants.ts +38 -5
  753. package/src/directives/index.ts +5 -0
  754. package/src/directives/v-tooltip.ts +15 -0
  755. package/src/index.ts +1 -1
  756. package/src/props/index.ts +117 -13
  757. package/src/resolvers/unplugin.ts +4 -1
  758. package/src/shims.d.ts +1 -1
  759. package/src/stories/Accordion/Accordion.stories.mdx +9 -7
  760. package/src/stories/Accordion/Accordion.test.ts +1 -1
  761. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +6 -4
  762. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +10 -8
  763. package/src/stories/Badge/Badge.stories.mdx +4 -3
  764. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +4 -3
  765. package/src/stories/Breadcrumb/Breadcrumb.test.ts +14 -12
  766. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +8 -8
  767. package/src/stories/Button/Button.stories.mdx +7 -7
  768. package/src/stories/Button/Button.test.ts +6 -6
  769. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  770. package/src/stories/Button/ButtonSlots.stories.mdx +15 -11
  771. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +2 -2
  772. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +2 -2
  773. package/src/stories/Card/Card.stories.mdx +2 -2
  774. package/src/stories/Card/Card.test.ts +1 -1
  775. package/src/stories/Card/CardSlots.stories.mdx +2 -2
  776. package/src/stories/Checkbox/Checkbox.stories.mdx +7 -7
  777. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +7 -7
  778. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +9 -9
  779. package/src/stories/Combobox/Combobox.settings.ts +111 -4
  780. package/src/stories/Combobox/Combobox.stories.mdx +85 -4
  781. package/src/stories/Combobox/Combobox.test.ts +2 -2
  782. package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +78 -0
  783. package/src/stories/Combobox/ComboboxMultiple.stories.mdx +1 -2
  784. package/src/stories/Combobox/ComboboxSlots.stories.mdx +107 -2
  785. package/src/stories/Dialog/Dialog.stories.mdx +2 -2
  786. package/src/stories/Dialog/Dialog.test.ts +4 -4
  787. package/src/stories/Dropdown/Dropdown.settings.ts +55 -37
  788. package/src/stories/Dropdown/Dropdown.stories.mdx +57 -58
  789. package/src/stories/Dropdown/Dropdown.test.ts +10 -32
  790. package/src/stories/Dropdown/DropdownSlots.stories.mdx +113 -0
  791. package/src/stories/Icon/Icon.stories.mdx +1 -1
  792. package/src/stories/Icon/IconsCollection.stories.mdx +2 -2
  793. package/src/stories/InputText/InputText.settings.ts +2 -1
  794. package/src/stories/InputText/InputText.stories.mdx +7 -4
  795. package/src/stories/InputText/InputTextIconPosition.stories.mdx +2 -2
  796. package/src/stories/InputText/InputTextSlots.stories.mdx +2 -2
  797. package/src/stories/Progress/Progress.stories.mdx +3 -1
  798. package/src/stories/Progress/Progress.test.ts +1 -1
  799. package/src/stories/Radio/Radio.stories.mdx +1 -1
  800. package/src/stories/RadioGroup/RadioGroup.stories.mdx +7 -7
  801. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +9 -9
  802. package/src/stories/Select/Select.settings.ts +2 -2
  803. package/src/stories/Select/Select.stories.mdx +3 -3
  804. package/src/stories/Select/SelectIconPosition.stories.mdx +78 -0
  805. package/src/stories/Select/SelectSlots.stories.mdx +2 -2
  806. package/src/stories/Textarea/Textarea.settings.ts +2 -1
  807. package/src/stories/Textarea/Textarea.stories.mdx +4 -4
  808. package/src/stories/Textarea/TextareaSlots.stories.mdx +2 -2
  809. package/src/stories/Textarea/TextareatIconPosition.stories.mdx +2 -2
  810. package/src/stories/Tooltip/Tooltip.settings.ts +13 -13
  811. package/src/stories/Tooltip/Tooltip.stories.mdx +24 -21
  812. package/src/stories/Tooltip/Tooltip.test.ts +22 -13
  813. package/src/stories/Tooltip/TooltipDirective.stories.mdx +98 -0
  814. package/src/stories/argTypes.ts +153 -4
  815. package/src/types/floating-ui.d.ts +7 -0
  816. package/src/types/generic.d.ts +0 -1
  817. package/src/types/group.d.ts +37 -0
  818. package/src/utils/ObjectUtilities.ts +4 -1
  819. package/dist/composables/group/types/IAccordionGroupState.d.ts +0 -9
  820. package/dist/composables/group/types/IButtonGroupState.d.ts +0 -13
  821. package/dist/composables/group/types/IGroupState.d.ts +0 -8
  822. package/dist/composables/group/types/IInputGroup.d.ts +0 -8
  823. package/dist/composables/useComponentIcons.d.ts +0 -27
  824. package/src/composables/group/types/IAccordionGroupState.ts +0 -10
  825. package/src/composables/group/types/IButtonGroupState.ts +0 -14
  826. package/src/composables/group/types/IGroupState.ts +0 -10
  827. package/src/composables/group/types/IInputGroup.ts +0 -9
  828. package/src/composables/useComponentIcons.ts +0 -96
  829. package/src/directives/.gitkeep +0 -0
  830. package/src/stories/Dropdown/DropdownOptions.stories.mdx +0 -96
package/dist/index.es.js CHANGED
@@ -1,525 +1,936 @@
1
- var rt = Object.defineProperty;
2
- var it = (o, s, e) => s in o ? rt(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
- var he = (o, s, e) => (it(o, typeof s != "symbol" ? s + "" : s, e), e);
4
- import { addCollection as ut, addIcon as Ue, addAPIProvider as dt, iconExists as $e, Icon as ct } from "@iconify/vue";
5
- import { defineComponent as N, openBlock as m, createElementBlock as _, unref as t, normalizeClass as U, withModifiers as Be, createElementVNode as R, renderSlot as k, normalizeProps as F, guardReactiveProps as Y, createTextVNode as q, toDisplayString as B, Fragment as de, renderList as fe, createBlock as D, mergeProps as O, withCtx as ge, resolveDynamicComponent as Fe, createCommentVNode as I, withDirectives as ve, isRef as be, vModelCheckbox as pt, createVNode as Z, vModelSelect as vt, withKeys as Ne, vModelText as Ke, Transition as mt, toHandlers as ft, vShow as bt, vModelDynamic as ht, vModelRadio as gt } from "vue";
6
- import { nanoid as ne } from "nanoid";
7
- const Ae = "ds";
8
- class yt {
1
+ var At = Object.defineProperty;
2
+ var wt = (o, a, e) => a in o ? At(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e;
3
+ var Ie = (o, a, e) => (wt(o, typeof a != "symbol" ? a + "" : a, e), e);
4
+ import { addCollection as Et, addIcon as rt, addAPIProvider as It, iconExists as Re, Icon as Pt } from "@iconify/vue";
5
+ import { defineComponent as q, openBlock as d, createElementBlock as y, normalizeClass as Z, unref as t, renderSlot as $, createTextVNode as X, toDisplayString as x, render as Ot, withModifiers as it, createElementVNode as N, normalizeProps as j, guardReactiveProps as F, Fragment as ne, renderList as ke, createBlock as W, mergeProps as G, withCtx as ve, resolveDynamicComponent as ut, createCommentVNode as w, withDirectives as Se, isRef as Ce, vModelCheckbox as Dt, createVNode as de, Transition as dt, normalizeStyle as Qe, vShow as qe, vModelSelect as Bt, createSlots as Rt, vModelText as ct, toHandlers as Tt, vModelDynamic as Mt, vModelRadio as xt } from "vue";
6
+ import { nanoid as Nt } from "nanoid";
7
+ import { autoPlacement as Ze, flip as et, shift as tt, size as ot, offset as Ge, arrow as Lt, useFloating as Ht, autoUpdate as Gt } from "@floating-ui/vue";
8
+ const Ut = "vv";
9
+ var be = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(be || {}), vt = /* @__PURE__ */ ((o) => (o.topStart = "top-start", o.topEnd = "top-end", o.bottomStart = "bottom-start", o.bottomEnd = "bottom-end", o.leftStart = "left-start", o.leftEnd = "left-end", o.rightStart = "right-start", o.rightEnd = "right-end", o))(vt || {}), je = /* @__PURE__ */ ((o) => (o.before = "before", o.after = "after", o))(je || {});
10
+ const Wt = Symbol.for("volver"), pt = Symbol.for("buttonGroup"), ft = Symbol.for("radioGroup"), mt = Symbol.for("checkGroup"), bt = Symbol.for("accordionGroup"), Pe = {
11
+ valid: Boolean,
12
+ validLabel: [String, Array]
13
+ }, Oe = {
14
+ invalid: Boolean,
15
+ invalidLabel: [String, Array]
16
+ }, Ke = {
17
+ loading: Boolean,
18
+ loadingLabel: String
19
+ }, Ae = {
20
+ /**
21
+ * Whether the form control is disabled
22
+ */
23
+ disabled: Boolean
24
+ }, De = {
25
+ /**
26
+ * The value is not editable
27
+ */
28
+ readonly: Boolean
29
+ }, ce = {
30
+ /**
31
+ * Component BEM modifiers
32
+ */
33
+ modifiers: [String, Array]
34
+ }, Be = {
35
+ hintLabel: { type: String, default: "" }
36
+ }, ze = {
37
+ /**
38
+ * List of options, can be string[] or object[]
39
+ */
40
+ options: {
41
+ type: Array,
42
+ default: () => []
43
+ },
44
+ /**
45
+ * Used when options are objects: key to use for option label
46
+ */
47
+ labelKey: { type: [String, Function], default: "label" },
48
+ /**
49
+ * Used when options are objects: key to use for option label
50
+ */
51
+ valueKey: { type: [String, Function], default: "value" },
52
+ /**
53
+ * Used when options are objects: key to use for option disabled
54
+ */
55
+ disabledKey: { type: [String, Function], default: "disabled" }
56
+ }, jt = {
57
+ /**
58
+ * Show character limit
59
+ */
60
+ count: {
61
+ type: [Boolean, String],
62
+ default: !1,
63
+ validator: (o) => [!0, !1, "limit", "countdown"].includes(o)
64
+ }
65
+ }, Ft = {
66
+ /**
67
+ * Milliseconds to wait before emitting the input event
68
+ */
69
+ debounce: [Number, String]
70
+ }, Ye = {
71
+ /**
72
+ * VvIcon name or props
73
+ * @see VVIcon
74
+ */
75
+ icon: { type: [String, Object] },
76
+ /**
77
+ * VvIcon position
78
+ */
79
+ iconPosition: {
80
+ type: String,
81
+ default: je.before,
82
+ validation: (o) => Object.values(je).includes(o)
83
+ }
84
+ }, Me = {
85
+ /**
86
+ * Global attribute tabindex
87
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
88
+ */
89
+ tabindex: { type: [String, Number], default: 0 }
90
+ }, Je = {
91
+ /**
92
+ * If true the label will be floating
93
+ */
94
+ floating: Boolean
95
+ }, xe = {
96
+ /**
97
+ * If true the input will be unselectable
98
+ */
99
+ unselectable: { type: Boolean, default: !0 }
100
+ }, Ne = {
101
+ /**
102
+ * Global attribute id
103
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
104
+ */
105
+ id: [String, Number]
106
+ }, Fe = {
107
+ /**
108
+ * Dropdown placement
109
+ */
110
+ placement: {
111
+ type: String,
112
+ default: be.bottom,
113
+ validator: (o) => Object.values(be).includes(o) || Object.values(vt).includes(o)
114
+ },
115
+ /**
116
+ * Dropdown show / hide transition name
117
+ */
118
+ transitionName: {
119
+ type: String
120
+ },
121
+ /**
122
+ * Offset of the dropdown from the trigger
123
+ * @see https://floating-ui.com/docs/offset
124
+ */
125
+ offset: {
126
+ type: [Number, String, Object],
127
+ default: 0
128
+ },
129
+ /**
130
+ * Move dropdown to the side if there is no space in the default position
131
+ * @see https://floating-ui.com/docs/shift
132
+ */
133
+ shift: {
134
+ type: [Boolean, Object],
135
+ default: !1
136
+ },
137
+ /**
138
+ * Flip dropdown position if there is no space in the default position
139
+ * @see https://floating-ui.com/docs/flip
140
+ */
141
+ flip: {
142
+ type: [Boolean, Object],
143
+ default: !0
144
+ },
145
+ /**
146
+ * Size of the dropdown
147
+ * @see https://floating-ui.com/docs/size
148
+ */
149
+ size: {
150
+ type: [Boolean, Object],
151
+ default: () => ({ padding: 10 })
152
+ },
153
+ /**
154
+ * Automatically change the position of the dropdown
155
+ * @see https://floating-ui.com/docs/autoPlacement
156
+ */
157
+ autoPlacement: {
158
+ type: [Boolean, Object],
159
+ default: !1
160
+ },
161
+ /**
162
+ * Add arrow to the dropdown
163
+ * @see https://floating-ui.com/docs/arrow
164
+ */
165
+ arrow: {
166
+ type: Boolean,
167
+ default: !1
168
+ },
169
+ /**
170
+ * Close dropdown on click outside
171
+ */
172
+ autoClose: {
173
+ type: Boolean,
174
+ default: !0
175
+ },
176
+ /**
177
+ * Autofocus first item on dropdown open
178
+ */
179
+ autofocusFirst: {
180
+ type: Boolean,
181
+ default: !0
182
+ },
183
+ /**
184
+ * Set dropdown width to the same as the trigger
185
+ */
186
+ triggerWidth: {
187
+ type: Boolean
188
+ }
189
+ }, Le = {
190
+ ...Ne,
191
+ /**
192
+ * Input / Textarea name
193
+ * Name of the form control. Submitted with the form as part of a name/value pair
194
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
195
+ */
196
+ name: { type: String, required: !0 }
197
+ }, ht = {
198
+ /**
199
+ * Global attribute autofocus
200
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
201
+ */
202
+ autofocus: Boolean
203
+ }, yt = {
204
+ /**
205
+ * Global attribute autocomplete
206
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
207
+ */
208
+ autocomplete: { type: String, default: "off" }
209
+ }, gt = {
210
+ ...Le,
211
+ ...ht,
212
+ ...yt,
213
+ ...Me,
214
+ ...Ae,
215
+ ...De,
216
+ ...Pe,
217
+ ...Oe,
218
+ ...Be,
219
+ ...Ke,
220
+ ...ce,
221
+ ...jt,
222
+ ...Ft,
223
+ ...Ye,
224
+ ...Je,
225
+ /**
226
+ * Input / Textarea minlength
227
+ * Minimum length (number of characters) of value
228
+ * Available for input types: text, search, url, tel, email, password
229
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
230
+ */
231
+ minlength: Number,
232
+ /**
233
+ * Input / Textarea maxlength
234
+ * Maximum length (number of characters) of value
235
+ * Available for input types: text, search, url, tel, email, password
236
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
237
+ */
238
+ maxlength: Number,
239
+ /**
240
+ * Input / Textarea placeholder
241
+ * Text that appears in the form control when it has no value set
242
+ * Available for input types: text, search, url, tel, email, password, number
243
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
244
+ */
245
+ placeholder: String,
246
+ /**
247
+ * Input / Textarea required
248
+ * A value is required or must be check for the form to be submittable
249
+ * Available for all input types except color
250
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
251
+ */
252
+ required: Boolean,
253
+ /**
254
+ * <label> value for the Input / Textarea
255
+ */
256
+ label: String
257
+ }, _t = {
258
+ ...Le,
259
+ ...Me,
260
+ ...Pe,
261
+ ...Oe,
262
+ ...Be,
263
+ ...Ae,
264
+ ...De,
265
+ ...ce,
266
+ /**
267
+ * Input value
268
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
269
+ */
270
+ value: [String, Number, Boolean],
271
+ /**
272
+ * Input value
273
+ */
274
+ modelValue: [Object, Number, Boolean, String],
275
+ /**
276
+ * <label> for input
277
+ */
278
+ label: String
279
+ }, St = {
280
+ ...Pe,
281
+ ...Oe,
282
+ ...ze,
283
+ ...Be,
284
+ ...Ae,
285
+ ...De,
286
+ ...ce,
287
+ /**
288
+ * Input value
289
+ */
290
+ modelValue: [String, Array],
291
+ /**
292
+ * Input label
293
+ */
294
+ label: String,
295
+ /**
296
+ * Input name
297
+ */
298
+ name: { type: String, required: !0 },
299
+ /**
300
+ * If true, the group will be displayed in a vertical column
301
+ */
302
+ vertical: Boolean
303
+ }, qt = {
304
+ ...ce,
305
+ /**
306
+ * Define the tooltip position
307
+ * @default Side.bottom
308
+ */
309
+ position: {
310
+ type: String,
311
+ default: be.bottom
312
+ },
313
+ value: {
314
+ type: String
315
+ }
316
+ }, Kt = /* @__PURE__ */ q({
317
+ __name: "VvTooltip",
318
+ props: qt,
319
+ setup(o) {
320
+ const a = o, { modifiers: e } = toRefs(a), s = useBemModifiers(
321
+ "vv-tooltip",
322
+ e,
323
+ computed(() => ({
324
+ [a.position]: !0
325
+ }))
326
+ );
327
+ return (l, i) => (d(), y("span", {
328
+ class: Z(t(s)),
329
+ role: "tooltip",
330
+ inert: ""
331
+ }, [
332
+ $(l.$slots, "default", {}, () => [
333
+ X(x(l.value), 1)
334
+ ])
335
+ ], 2));
336
+ }
337
+ }), zt = {
338
+ beforeMount(o, a) {
339
+ const e = h(Kt, {
340
+ value: a.value,
341
+ position: a.arg
342
+ });
343
+ Ot(e, o);
344
+ }
345
+ }, Yt = {
346
+ tooltip: zt
347
+ };
348
+ function at(o, a, e) {
349
+ const s = e || o.name;
350
+ if (!s)
351
+ return o;
352
+ const l = a == null ? void 0 : a[s], i = o.props;
353
+ return !l || !i ? { ...o, name: s } : {
354
+ ...o,
355
+ name: s,
356
+ props: Object.keys(i).reduce((u, c) => {
357
+ if (!(c in l))
358
+ return u[c] = i[c], u;
359
+ const p = l[c];
360
+ return typeof i[c] == "function" || Array.isArray(i[c]) ? (u[c] = {
361
+ type: i[c],
362
+ default: p
363
+ }, u) : (u[c] = {
364
+ ...i[c],
365
+ default: p
366
+ }, u);
367
+ }, {})
368
+ };
369
+ }
370
+ class Jt {
9
371
  constructor({
10
- fetchWithCredentials: s = !1,
11
- fetchOptions: e = {},
12
- iconsCollections: n = [],
13
- nuxt: l = !1
372
+ fetchWithCredentials: a,
373
+ fetchOptions: e,
374
+ provider: s,
375
+ nuxt: l,
376
+ iconsCollections: i
14
377
  } = {}) {
15
- he(this, "fetchOptions");
16
- he(this, "iconsCollections");
17
- he(this, "provider");
18
- he(this, "nuxt");
19
- s && (e = { ...e, credentials: "include" }), this.provider = Ae, this.fetchOptions = e, this.iconsCollections = n, this.iconsCollections.forEach((i) => {
20
- this.addCollection(i, this.provider);
21
- }), this.nuxt = l;
378
+ Ie(this, "fetchOptions", {});
379
+ Ie(this, "nuxt", !1);
380
+ Ie(this, "iconsCollections", []);
381
+ Ie(this, "provider", Ut);
382
+ e && (this.fetchOptions = e), a && (this.fetchOptions = { ...this.fetchOptions, credentials: "include" }), s && (this.provider = s), l && (this.nuxt = l), i && Array.isArray(i) && i.forEach((u) => {
383
+ this.addCollection(u, this.provider);
384
+ });
22
385
  }
23
- addCollection(s, e) {
24
- return ut(s, e);
386
+ addCollection(a, e) {
387
+ return this.iconsCollections = [...this.iconsCollections, a], Et(a, e ?? this.provider);
25
388
  }
26
- addIcon(s, e) {
27
- return Ue(s, e);
389
+ addIcon(a, e) {
390
+ return rt(a, e);
28
391
  }
29
- addAPIProvider(s, e) {
30
- return dt(s, e);
392
+ addAPIProvider(a, e) {
393
+ return It(a, e);
31
394
  }
32
- fetchIcon(s, e = { cache: "force-cache" }) {
33
- return new Promise((n, l) => {
34
- fetch(s, { ...this.fetchOptions, ...e }).catch((i) => l(i)).then((i) => i == null ? void 0 : i.text()).then((i) => n(i));
395
+ fetchIcon(a, e = { cache: "force-cache" }) {
396
+ return new Promise((s, l) => {
397
+ fetch(a, { ...this.fetchOptions, ...e }).catch((i) => l(i)).then((i) => i == null ? void 0 : i.text()).then((i) => s(i));
35
398
  });
36
399
  }
37
400
  }
38
- const As = {
39
- install(o, s) {
40
- const e = new yt(s);
41
- o.config.globalProperties.$ds = e, o.provide(Ae, e);
401
+ const pl = {
402
+ /**
403
+ * Vue.use() hook
404
+ * @param {App} Vue
405
+ * @param {Object} options
406
+ */
407
+ install(o, a) {
408
+ const e = new Jt(a);
409
+ o.config.globalProperties.$vv = e, a.components && Object.entries(a.components).forEach(([s, l]) => {
410
+ o.component(
411
+ s,
412
+ at(l, a.defaults)
413
+ );
414
+ }), a.aliases && Object.entries(a.aliases).forEach(([s, l]) => {
415
+ o.component(
416
+ s,
417
+ at(l, a.defaults, s)
418
+ );
419
+ }), Object.entries(Yt).forEach(([s, l]) => {
420
+ o.directive(s, l);
421
+ }), o.provide(Wt, e);
42
422
  }
43
- }, We = "VV_BUTTON_GROUP", qe = "VV_RADIO_GROUP", je = "VV_CHECK_GROUP", ze = "VV_ACCORDION_GROUP", _t = {
423
+ }, Xt = {
424
+ /**
425
+ * Accordion name
426
+ */
44
427
  name: String,
428
+ /**
429
+ * Header title
430
+ */
45
431
  title: String,
432
+ /**
433
+ * Content text
434
+ */
46
435
  content: String,
436
+ /**
437
+ * (Optional) Defines if item is open. Event "update:modelValue" is emitted on accordion header click
438
+ */
47
439
  modelValue: {
48
440
  type: Boolean,
49
441
  default: void 0
50
442
  },
443
+ /**
444
+ * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
445
+ */
51
446
  modifiers: [String, Array],
447
+ /**
448
+ * If true, the accordion will be disabled
449
+ */
52
450
  disabled: Boolean
53
- }, St = ["update:modelValue"];
54
- function Vt(o, s) {
55
- const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(ze), { title: i, content: r } = toRefs(o), f = l("modelValue", o, s), p = l("disabled", o), u = l("collapse", o), a = l("modifiers", o);
451
+ }, Qt = ["update:modelValue"];
452
+ function Zt(o, a) {
453
+ const { group: e, isInGroup: s, getGroupOrLocalRef: l } = useInjectedGroupState(
454
+ bt
455
+ ), { title: i, content: u } = toRefs(o), c = l("modelValue", o, a), p = l("disabled", o), v = l("collapse", o), n = l("modifiers", o);
56
456
  return {
57
- modelValue: f,
457
+ // group props
458
+ modelValue: c,
58
459
  disabled: p,
59
- isInGroup: n,
460
+ isInGroup: s,
60
461
  group: e,
61
- collapse: u,
62
- modifiers: a,
462
+ collapse: v,
463
+ modifiers: n,
464
+ // local props
63
465
  title: i,
64
- content: r
466
+ content: u
65
467
  };
66
468
  }
67
- const Ct = ["id", "open"], $t = ["aria-controls", "aria-expanded"], kt = ["aria-hidden"], At = {
469
+ const eo = ["id", "open"], to = ["aria-controls", "aria-expanded"], oo = ["aria-hidden"], ao = {
68
470
  name: "VvAccordion"
69
- }, Pt = /* @__PURE__ */ N({
70
- ...At,
71
- props: _t,
72
- emits: St,
73
- setup(o, { emit: s }) {
74
- const e = o, n = useAttrs(), l = e.name || (n == null ? void 0 : n.id) || ne(), {
471
+ }, lo = /* @__PURE__ */ q({
472
+ ...ao,
473
+ props: Xt,
474
+ emits: Qt,
475
+ setup(o, { emit: a }) {
476
+ const e = o, s = useAttrs(), l = computed(
477
+ () => e.name || (s == null ? void 0 : s.id) || Nt()
478
+ ), {
75
479
  modifiers: i,
76
- title: r,
77
- content: f,
480
+ title: u,
481
+ content: c,
78
482
  disabled: p,
79
- collapse: u,
80
- modelValue: a,
81
- isInGroup: c
82
- } = Vt(e, s), d = ref(!1), b = computed({
83
- get: () => c.value ? u.value && Array.isArray(a.value) ? a.value.includes(l) : a.value === l : a.value === void 0 ? d.value : a.value,
84
- set: (v) => {
85
- if (c.value) {
86
- if (u.value && Array.isArray(a.value)) {
87
- if (v) {
88
- a.value.push(l);
483
+ collapse: v,
484
+ modelValue: n,
485
+ isInGroup: r
486
+ } = Zt(e, a), f = ref(!1), g = computed({
487
+ get: () => r.value ? v.value && Array.isArray(n.value) ? n.value.includes(l.value) : n.value === l.value : n.value === void 0 ? f.value : n.value,
488
+ set: (b) => {
489
+ if (r.value) {
490
+ if (v.value && Array.isArray(n.value)) {
491
+ if (b) {
492
+ n.value.push(l.value);
89
493
  return;
90
494
  }
91
- a.value = a.value.filter(
92
- (V) => V !== l
495
+ n.value = n.value.filter(
496
+ (S) => S !== l.value
93
497
  );
94
498
  return;
95
499
  }
96
- a.value = v ? l : null;
500
+ n.value = b ? l.value : null;
97
501
  return;
98
502
  }
99
- if (a.value === void 0 && typeof v == "boolean") {
100
- d.value = v;
503
+ if (n.value === void 0 && typeof b == "boolean") {
504
+ f.value = b;
101
505
  return;
102
506
  }
103
- a.value = v;
507
+ n.value = b;
104
508
  }
105
- }), { bemCssClasses: g } = useBemModifiers("vv-accordion", {
106
- modifiers: i,
107
- disabled: p
108
- }), y = useToggle(b);
109
- return (v, V) => (m(), _("details", {
509
+ }), k = useBemModifiers(
510
+ "vv-accordion",
511
+ i,
512
+ computed(() => ({
513
+ disabled: p.value
514
+ }))
515
+ ), A = useToggle(g);
516
+ return (b, S) => (d(), y("details", {
110
517
  id: t(l),
111
- class: U(t(g)),
112
- open: t(b),
113
- onClick: V[0] || (V[0] = Be((w) => t(y)(), ["prevent"]))
518
+ class: Z(t(k)),
519
+ open: t(g),
520
+ onClick: S[0] || (S[0] = it((I) => t(A)(), ["prevent"]))
114
521
  }, [
115
- R("summary", {
522
+ N("summary", {
116
523
  "aria-controls": t(l),
117
- "aria-expanded": t(b),
524
+ "aria-expanded": t(g),
118
525
  class: "vv-collapse__summary"
119
526
  }, [
120
- k(v.$slots, "summary", F(Y({ open: t(b) })), () => [
121
- q(B(t(r)), 1)
527
+ $(b.$slots, "summary", j(F({ open: t(g) })), () => [
528
+ X(x(t(u)), 1)
122
529
  ])
123
- ], 8, $t),
124
- R("div", {
125
- "aria-hidden": !t(b),
530
+ ], 8, to),
531
+ N("div", {
532
+ "aria-hidden": !t(g),
126
533
  class: "vv-collapse__content"
127
534
  }, [
128
- k(v.$slots, "details", F(Y({ open: t(b) })), () => [
129
- q(B(t(f)), 1)
535
+ $(b.$slots, "details", j(F({ open: t(g) })), () => [
536
+ X(x(t(c)), 1)
130
537
  ])
131
- ], 8, kt)
132
- ], 10, Ct));
538
+ ], 8, oo)
539
+ ], 10, eo));
133
540
  }
134
- }), wt = {
541
+ }), so = {
542
+ /**
543
+ * VModel
544
+ */
135
545
  modelValue: [String, Array],
546
+ /**
547
+ * Accordion items
548
+ * @type VvAccordionGroupItem
549
+ */
136
550
  items: { type: Array, default: () => [] },
551
+ /**
552
+ * If true, accordion items stay open when another item is opened
553
+ */
137
554
  collapse: Boolean,
555
+ /**
556
+ * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
557
+ */
138
558
  modifiers: [String, Array],
559
+ /**
560
+ * String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
561
+ */
139
562
  itemModifiers: {
140
563
  type: [String, Array],
141
564
  default: ""
142
565
  },
566
+ /**
567
+ * If true, the accordion items will be disabled
568
+ */
143
569
  disabled: Boolean
144
- }, It = ["update:modelValue"], Et = {
570
+ }, no = ["update:modelValue"], ro = {
145
571
  name: "VvAccordionGroup"
146
- }, Ps = /* @__PURE__ */ N({
147
- ...Et,
148
- props: wt,
149
- emits: It,
150
- setup(o, { emit: s }) {
151
- const e = o, { disabled: n, collapse: l, modifiers: i, itemModifiers: r, items: f } = toRefs(e);
572
+ }, fl = /* @__PURE__ */ q({
573
+ ...ro,
574
+ props: so,
575
+ emits: no,
576
+ setup(o, { emit: a }) {
577
+ const e = o, { disabled: s, collapse: l, modifiers: i, itemModifiers: u, items: c } = toRefs(e);
152
578
  watchEffect(() => {
153
579
  typeof e.modelValue == "string" && l.value && console.warn(
154
580
  "[VvAccordionGroup]: modelValue is a string but collapse is true."
155
581
  );
156
582
  });
157
- const p = ref([]), u = computed({
583
+ const p = ref([]), v = computed({
158
584
  get: () => {
159
- var d;
160
- return e.modelValue !== void 0 ? l.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : l.value ? p.value : (d = p.value) == null ? void 0 : d[0];
585
+ var r;
586
+ return e.modelValue !== void 0 ? l.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : l.value ? p.value : (r = p.value) == null ? void 0 : r[0];
161
587
  },
162
- set: (d) => {
588
+ set: (r) => {
163
589
  if (e.modelValue !== void 0)
164
- return (Array.isArray(e.modelValue) || l.value) && !Array.isArray(d) && (d = [d]), s("update:modelValue", d);
165
- p.value = Array.isArray(d) ? d : [d];
590
+ return (Array.isArray(e.modelValue) || l.value) && !Array.isArray(r) && (r = [r]), a("update:modelValue", r);
591
+ p.value = Array.isArray(r) ? r : [r];
166
592
  }
167
- }), a = {
168
- key: ze,
169
- modelValue: u,
170
- disabled: n,
593
+ });
594
+ useProvideGroupState({
595
+ key: bt,
596
+ modelValue: v,
597
+ disabled: s,
171
598
  collapse: l,
172
- modifiers: r
173
- };
174
- useProvideGroupState(a);
175
- const { bemCssClasses: c } = useBemModifiers("vv-accordion-group", {
176
- modifiers: i,
177
- disabled: n
599
+ modifiers: u
178
600
  });
179
- return (d, b) => (m(), _("div", {
180
- class: U(t(c))
601
+ const n = useBemModifiers(
602
+ "vv-accordion-group",
603
+ i,
604
+ computed(() => ({
605
+ disabled: s.value
606
+ }))
607
+ );
608
+ return (r, f) => (d(), y("div", {
609
+ class: Z(t(n))
181
610
  }, [
182
- k(d.$slots, "default", {}, () => [
183
- (m(!0), _(de, null, fe(t(f), (g) => (m(), D(Pt, O({
611
+ $(r.$slots, "default", {}, () => [
612
+ (d(!0), y(ne, null, ke(t(c), (g) => (d(), W(lo, G({
184
613
  key: g.title
185
614
  }, {
186
615
  name: g.name,
187
616
  title: g.title,
188
617
  content: g.content
189
618
  }), {
190
- header: ge((y) => [
191
- k(d.$slots, `header::${g.name}`, F(Y(y)))
619
+ header: ve((k) => [
620
+ $(r.$slots, `header::${g.name}`, j(F(k)))
192
621
  ]),
193
- details: ge((y) => [
194
- k(d.$slots, `details::${g.name}`, F(Y(y)))
622
+ details: ve((k) => [
623
+ $(r.$slots, `details::${g.name}`, j(F(k)))
195
624
  ]),
196
625
  _: 2
197
626
  }, 1040))), 128))
198
627
  ])
199
628
  ], 2));
200
629
  }
201
- }), ye = {
202
- valid: Boolean,
203
- validLabel: [String, Array]
204
- }, _e = {
205
- invalid: Boolean,
206
- invalidLabel: [String, Array]
207
- }, De = {
208
- loading: Boolean,
209
- loadingLabel: String
210
- }, ce = {
211
- disabled: Boolean
212
- }, Se = {
213
- readonly: Boolean
214
- }, re = {
215
- modifiers: [String, Array]
216
- }, Ve = {
217
- hintLabel: { type: String, default: "" }
218
- }, Pe = {
219
- options: {
220
- type: Array,
221
- default: () => []
222
- },
223
- labelKey: { type: [String, Function], default: "label" },
224
- valueKey: { type: [String, Function], default: "value" }
225
- }, Rt = {
226
- count: {
227
- type: [Boolean, String],
228
- default: !1,
229
- validator: (o) => [!0, !1, "limit", "countdown"].includes(o)
230
- }
231
- }, Ot = {
232
- debounce: [Number, String]
233
- }, He = {
234
- LEFT: "left",
235
- RIGHT: "right"
236
- }, Te = {
237
- icon: { type: [String, Object] },
238
- iconPosition: {
239
- type: String,
240
- validation: (o) => Object.values(He).includes(o),
241
- default: He.RIGHT
242
- }
243
- }, we = {
244
- tabindex: { type: [String, Number], default: 0 }
245
- }, Le = {
246
- floating: Boolean
247
- }, Ie = {
248
- unselectable: { type: Boolean, default: !0 }
249
- }, Ce = {
250
- id: [String, Number],
251
- name: { type: String, required: !0 }
252
- }, Xe = {
253
- autofocus: Boolean
254
- }, Ye = {
255
- autocomplete: { type: String, default: "off" }
256
- }, Je = {
257
- ...Ce,
258
- ...Xe,
259
- ...Ye,
260
- ...we,
261
- ...ce,
262
- ...Se,
263
- ...ye,
264
- ..._e,
265
- ...Ve,
266
- ...De,
267
- ...re,
268
- ...Rt,
269
- ...Ot,
270
- ...Te,
271
- ...Le,
272
- minlength: Number,
273
- maxlength: Number,
274
- placeholder: String,
275
- required: Boolean,
276
- label: String
277
- }, Qe = {
278
- ...Ce,
279
- ...we,
280
- ...ye,
281
- ..._e,
282
- ...Ve,
283
- ...ce,
284
- ...Se,
285
- value: [String, Number, Boolean],
286
- modelValue: [Object, Number, Boolean, String],
287
- label: String
288
- }, Ze = {
289
- ...ye,
290
- ..._e,
291
- ...Pe,
292
- ...Ve,
630
+ }), io = {
293
631
  ...ce,
294
- ...Se,
295
- modelValue: [String, Array],
296
- label: String,
297
- name: { type: String, required: !0 },
298
- vertical: Boolean
299
- }, Bt = {
300
- ...re,
301
632
  value: [String, Number]
302
- }, Dt = {
633
+ }, uo = {
303
634
  name: "VvBadge"
304
- }, ws = /* @__PURE__ */ N({
305
- ...Dt,
306
- props: Bt,
635
+ }, co = /* @__PURE__ */ q({
636
+ ...uo,
637
+ props: io,
307
638
  setup(o) {
308
- const s = o, { bemCssClasses: e } = useBemModifiers("vv-badge", {
309
- modifiers: s.modifiers
310
- });
311
- return (n, l) => (m(), _("span", {
312
- class: U(t(e)),
639
+ const a = o, { modifiers: e } = toRefs(a), s = useBemModifiers("vv-badge", e);
640
+ return (l, i) => (d(), y("span", {
641
+ class: Z(t(s)),
313
642
  role: "status"
314
643
  }, [
315
- k(n.$slots, "default", {}, () => [
316
- q(B(n.value), 1)
644
+ $(l.$slots, "default", {}, () => [
645
+ X(x(l.value), 1)
317
646
  ])
318
647
  ], 2));
319
648
  }
320
649
  });
321
- function Tt(o, s) {
322
- const e = { [`${o}`]: !0 };
323
- return {
324
- bemCssClasses: computed(() => Object.keys(s).reduce((l, i) => {
325
- const r = unref(s[i]) || !1;
326
- if (!r)
327
- return l;
328
- if (i === "modifiers") {
329
- const f = Array.isArray(r) ? r : r.split(" ");
330
- return {
331
- ...l,
332
- ...f.reduce(
333
- (p, u) => ({
334
- ...p,
335
- [`${o}--${kebabCase(u)}`]: !0
336
- }),
337
- {}
338
- )
339
- };
340
- } else
341
- return {
342
- ...l,
343
- [`${o}--${kebabCase(i)}`]: r
344
- };
345
- }, e) || {})
346
- };
650
+ function vo(o, a, e) {
651
+ return computed(() => {
652
+ const s = {
653
+ [o]: !0
654
+ };
655
+ let l = unref(a);
656
+ return l && (!Array.isArray(l) && typeof l == "string" && (l = l.split(" ")), Array.isArray(l) && l.forEach((i) => {
657
+ s[`${o}--${i}`] = !0;
658
+ })), e && Object.keys(e.value).forEach((i) => {
659
+ s[`${o}--${i}`] = unref(e.value[i]);
660
+ }), s;
661
+ });
347
662
  }
348
- const Lt = {
349
- ...re,
663
+ const po = {
664
+ ...ce,
350
665
  routes: Array
351
- }, Mt = { class: "vv-breadcrumb__list" }, Nt = ["content"], Ht = {
666
+ }, fo = { class: "vv-breadcrumb__list" }, mo = ["content"], bo = {
352
667
  name: "VvBreadcrumb"
353
- }, Is = /* @__PURE__ */ N({
354
- ...Ht,
355
- props: Lt,
668
+ }, ml = /* @__PURE__ */ q({
669
+ ...bo,
670
+ props: po,
356
671
  setup(o) {
357
- const s = o, { bemCssClasses: e } = Tt("vv-breadcrumb", {
358
- modifiers: s.modifiers
359
- });
360
- return (n, l) => (m(), _("nav", {
361
- class: U(t(e)),
672
+ const a = o, { modifiers: e } = toRefs(a), s = vo("vv-breadcrumb", e);
673
+ return (l, i) => (d(), y("nav", {
674
+ class: Z(t(s)),
362
675
  "aria-label": "breadcrumbs"
363
676
  }, [
364
- R("ol", Mt, [
365
- (m(!0), _(de, null, fe(n.routes, (i, r) => {
366
- var f, p, u, a;
367
- return m(), _("li", {
368
- key: `${i.label}-${r}`,
369
- class: U({
370
- "vv-breadcrumb__item": r < Number((f = n.routes) == null ? void 0 : f.length) - 1,
371
- "vv-breadcrumb__item-active": r === Number((p = n.routes) == null ? void 0 : p.length) - 1
677
+ N("ol", fo, [
678
+ (d(!0), y(ne, null, ke(l.routes, (u, c) => {
679
+ var p, v, n, r;
680
+ return d(), y("li", {
681
+ key: `${u.label}-${c}`,
682
+ class: Z({
683
+ "vv-breadcrumb__item": c < Number((p = l.routes) == null ? void 0 : p.length) - 1,
684
+ "vv-breadcrumb__item-active": c === Number((v = l.routes) == null ? void 0 : v.length) - 1
372
685
  }),
373
686
  itemprop: "itemListElement",
374
687
  itemtype: "https://schema.org/ListItem",
375
688
  itemscope: ""
376
689
  }, [
377
- (m(), D(Fe(i.to ? "router-link" : i.href ? "a" : "span"), O(i, {
690
+ (d(), W(ut(u.to ? "router-link" : u.href ? "a" : "span"), G(u, {
378
691
  class: {
379
- "vv-breadcrumb__link": r < Number((u = n.routes) == null ? void 0 : u.length) - 1
692
+ "vv-breadcrumb__link": c < Number((n = l.routes) == null ? void 0 : n.length) - 1
380
693
  },
381
- "aria-current": r === Number((a = n.routes) == null ? void 0 : a.length) - 1 ? "page" : void 0,
694
+ "aria-current": c === Number((r = l.routes) == null ? void 0 : r.length) - 1 ? "page" : void 0,
382
695
  itemprop: "item"
383
696
  }), {
384
- default: ge(() => [
385
- k(n.$slots, "label", F(Y({ route: i, index: r })), () => [
386
- q(B(i.label), 1)
697
+ default: ve(() => [
698
+ $(l.$slots, "label", j(F({ route: u, index: c })), () => [
699
+ X(x(u.label), 1)
387
700
  ])
388
701
  ]),
389
702
  _: 2
390
703
  }, 1040, ["class", "aria-current"])),
391
- R("meta", {
704
+ N("meta", {
392
705
  itemprop: "position",
393
- content: `${r + 1}`
394
- }, null, 8, Nt)
706
+ content: `${c + 1}`
707
+ }, null, 8, mo)
395
708
  ], 2);
396
709
  }), 128))
397
710
  ])
398
711
  ], 2));
399
712
  }
400
- }), xt = {
713
+ }), ho = {
714
+ /**
715
+ * Color
716
+ */
401
717
  color: String,
718
+ /**
719
+ * Width
720
+ */
402
721
  width: {
403
722
  type: [String, Number]
404
723
  },
724
+ /**
725
+ * Height
726
+ */
405
727
  height: {
406
728
  type: [String, Number]
407
729
  },
730
+ /**
731
+ * Icon name
732
+ * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
733
+ * https://docs.iconify.design/api/providers.html#provider-in-icon-name
734
+ */
408
735
  name: {
409
736
  type: String,
410
737
  required: !0
411
738
  },
739
+ /**
740
+ * By default 'vv'
741
+ * If custom collection is not added with "addCollection" DS class method, this prop could not be used
742
+ * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
743
+ */
412
744
  provider: {
413
745
  type: String
414
746
  },
747
+ /**
748
+ * The name of icon set.
749
+ * Icon default options prefix: simple | normal | detailed
750
+ */
415
751
  prefix: {
416
752
  type: String,
417
753
  default: "normal"
418
754
  },
755
+ /**
756
+ * Url remote SVG icon
757
+ */
419
758
  src: String,
759
+ /**
760
+ * Horizontal flip
761
+ */
420
762
  horizontalFlip: Boolean,
763
+ /**
764
+ * Vertical flip
765
+ */
421
766
  verticalFlip: Boolean,
767
+ /**
768
+ * String alternative to "horizontalFlip" and "verticalFlip".
769
+ * Example: https://docs.iconify.design/icon-components/vue/transform.html
770
+ */
422
771
  flip: String,
772
+ /**
773
+ * Icon render mode
774
+ * 'style' = 'bg' or 'mask', depending on icon content
775
+ * 'bg' = span with style using `background`
776
+ * 'mask' = span with style using `mask`
777
+ * 'svg' = svg
778
+ * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
779
+ */
423
780
  mode: String,
781
+ /**
782
+ * Toggles inline or block mode
783
+ * Example https://docs.iconify.design/icon-components/vue/inline.html
784
+ */
424
785
  inline: Boolean,
786
+ /**
787
+ * rotates icon
788
+ * Example https://docs.iconify.design/icon-components/vue/transform.html
789
+ */
425
790
  rotate: [Number, String],
791
+ /**
792
+ * A callback that is called when icon data has been loaded
793
+ */
426
794
  onLoad: Function,
795
+ /**
796
+ * SVG icon string
797
+ */
427
798
  svg: String,
799
+ /**
800
+ * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
801
+ * @values string | Array<string>
802
+ */
428
803
  modifiers: {
429
804
  type: [String, Array]
430
805
  }
431
- }, Gt = {
806
+ }, yo = {
432
807
  name: "VvIcon"
433
- }, x = /* @__PURE__ */ N({
434
- ...Gt,
435
- props: xt,
808
+ }, Q = /* @__PURE__ */ q({
809
+ ...yo,
810
+ props: ho,
436
811
  setup(o) {
437
- const s = o, e = ref(!0), { modifiers: n } = toRefs(s), l = inject(Ae), { bemCssClasses: i } = useBemModifiers("vv-icon", {
438
- modifiers: n
439
- }), r = computed(() => s.provider || (l == null ? void 0 : l.provider)), f = computed(() => {
440
- const a = s.name ?? "", c = `@${r.value}:${s.prefix}:${s.name}`;
441
- return $e(a) ? a : $e(c) ? c : (l == null ? void 0 : l.iconsCollections.find((d) => {
442
- const b = `@${r.value}:${d.prefix}:${a}`;
443
- if ($e(b))
444
- return b;
445
- })) || a;
812
+ const a = o, e = ref(!0), s = useVolver(), { modifiers: l } = toRefs(a), i = useBemModifiers("vv-icon", l), u = computed(() => a.provider || (s == null ? void 0 : s.provider)), c = computed(() => {
813
+ const n = a.name ?? "", r = `@${u.value}:${a.prefix}:${a.name}`;
814
+ return Re(n) ? n : Re(r) ? r : (s == null ? void 0 : s.iconsCollections.find(
815
+ (f) => {
816
+ const g = `@${u.value}:${f.prefix}:${n}`;
817
+ if (Re(g))
818
+ return g;
819
+ }
820
+ )) || n;
446
821
  });
447
- function p(a) {
448
- let c = null;
822
+ function p(n) {
823
+ let r = null;
449
824
  if (typeof window > "u") {
450
- const { JSDOM: y } = require("jsdom");
451
- c = new y().window;
825
+ const { JSDOM: A } = require("jsdom");
826
+ r = new A().window;
452
827
  }
453
- return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(a, "text/html").querySelector("svg");
828
+ return (r ? new r.DOMParser() : new window.DOMParser()).parseFromString(n, "text/html").querySelector("svg");
454
829
  }
455
- function u(a) {
456
- const c = p(a), d = (c == null ? void 0 : c.innerHTML.trim()) || "";
457
- c && d && Ue(`@${r.value}:${s.prefix}:${s.name}`, {
458
- body: d,
459
- height: c.viewBox.baseVal.height,
460
- width: c.viewBox.baseVal.width
830
+ function v(n) {
831
+ const r = p(n), f = (r == null ? void 0 : r.innerHTML.trim()) || "";
832
+ r && f && rt(`@${u.value}:${a.prefix}:${a.name}`, {
833
+ body: f,
834
+ // Set height and width from svg content
835
+ height: r.viewBox.baseVal.height,
836
+ width: r.viewBox.baseVal.width
461
837
  });
462
838
  }
463
- return l && (s.src && !$e(`@${r.value}:${s.prefix}:${s.name}`) ? (e.value = !1, l.fetchIcon(s.src).then((a) => {
464
- a && (u(a), e.value = !0);
465
- }).catch((a) => {
466
- throw new Error(`During fetch icon: ${a == null ? void 0 : a.message}`);
467
- })) : s.svg && u(s.svg)), (a, c) => t(e) ? (m(), D(t(ct), O({
839
+ return s && (a.src && !Re(`@${u.value}:${a.prefix}:${a.name}`) ? (e.value = !1, s.fetchIcon(a.src).then((n) => {
840
+ n && (v(n), e.value = !0);
841
+ }).catch((n) => {
842
+ throw new Error(`During fetch icon: ${n == null ? void 0 : n.message}`);
843
+ })) : a.svg && v(a.svg)), (n, r) => t(e) ? (d(), W(t(Pt), G({
468
844
  key: 0,
469
845
  class: t(i)
470
846
  }, {
471
- inline: a.inline,
472
- width: a.width,
473
- height: a.height,
474
- horizontalFlip: a.horizontalFlip,
475
- verticalFlip: a.verticalFlip,
476
- flip: a.flip,
477
- rotate: a.rotate,
478
- color: a.color,
479
- onLoad: a.onLoad,
480
- icon: t(f)
481
- }), null, 16, ["class"])) : I("", !0);
847
+ inline: n.inline,
848
+ width: n.width,
849
+ height: n.height,
850
+ horizontalFlip: n.horizontalFlip,
851
+ verticalFlip: n.verticalFlip,
852
+ flip: n.flip,
853
+ rotate: n.rotate,
854
+ color: n.color,
855
+ onLoad: n.onLoad,
856
+ icon: t(c)
857
+ }), null, 16, ["class"])) : w("", !0);
482
858
  }
483
859
  });
484
- var me = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(me || {}), et = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(et || {}), ae = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ae || {}), tt = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))(tt || {});
485
- const Ut = ["update:modelValue"], Ft = {
486
- ...re,
860
+ var Vt = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(Vt || {}), ge = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ge || {}), $t = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))($t || {});
861
+ const go = ["update:modelValue"], _o = {
862
+ ...Ne,
487
863
  ...ce,
488
- ...Ie,
489
- icon: {
490
- type: [String, Object],
491
- default: ""
492
- },
864
+ ...Ae,
865
+ ...xe,
866
+ /**
867
+ * Button icon
868
+ */
869
+ icon: [String, Object],
870
+ /**
871
+ * Button icon position
872
+ */
493
873
  iconPosition: {
494
874
  type: String,
495
- default: "left",
496
- validator: (o) => o in me
875
+ default: be.left,
876
+ validator: (o) => Object.values(be).includes(o)
497
877
  },
878
+ /**
879
+ * Button label
880
+ */
498
881
  label: [String, Number],
882
+ /**
883
+ * Loading status
884
+ */
499
885
  loading: Boolean,
886
+ /**
887
+ * Loading icon
888
+ */
500
889
  loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
890
+ /**
891
+ * Loading label
892
+ */
501
893
  loadingLabel: {
502
894
  type: String,
503
895
  default: "Loading..."
504
896
  },
897
+ /**
898
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
899
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
900
+ */
505
901
  to: {
506
902
  type: [String, Object]
507
903
  },
904
+ /**
905
+ * Link href
906
+ */
508
907
  href: String,
908
+ /**
909
+ * Link target
910
+ */
509
911
  target: {
510
912
  type: String,
511
- validator: (o) => o in tt
913
+ validator: (o) => Object.values($t).includes(o)
512
914
  },
513
915
  active: Boolean,
916
+ /**
917
+ * Button pressed mode
918
+ */
514
919
  pressed: Boolean,
920
+ /**
921
+ * Link rel
922
+ */
515
923
  rel: {
516
924
  type: String,
517
925
  default: "noopener noreferrer"
518
926
  },
927
+ /**
928
+ * Button type
929
+ */
519
930
  type: {
520
931
  type: String,
521
932
  default: "button",
522
- validator: (o) => o in et
933
+ validator: (o) => Object.values(Vt).includes(o)
523
934
  },
524
935
  toggle: {
525
936
  type: Boolean,
@@ -527,306 +938,342 @@ const Ut = ["update:modelValue"], Ft = {
527
938
  },
528
939
  modelValue: String
529
940
  };
530
- function Kt(o, s) {
531
- var v;
532
- const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(We), {
533
- iconPosition: i,
534
- icon: r,
535
- label: f,
536
- pressed: p,
537
- modifiers: u
538
- } = toRefs(o), a = l("modelValue", o, s), c = l("disabled", o), d = l("toggle", o), b = l(
941
+ function So(o, a) {
942
+ var S;
943
+ const { group: e, isInGroup: s, getGroupOrLocalRef: l } = useInjectedGroupState(pt), {
944
+ id: i,
945
+ iconPosition: u,
946
+ icon: c,
947
+ label: p,
948
+ pressed: v,
949
+ modifiers: n
950
+ } = toRefs(o), r = l("modelValue", o, a), f = l("disabled", o), g = l("toggle", o), k = l(
539
951
  "unselectable",
540
952
  o
541
- ), g = ((v = e == null ? void 0 : e.value) == null ? void 0 : v.multiple) ?? ref(!1), y = computed(() => {
542
- var C;
543
- const V = u != null && u.value ? Array.isArray(u.value) ? u.value : [u.value] : [], w = (C = e == null ? void 0 : e.value.itemModifiers) != null && C.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : [e.value.itemModifiers.value] : [];
544
- return [...V, ...w];
953
+ ), A = ((S = e == null ? void 0 : e.value) == null ? void 0 : S.multiple) ?? ref(!1), b = computed(() => {
954
+ var E;
955
+ const I = n != null && n.value ? Array.isArray(n.value) ? n.value : [n.value] : [], B = (E = e == null ? void 0 : e.value.itemModifiers) != null && E.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : [e.value.itemModifiers.value] : [];
956
+ return [...I, ...B];
545
957
  });
546
958
  return {
959
+ // group props
547
960
  group: e,
548
- isInGroup: n,
549
- modelValue: a,
550
- disabled: c,
551
- toggle: d,
552
- unselectable: b,
553
- multiple: g,
554
- modifiers: y,
555
- pressed: p,
556
- iconPosition: i,
557
- icon: r,
558
- label: f
961
+ isInGroup: s,
962
+ modelValue: r,
963
+ disabled: f,
964
+ toggle: g,
965
+ unselectable: k,
966
+ multiple: A,
967
+ // local props
968
+ id: i,
969
+ modifiers: b,
970
+ pressed: v,
971
+ iconPosition: u,
972
+ icon: c,
973
+ label: p
559
974
  };
560
975
  }
561
- const Wt = {
976
+ const Vo = {
562
977
  key: 1,
563
978
  class: "vv-button__label"
564
- }, qt = {
979
+ }, $o = {
565
980
  key: 1,
566
981
  class: "vv-button__label"
567
- }, jt = {
982
+ }, ko = {
568
983
  name: "VvButton"
569
- }, Es = /* @__PURE__ */ N({
570
- ...jt,
571
- props: Ft,
572
- emits: Ut,
573
- setup(o, { emit: s }) {
574
- const e = o, n = useAttrs(), l = useSlots(), i = (n == null ? void 0 : n.name) || ne(), {
575
- modifiers: r,
576
- iconPosition: f,
577
- icon: p,
578
- label: u,
579
- modelValue: a,
580
- disabled: c,
581
- toggle: d,
582
- unselectable: b
583
- } = Kt(e, s), g = inject(Ae), y = computed(() => {
984
+ }, bl = /* @__PURE__ */ q({
985
+ ...ko,
986
+ props: _o,
987
+ emits: go,
988
+ setup(o, { expose: a, emit: e }) {
989
+ const s = o, l = useAttrs(), i = useSlots(), {
990
+ id: u,
991
+ modifiers: c,
992
+ iconPosition: p,
993
+ icon: v,
994
+ label: n,
995
+ modelValue: r,
996
+ disabled: f,
997
+ toggle: g,
998
+ unselectable: k
999
+ } = So(s, e), A = useUniqueId(u), b = computed(() => (l == null ? void 0 : l.name) || A.value), S = useVolver(), I = ref(null);
1000
+ a({ $el: I });
1001
+ const {
1002
+ reference: B,
1003
+ bus: E,
1004
+ aria: O
1005
+ } = useInjectedDropdownTrigger();
1006
+ watch(
1007
+ () => I.value,
1008
+ (C) => {
1009
+ B && (B.value = C);
1010
+ }
1011
+ );
1012
+ const { role: L } = useInjectedDropdownAction(), K = computed(() => {
584
1013
  switch (!0) {
585
- case c.value:
586
- return ae.button;
587
- case e.to !== void 0:
588
- return g != null && g.nuxt ? ae.nuxtLink : ae.routerLink;
589
- case e.href !== void 0:
590
- return ae.a;
1014
+ case f.value:
1015
+ return ge.button;
1016
+ case s.to !== void 0:
1017
+ return S != null && S.nuxt ? ge.nuxtLink : ge.routerLink;
1018
+ case s.href !== void 0:
1019
+ return ge.a;
591
1020
  default:
592
- return ae.button;
1021
+ return ge.button;
593
1022
  }
594
- }), v = computed(() => d.value ? Array.isArray(a.value) ? contains(i, a.value) : equals(i, a.value) : e.pressed), { bemCssClasses: V } = useBemModifiers("vv-button", {
595
- modifiers: r,
596
- active: e.active,
597
- pressed: v,
598
- disabled: c,
599
- reverse: computed(
600
- () => [me.right, me.bottom].includes(
601
- f.value
602
- )
603
- ),
604
- column: computed(
605
- () => [me.top, me.bottom].includes(
606
- f.value
607
- )
608
- ),
609
- iconOnly: computed(
610
- () => (p == null ? void 0 : p.value) && !(u != null && u.value) && !l.default
611
- )
612
- }), w = computed(
613
- () => typeof (p == null ? void 0 : p.value) == "string" ? { name: p == null ? void 0 : p.value } : p == null ? void 0 : p.value
614
- ), C = computed(() => {
615
- const $ = {
616
- class: V.value,
617
- "aria-pressed": v.value ? !0 : void 0
1023
+ }), ee = computed(() => g.value ? Array.isArray(r.value) ? contains(b.value, r.value) : equals(b.value, r.value) : s.pressed), P = useBemModifiers(
1024
+ "vv-button",
1025
+ c,
1026
+ computed(() => ({
1027
+ active: s.active,
1028
+ pressed: ee.value,
1029
+ disabled: f.value,
1030
+ reverse: [be.right, be.bottom].includes(p.value),
1031
+ column: [be.top, be.bottom].includes(p.value),
1032
+ iconOnly: Boolean((v == null ? void 0 : v.value) && !(n != null && n.value) && !i.default)
1033
+ }))
1034
+ ), T = computed(
1035
+ () => typeof (v == null ? void 0 : v.value) == "string" ? { name: v == null ? void 0 : v.value } : v == null ? void 0 : v.value
1036
+ ), U = computed(() => {
1037
+ const C = {
1038
+ ...O == null ? void 0 : O.value,
1039
+ "aria-pressed": ee.value ? !0 : void 0,
1040
+ class: P.value,
1041
+ role: L
618
1042
  };
619
- switch (y.value) {
620
- case ae.a:
1043
+ switch (K.value) {
1044
+ case ge.a:
621
1045
  return {
622
- ...$,
623
- role: "button",
624
- href: e.href,
625
- target: e.target,
626
- rel: e.rel
1046
+ ...C,
1047
+ role: C.role ?? "button",
1048
+ href: s.href,
1049
+ target: s.target,
1050
+ rel: s.rel
627
1051
  };
628
- case ae.routerLink:
629
- case ae.nuxtLink:
1052
+ case ge.routerLink:
1053
+ case ge.nuxtLink:
630
1054
  return {
631
- ...$,
632
- role: "button",
633
- to: e.to,
634
- target: e.target
1055
+ ...C,
1056
+ role: C.role ?? "button",
1057
+ to: s.to,
1058
+ target: s.target
635
1059
  };
636
1060
  default:
637
1061
  return {
638
- ...$,
639
- type: e.type,
640
- disabled: c.value
1062
+ ...C,
1063
+ type: s.type,
1064
+ disabled: f.value
641
1065
  };
642
1066
  }
643
- }), M = () => {
644
- if (d.value) {
645
- if (Array.isArray(a.value)) {
646
- if (contains(i, a.value)) {
647
- b.value && (a.value = a.value.filter(
648
- ($) => $ !== i
1067
+ }), te = (C) => {
1068
+ if (E == null || E.emit("click", C), g.value) {
1069
+ if (Array.isArray(r.value)) {
1070
+ if (contains(b.value, r.value)) {
1071
+ k.value && (r.value = r.value.filter(
1072
+ (oe) => oe !== b.value
649
1073
  ));
650
1074
  return;
651
1075
  }
652
- a.value.push(i);
1076
+ r.value.push(b.value);
653
1077
  return;
654
1078
  }
655
- if (equals(i, a.value) && b.value) {
656
- a.value = void 0;
1079
+ if (equals(b, r.value) && k.value) {
1080
+ r.value = void 0;
657
1081
  return;
658
1082
  }
659
- a.value = i;
1083
+ r.value = b.value;
660
1084
  }
1085
+ }, re = (C) => {
1086
+ E == null || E.emit("mouseover", C);
1087
+ }, ie = (C) => {
1088
+ E == null || E.emit("mouseleave", C);
661
1089
  };
662
- return ($, H) => (m(), D(Fe(t(y)), O(t(C), { onClickPassive: M }), {
663
- default: ge(() => [
664
- k($.$slots, "default", {}, () => [
665
- $.loading ? k($.$slots, "loading", { key: 0 }, () => [
666
- $.loadingIcon ? (m(), D(x, {
1090
+ return (C, oe) => (d(), W(ut(t(K)), G(t(U), {
1091
+ id: t(A),
1092
+ ref_key: "$el",
1093
+ ref: I,
1094
+ onClickPassive: te,
1095
+ onMouseoverPassive: re,
1096
+ onMouseleavePassive: ie
1097
+ }), {
1098
+ default: ve(() => [
1099
+ $(C.$slots, "default", {}, () => [
1100
+ C.loading ? $(C.$slots, "loading", { key: 0 }, () => [
1101
+ C.loadingIcon ? (d(), W(Q, {
667
1102
  key: 0,
668
1103
  class: "vv-button__loading-icon",
669
- name: $.loadingIcon
670
- }, null, 8, ["name"])) : I("", !0),
671
- $.loadingLabel ? (m(), _("span", Wt, B($.loadingLabel), 1)) : I("", !0)
672
- ]) : (m(), _(de, { key: 1 }, [
673
- k($.$slots, "before"),
674
- t(p) ? (m(), D(x, O({
1104
+ name: C.loadingIcon
1105
+ }, null, 8, ["name"])) : w("", !0),
1106
+ C.loadingLabel ? (d(), y("span", Vo, x(C.loadingLabel), 1)) : w("", !0)
1107
+ ]) : (d(), y(ne, { key: 1 }, [
1108
+ $(C.$slots, "before"),
1109
+ t(v) ? (d(), W(Q, G({
675
1110
  key: 0,
676
1111
  class: "vv-button__icon"
677
- }, t(w)), null, 16)) : I("", !0),
678
- t(u) ? (m(), _("span", qt, [
679
- k($.$slots, "label", {}, () => [
680
- q(B(t(u)), 1)
1112
+ }, t(T)), null, 16)) : w("", !0),
1113
+ t(n) ? (d(), y("span", $o, [
1114
+ $(C.$slots, "label", {}, () => [
1115
+ X(x(t(n)), 1)
681
1116
  ])
682
- ])) : I("", !0),
683
- k($.$slots, "after")
1117
+ ])) : w("", !0),
1118
+ $(C.$slots, "after")
684
1119
  ], 64))
685
1120
  ])
686
1121
  ]),
687
1122
  _: 3
688
- }, 16));
1123
+ }, 16, ["id"]));
689
1124
  }
690
- }), zt = {
691
- ...re,
1125
+ }), Co = {
692
1126
  ...ce,
693
- ...Ie,
1127
+ ...Ae,
1128
+ ...xe,
1129
+ /**
1130
+ * String or String[] of css classes (modifiers) that will be provided to each button'
1131
+ */
694
1132
  itemModifiers: { type: [String, Array], default: void 0 },
695
1133
  toggle: { type: Boolean, default: !1 },
696
1134
  multiple: { type: Boolean, default: !1 },
697
1135
  modelValue: { type: [String, Array], default: void 0 }
698
- }, Xt = ["update:modelValue"], Yt = {
1136
+ }, Ao = ["update:modelValue"], wo = {
699
1137
  name: "VvButtonGroup"
700
- }, Rs = /* @__PURE__ */ N({
701
- ...Yt,
702
- props: zt,
703
- emits: Xt,
704
- setup(o, { emit: s }) {
1138
+ }, hl = /* @__PURE__ */ q({
1139
+ ...wo,
1140
+ props: Co,
1141
+ emits: Ao,
1142
+ setup(o, { emit: a }) {
705
1143
  const e = o, {
706
- disabled: n,
1144
+ disabled: s,
707
1145
  toggle: l,
708
1146
  modifiers: i,
709
- multiple: r,
710
- unselectable: f,
1147
+ multiple: u,
1148
+ unselectable: c,
711
1149
  itemModifiers: p
712
1150
  } = toRefs(e);
713
1151
  watchEffect(() => {
714
- typeof e.modelValue == "string" && r.value && console.warn(
1152
+ typeof e.modelValue == "string" && u.value && console.warn(
715
1153
  "[VvButtonGroup]: modelValue is a string but multiple is true."
716
1154
  );
717
1155
  });
718
- const u = computed({
719
- get: () => r.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
720
- set: (d) => (d !== void 0 && (Array.isArray(e.modelValue) || r.value) && !Array.isArray(d) && (d = [d]), s("update:modelValue", d))
721
- }), a = {
722
- key: We,
723
- modelValue: u,
724
- disabled: n,
1156
+ const v = computed({
1157
+ get: () => u.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
1158
+ set: (r) => (r !== void 0 && (Array.isArray(e.modelValue) || u.value) && !Array.isArray(r) && (r = [r]), a("update:modelValue", r))
1159
+ });
1160
+ useProvideGroupState({
1161
+ key: pt,
1162
+ modelValue: v,
1163
+ disabled: s,
725
1164
  toggle: l,
726
- multiple: r,
727
- unselectable: f,
1165
+ multiple: u,
1166
+ unselectable: c,
728
1167
  itemModifiers: p
729
- };
730
- useProvideGroupState(a);
731
- const { bemCssClasses: c } = useBemModifiers("vv-button-group", {
732
- modifiers: i
733
1168
  });
734
- return (d, b) => (m(), _("div", {
735
- class: U(t(c)),
1169
+ const n = useBemModifiers("vv-button-group", i);
1170
+ return (r, f) => (d(), y("div", {
1171
+ class: Z(t(n)),
736
1172
  role: "group"
737
1173
  }, [
738
- k(d.$slots, "default")
1174
+ $(r.$slots, "default")
739
1175
  ], 2));
740
1176
  }
741
- }), Jt = {
1177
+ }), Eo = {
742
1178
  title: String,
743
1179
  modifiers: [String, Array]
744
- }, Qt = {
1180
+ }, Io = {
745
1181
  key: 0,
746
1182
  class: "vv-card__header"
747
- }, Zt = {
1183
+ }, Po = {
748
1184
  key: 1,
749
1185
  class: "vv-card__content"
750
- }, eo = {
1186
+ }, Oo = {
751
1187
  key: 2,
752
1188
  class: "vv-card__footer"
753
- }, to = {
1189
+ }, Do = {
754
1190
  name: "VvCard"
755
- }, Os = /* @__PURE__ */ N({
756
- ...to,
757
- props: Jt,
1191
+ }, yl = /* @__PURE__ */ q({
1192
+ ...Do,
1193
+ props: Eo,
758
1194
  setup(o) {
759
- const s = o, { bemCssClasses: e } = useBemModifiers("vv-card", {
760
- modifiers: s.modifiers
761
- });
762
- return (n, l) => (m(), _("article", {
763
- class: U(t(e))
1195
+ const a = o, { modifiers: e } = toRefs(a), s = useBemModifiers("vv-card", e);
1196
+ return (l, i) => (d(), y("article", {
1197
+ class: Z(t(s))
764
1198
  }, [
765
- n.$slots.header || n.title ? (m(), _("header", Qt, [
766
- k(n.$slots, "header", {}, () => [
767
- q(B(n.title), 1)
1199
+ l.$slots.header || l.title ? (d(), y("header", Io, [
1200
+ $(l.$slots, "header", {}, () => [
1201
+ X(x(l.title), 1)
768
1202
  ])
769
- ])) : I("", !0),
770
- k(n.$slots, "default"),
771
- n.$slots.content ? (m(), _("div", Zt, [
772
- k(n.$slots, "content")
773
- ])) : I("", !0),
774
- n.$slots.footer ? (m(), _("footer", eo, [
775
- k(n.$slots, "footer")
776
- ])) : I("", !0)
1203
+ ])) : w("", !0),
1204
+ $(l.$slots, "default"),
1205
+ l.$slots.content ? (d(), y("div", Po, [
1206
+ $(l.$slots, "content")
1207
+ ])) : w("", !0),
1208
+ l.$slots.footer ? (d(), y("footer", Oo, [
1209
+ $(l.$slots, "footer")
1210
+ ])) : w("", !0)
777
1211
  ], 2));
778
1212
  }
779
- }), oo = {
780
- ...Qe,
1213
+ }), Bo = {
1214
+ ..._t,
1215
+ ...ce,
1216
+ /**
1217
+ * If true, the input will be indeterminated
1218
+ */
781
1219
  indeterminate: Boolean,
1220
+ /**
1221
+ * Value associated with the unchecked state
1222
+ */
782
1223
  uncheckedValue: [String, Number, Boolean],
1224
+ /**
1225
+ * If true, the input will be displayed as a switch
1226
+ */
783
1227
  switch: Boolean
784
- }, so = ["click", "update:modelValue", "change", "blur"];
785
- function lo(o, s) {
786
- const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(je), { switch: i, indeterminate: r } = toRefs(o), f = l("modelValue", o, s), p = l("readonly", o), u = l("disabled", o), a = l("valid", o), c = l("invalid", o);
1228
+ }, Ro = ["click", "update:modelValue", "change", "blur"];
1229
+ function To(o, a) {
1230
+ const { group: e, isInGroup: s, getGroupOrLocalRef: l } = useInjectedGroupState(mt), { id: i, switch: u, indeterminate: c } = toRefs(o), p = l("modelValue", o, a), v = l("readonly", o), n = l("disabled", o), r = l("valid", o), f = l("invalid", o);
787
1231
  return {
788
- propsSwitch: i,
789
- indeterminate: r,
1232
+ // local props
1233
+ id: i,
1234
+ propsSwitch: u,
1235
+ indeterminate: c,
1236
+ // global props
790
1237
  group: e,
791
- isInGroup: n,
792
- modelValue: f,
793
- readonly: p,
794
- disabled: u,
795
- valid: a,
796
- invalid: c
1238
+ isInGroup: s,
1239
+ modelValue: p,
1240
+ readonly: v,
1241
+ disabled: n,
1242
+ valid: r,
1243
+ invalid: f
797
1244
  };
798
1245
  }
799
- function ke(o) {
800
- return Array.isArray(o) ? o.filter((s) => isString(s)).join(" ") : o;
1246
+ function Te(o) {
1247
+ return Array.isArray(o) ? o.filter((a) => isString(a)).join(" ") : o;
801
1248
  }
802
- function pe(o, s) {
1249
+ function Ve(o, a) {
803
1250
  const {
804
1251
  invalid: e,
805
- valid: n,
1252
+ valid: s,
806
1253
  hint: l,
807
1254
  loading: i
808
- } = s, {
809
- hintLabel: r,
810
- modelValue: f,
1255
+ } = a, {
1256
+ hintLabel: u,
1257
+ modelValue: c,
811
1258
  valid: p,
812
- validLabel: u,
813
- invalid: a,
814
- invalidLabel: c,
815
- ...d
816
- } = toRefs(o), b = resolveFieldData(d, "loading"), g = resolveFieldData(d, "loadingLabel"), y = computed(() => a.value ? !!(a.value && e || c != null && c.value && Array.isArray(c.value) && c.value.length > 0 || c != null && c.value && !isEmpty(c)) : !1), v = computed(
817
- () => !!(r && r.value || l)
818
- ), V = computed(
819
- () => !!(u && u.value || n)
820
- ), w = computed(
821
- () => !!(b != null && b.value && i || b != null && b.value && (g != null && g.value))
822
- ), C = computed(
823
- () => v.value || V.value || y.value || w.value
1259
+ validLabel: v,
1260
+ invalid: n,
1261
+ invalidLabel: r,
1262
+ ...f
1263
+ } = toRefs(o), g = resolveFieldData(f, "loading"), k = resolveFieldData(f, "loadingLabel"), A = computed(() => n.value ? !!(n.value && e || r != null && r.value && Array.isArray(r.value) && r.value.length > 0 || r != null && r.value && !isEmpty(r)) : !1), b = computed(
1264
+ () => !!(u && u.value || l)
1265
+ ), S = computed(
1266
+ () => !!(v && v.value || s)
1267
+ ), I = computed(
1268
+ () => !!(g != null && g.value && i || g != null && g.value && (k != null && k.value))
1269
+ ), B = computed(
1270
+ () => b.value || S.value || A.value || I.value
824
1271
  );
825
1272
  return {
826
- hasInvalid: y,
827
- hasHint: v,
828
- hasValid: V,
829
- hasLoading: w,
1273
+ hasInvalid: A,
1274
+ hasHint: b,
1275
+ hasValid: S,
1276
+ hasLoading: I,
830
1277
  HintSlot: {
831
1278
  name: "HintSlot",
832
1279
  props: {
@@ -835,26 +1282,26 @@ function pe(o, s) {
835
1282
  default: () => ({})
836
1283
  }
837
1284
  },
838
- setup(M) {
839
- const $ = computed(() => {
840
- const H = toReactive({
841
- hintLabel: r,
842
- modelValue: f,
1285
+ setup(E) {
1286
+ const O = computed(() => {
1287
+ const L = toReactive({
1288
+ hintLabel: u,
1289
+ modelValue: c,
843
1290
  valid: p,
844
- validLabel: u,
845
- invalid: a,
846
- invalidLabel: c,
847
- loading: b,
848
- loadingLabel: g,
849
- ...M.params
1291
+ validLabel: v,
1292
+ invalid: n,
1293
+ invalidLabel: r,
1294
+ loading: g,
1295
+ loadingLabel: k,
1296
+ ...E.params
850
1297
  });
851
- return a != null && a.value ? (e == null ? void 0 : e(H)) || ke(c == null ? void 0 : c.value) || (r == null ? void 0 : r.value) : p != null && p.value ? (n == null ? void 0 : n(H)) || ke(u == null ? void 0 : u.value) || (r == null ? void 0 : r.value) : b != null && b.value ? (i == null ? void 0 : i(H)) || ke(g == null ? void 0 : g.value) || (r == null ? void 0 : r.value) : (l == null ? void 0 : l(H)) || ke(r == null ? void 0 : r.value) || (r == null ? void 0 : r.value);
1298
+ return n != null && n.value ? (e == null ? void 0 : e(L)) || Te(r == null ? void 0 : r.value) || (u == null ? void 0 : u.value) : p != null && p.value ? (s == null ? void 0 : s(L)) || Te(v == null ? void 0 : v.value) || (u == null ? void 0 : u.value) : g != null && g.value ? (i == null ? void 0 : i(L)) || Te(k == null ? void 0 : k.value) || (u == null ? void 0 : u.value) : (l == null ? void 0 : l(L)) || Te(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
852
1299
  });
853
1300
  return {
854
- isVisible: C,
855
- hasInvalid: y,
856
- hasValid: V,
857
- hintContent: $
1301
+ isVisible: B,
1302
+ hasInvalid: A,
1303
+ hasValid: S,
1304
+ hintContent: O
858
1305
  };
859
1306
  },
860
1307
  render() {
@@ -862,7 +1309,7 @@ function pe(o, s) {
862
1309
  return h(
863
1310
  "small",
864
1311
  {
865
- role: this.hasInvalid || this.hasValid ? "alert" : void 0
1312
+ role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
866
1313
  },
867
1314
  this.hintContent
868
1315
  );
@@ -870,474 +1317,833 @@ function pe(o, s) {
870
1317
  }
871
1318
  };
872
1319
  }
873
- const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ro = {
1320
+ const Mo = ["for"], xo = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], No = {
874
1321
  name: "VvCheckbox"
875
- }, io = /* @__PURE__ */ N({
876
- ...ro,
877
- props: oo,
878
- emits: so,
879
- setup(o, { emit: s }) {
880
- const e = o, n = useSlots(), {
881
- disabled: l,
882
- readonly: i,
883
- valid: r,
884
- invalid: f,
885
- propsSwitch: p,
886
- modelValue: u,
887
- indeterminate: a,
888
- isInGroup: c
889
- } = lo(e, s), d = computed(() => String(e.id || ne())), b = computed(() => v.value ? -1 : e.tabindex), g = ref(), y = computed(
890
- () => e.uncheckedValue !== void 0 && !c.value
891
- ), v = computed(() => l.value || i.value), V = computed(() => {
892
- if (f.value === !0)
1322
+ }, Lo = /* @__PURE__ */ q({
1323
+ ...No,
1324
+ props: Bo,
1325
+ emits: Ro,
1326
+ setup(o, { emit: a }) {
1327
+ const e = o, s = useSlots(), {
1328
+ id: l,
1329
+ disabled: i,
1330
+ readonly: u,
1331
+ valid: c,
1332
+ invalid: p,
1333
+ propsSwitch: v,
1334
+ modelValue: n,
1335
+ indeterminate: r,
1336
+ isInGroup: f
1337
+ } = To(e, a), g = useUniqueId(l), k = computed(() => S.value ? -1 : e.tabindex), A = ref(), b = computed(
1338
+ () => e.uncheckedValue !== void 0 && !f.value
1339
+ ), S = computed(() => i.value || u.value), I = computed(() => {
1340
+ if (p.value === !0)
893
1341
  return !0;
894
- if (r.value === !0)
1342
+ if (c.value === !0)
895
1343
  return !1;
896
- }), w = computed(() => y.value ? u.value === e.value : Array.isArray(u.value) ? contains(e.value, u.value) : equals(e.value, u.value)), C = computed(() => !!(a.value || !w.value && y.value && e.uncheckedValue !== u.value)), M = computed(() => {
897
- if (!y.value)
1344
+ }), B = computed(() => b.value ? n.value === e.value : Array.isArray(n.value) ? contains(e.value, n.value) : equals(e.value, n.value)), E = computed(() => !!(r.value || !B.value && b.value && e.uncheckedValue !== n.value)), O = computed(() => {
1345
+ if (!b.value)
898
1346
  return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
899
- }), $ = computed({
1347
+ }), L = computed({
900
1348
  get() {
901
- return w.value;
1349
+ return B.value;
902
1350
  },
903
1351
  set(T) {
904
- if (y.value)
905
- u.value = T ? e.value : e.uncheckedValue;
906
- else if (Array.isArray(u.value) || c.value) {
907
- const G = new Set(
908
- Array.isArray(u.value) ? u.value : u.value !== void 0 ? [u.value] : []
1352
+ if (b.value)
1353
+ n.value = T ? e.value : e.uncheckedValue;
1354
+ else if (Array.isArray(n.value) || f.value) {
1355
+ const U = new Set(
1356
+ Array.isArray(n.value) ? n.value : n.value !== void 0 ? [n.value] : []
909
1357
  );
910
- T ? G.add(e.value) : G.delete(e.value), u.value = [...G];
1358
+ T ? U.add(e.value) : U.delete(e.value), n.value = [...U];
911
1359
  } else
912
- u.value = T ? e.value : void 0;
913
- s("change", T);
1360
+ n.value = T ? e.value : void 0;
1361
+ a("change", T);
914
1362
  }
915
- }), { bemCssClasses: H } = useBemModifiers("vv-checkbox", {
916
- switch: p,
917
- valid: r,
918
- invalid: f,
919
- disabled: l,
920
- readonly: i,
921
- indeterminate: a
922
- });
1363
+ }), { modifiers: K } = toRefs(e), ee = useBemModifiers(
1364
+ "vv-checkbox",
1365
+ K,
1366
+ computed(() => ({
1367
+ switch: v.value,
1368
+ valid: c.value,
1369
+ invalid: p.value,
1370
+ disabled: i.value,
1371
+ readonly: u.value,
1372
+ indeterminate: r.value
1373
+ }))
1374
+ );
923
1375
  watchEffect(() => {
924
- y.value && Array.isArray(u.value) && console.warn(
1376
+ b.value && Array.isArray(n.value) && console.warn(
925
1377
  "[VvCheckbox] The model value is an array but the component is in binary mode."
926
1378
  );
927
1379
  }), watch(
928
- () => C.value,
1380
+ () => E.value,
929
1381
  (T) => {
930
- T ? g.value.indeterminate = !0 : g.value.indeterminate = !1;
1382
+ T ? A.value.indeterminate = !0 : A.value.indeterminate = !1;
931
1383
  }
932
1384
  ), onMounted(() => {
933
- C.value && (g.value.indeterminate = !0);
1385
+ E.value && (A.value.indeterminate = !0);
934
1386
  });
935
- const { HintSlot: X } = pe(e, n);
936
- return (T, G) => (m(), _("label", {
937
- class: U(t(H)),
938
- for: t(d)
1387
+ const { HintSlot: P } = Ve(e, s);
1388
+ return (T, U) => (d(), y("label", {
1389
+ class: Z(t(ee)),
1390
+ for: t(g)
939
1391
  }, [
940
- ve(R("input", {
941
- id: t(d),
1392
+ Se(N("input", {
1393
+ id: t(g),
942
1394
  ref_key: "input",
943
- ref: g,
944
- "onUpdate:modelValue": G[0] || (G[0] = (J) => be($) ? $.value = J : null),
1395
+ ref: A,
1396
+ "onUpdate:modelValue": U[0] || (U[0] = (te) => Ce(L) ? L.value = te : null),
945
1397
  type: "checkbox",
946
1398
  class: "vv-checkbox__input",
947
1399
  name: T.name,
948
- disabled: t(v),
949
- value: t(M),
950
- tabindex: t(b),
951
- "aria-invalid": t(V)
952
- }, null, 8, no), [
953
- [pt, t($)]
1400
+ disabled: t(S),
1401
+ value: t(O),
1402
+ tabindex: t(k),
1403
+ "aria-invalid": t(I)
1404
+ }, null, 8, xo), [
1405
+ [Dt, t(L)]
954
1406
  ]),
955
- k(T.$slots, "default", { value: t(u) }, () => [
956
- q(B(T.label), 1)
1407
+ $(T.$slots, "default", { value: t(n) }, () => [
1408
+ X(x(T.label), 1)
957
1409
  ]),
958
- Z(t(X), {
1410
+ de(t(P), {
959
1411
  class: "vv-checkbox__hint",
960
- params: { value: t(u) }
1412
+ params: { value: t(n) }
961
1413
  }, null, 8, ["params"])
962
- ], 10, ao));
1414
+ ], 10, Mo));
963
1415
  }
964
- }), uo = Ze, co = ["update:modelValue", "change"], po = ["textContent"], vo = { class: "vv-checkbox-group__wrapper" }, mo = {
1416
+ }), Ho = St, Go = ["update:modelValue", "change"], Uo = ["textContent"], Wo = { class: "vv-checkbox-group__wrapper" }, jo = {
965
1417
  name: "VvCheckboxGroup"
966
- }, Bs = /* @__PURE__ */ N({
967
- ...mo,
968
- props: uo,
969
- emits: co,
970
- setup(o, { emit: s }) {
971
- const e = o, n = useSlots(), l = useVModel(e, "modelValue", s), { disabled: i, readonly: r, vertical: f, valid: p, invalid: u } = toRefs(e), a = {
972
- key: je,
1418
+ }, gl = /* @__PURE__ */ q({
1419
+ ...jo,
1420
+ props: Ho,
1421
+ emits: Go,
1422
+ setup(o, { emit: a }) {
1423
+ const e = o, s = useSlots(), l = useVModel(e, "modelValue", a), { disabled: i, readonly: u, vertical: c, valid: p, invalid: v, modifiers: n } = toRefs(e);
1424
+ useProvideGroupState({
1425
+ key: mt,
973
1426
  modelValue: l,
974
1427
  disabled: i,
975
- readonly: r,
976
- valid: p,
977
- invalid: u
978
- };
979
- useProvideGroupState(a);
980
- const { getOptionLabel: c, getOptionValue: d } = useOptions(e), { bemCssClasses: b } = useBemModifiers("vv-checkbox-group", {
981
- disabled: i,
982
- readonly: r,
983
- horizontal: computed(() => !f.value),
1428
+ readonly: u,
984
1429
  valid: p,
985
- invalid: u
986
- }), g = (v, V) => ({
987
- id: `${e.name}_opt${V}`,
1430
+ invalid: v
1431
+ });
1432
+ const { getOptionLabel: r, getOptionValue: f } = useOptions(e), g = useBemModifiers(
1433
+ "vv-checkbox-group",
1434
+ n,
1435
+ computed(() => ({
1436
+ disabled: i.value,
1437
+ readonly: u.value,
1438
+ horizontal: !c.value,
1439
+ valid: p.value,
1440
+ invalid: v.value
1441
+ }))
1442
+ ), k = (b, S) => ({
1443
+ id: `${e.name}_opt${S}`,
988
1444
  name: e.name,
989
- label: c(v),
990
- value: d(v)
991
- }), { HintSlot: y } = pe(e, n);
992
- return (v, V) => (m(), _("fieldset", {
993
- class: U(t(b))
1445
+ label: r(b),
1446
+ value: f(b)
1447
+ }), { HintSlot: A } = Ve(e, s);
1448
+ return (b, S) => (d(), y("fieldset", {
1449
+ class: Z(t(g))
994
1450
  }, [
995
- v.label ? (m(), _("legend", {
1451
+ b.label ? (d(), y("legend", {
996
1452
  key: 0,
997
- textContent: B(v.label)
998
- }, null, 8, po)) : I("", !0),
999
- R("div", vo, [
1000
- v.options.length > 0 ? (m(!0), _(de, { key: 0 }, fe(v.options, (w, C) => (m(), D(io, O({ key: C }, g(w, C)), null, 16))), 128)) : k(v.$slots, "default", { key: 1 })
1453
+ textContent: x(b.label)
1454
+ }, null, 8, Uo)) : w("", !0),
1455
+ N("div", Wo, [
1456
+ b.options.length > 0 ? (d(!0), y(ne, { key: 0 }, ke(b.options, (I, B) => (d(), W(Lo, G({ key: B }, k(I, B)), null, 16))), 128)) : $(b.$slots, "default", { key: 1 })
1001
1457
  ]),
1002
- Z(t(y), { class: "vv-checkbox-group__hint" })
1458
+ de(t(A), { class: "vv-checkbox-group__hint" })
1003
1459
  ], 2));
1004
1460
  }
1005
- }), fo = {
1006
- ...Ce,
1461
+ }), Fo = [
1462
+ "update:modelValue",
1463
+ "change:search",
1464
+ "focus",
1465
+ "blur"
1466
+ ], qo = {
1467
+ ...Le,
1468
+ ...Me,
1007
1469
  ...Pe,
1470
+ ...Oe,
1471
+ ...Be,
1472
+ ...Ke,
1473
+ ...Ae,
1474
+ ...De,
1008
1475
  ...ce,
1009
- ...re,
1476
+ ...ze,
1477
+ ...Ye,
1478
+ ...Je,
1479
+ ...xe,
1480
+ ...Fe,
1481
+ /**
1482
+ * modelValue can be a string, number, boolean, object or array of string, number, boolean, object
1483
+ */
1010
1484
  modelValue: {
1011
- type: [String, Number, Boolean, Object, Array]
1485
+ type: [String, Number, Boolean, Object, Array],
1486
+ default: void 0
1012
1487
  },
1013
- labelNoResults: { type: String, default: "No results" },
1488
+ /**
1489
+ * Select input label
1490
+ */
1491
+ label: String,
1492
+ /**
1493
+ * Label for no search results
1494
+ */
1495
+ noResultsLabel: { type: String, default: "No results" },
1496
+ /**
1497
+ * Label for selected option hint
1498
+ */
1499
+ selectedLabel: { type: String, default: "Selected" },
1500
+ /**
1501
+ * Label for deselect button
1502
+ */
1503
+ deselectLabel: { type: String, default: "Deselect" },
1504
+ /**
1505
+ * Label for select option hint
1506
+ */
1507
+ pressToSelectLabel: { type: String, default: "Press enter to select" },
1508
+ /**
1509
+ * Label for deselected option hint
1510
+ */
1511
+ pressToDeselectLabel: { type: String, default: "Press enter to remove" },
1512
+ /**
1513
+ * Select input placeholder
1514
+ */
1515
+ placeholder: String,
1516
+ /**
1517
+ * Use input text to search on options
1518
+ */
1519
+ searchable: Boolean,
1520
+ /**
1521
+ * On searchable select is the input search placeholder
1522
+ */
1523
+ searchPlaceholder: {
1524
+ type: String,
1525
+ default: "Search..."
1526
+ },
1527
+ /**
1528
+ * The input search debounce time in ms
1529
+ */
1530
+ debounceSearch: {
1531
+ type: [Number, String],
1532
+ default: 0
1533
+ },
1534
+ /**
1535
+ * Manage modelValue as string[] or object[]
1536
+ */
1014
1537
  multiple: Boolean,
1538
+ /**
1539
+ * The max number of selected values
1540
+ */
1015
1541
  maxValues: [Number, String],
1016
- unselectable: { type: Boolean, default: !0 }
1017
- }, bo = ["id"], ho = {
1018
- key: 0,
1019
- role: "option"
1020
- }, go = ["aria-selected"], yo = ["for", "onClick"], _o = ["id", "type", "value", "checked", "disabled", "name"], So = {
1021
- name: "VvDropdown"
1022
- }, Vo = /* @__PURE__ */ N({
1023
- ...So,
1024
- props: fo,
1542
+ /**
1543
+ * The select label separator visible to the user
1544
+ */
1545
+ separator: { type: String, default: ", " },
1546
+ /**
1547
+ * Show native select
1548
+ */
1549
+ native: Boolean,
1550
+ /**
1551
+ * Show badges
1552
+ */
1553
+ badges: Boolean,
1554
+ /**
1555
+ * Badge modifiers
1556
+ */
1557
+ badgeModifiers: {
1558
+ type: [String, Array],
1559
+ default: "action sm"
1560
+ },
1561
+ /**
1562
+ * Set dropdown width to the same as the trigger
1563
+ */
1564
+ triggerWidth: {
1565
+ ...Fe.triggerWidth,
1566
+ default: !0
1567
+ },
1568
+ /**
1569
+ * Dropdown modifiers
1570
+ */
1571
+ dropdownModifiers: {
1572
+ type: [String, Array]
1573
+ },
1574
+ /**
1575
+ * Open dropdown on focus
1576
+ */
1577
+ autoOpen: Boolean,
1578
+ /**
1579
+ * Close dropdown on select (not multiple)
1580
+ */
1581
+ autoClose: Boolean
1582
+ }, lt = ["listbox", "menu"], Ko = {
1583
+ ...Ne,
1584
+ ...ce,
1585
+ ...Fe,
1586
+ /**
1587
+ * Show / hide dropdown programmatically
1588
+ */
1589
+ modelValue: {
1590
+ type: Boolean,
1591
+ default: void 0
1592
+ },
1593
+ /**
1594
+ * Dropdown trigger element
1595
+ */
1596
+ reference: {
1597
+ type: Object,
1598
+ default: null
1599
+ },
1600
+ /**
1601
+ * Dropdown role
1602
+ */
1603
+ role: {
1604
+ type: String,
1605
+ default: lt[1],
1606
+ validator: (o) => lt.includes(o)
1607
+ }
1608
+ }, zo = ["id", "tabindex", "role", "aria-labelledby"], Yo = {
1609
+ name: "VvDropdown",
1610
+ inheritAttrs: !1
1611
+ }, kt = /* @__PURE__ */ q({
1612
+ ...Yo,
1613
+ props: Ko,
1025
1614
  emits: ["update:modelValue"],
1026
- setup(o, { emit: s }) {
1027
- const e = o, n = computed(() => String(e.id || ne())), { modifiers: l, disabled: i } = toRefs(e), { getOptionLabel: r, getOptionValue: f } = useOptions(e), { bemCssClasses: p } = useBemModifiers("vv-dropdown", {
1028
- modifiers: l,
1029
- disabled: i
1615
+ setup(o, { emit: a }) {
1616
+ const e = o, { id: s } = toRefs(e), l = useUniqueId(s), i = useAttrs(), u = ref("auto"), c = ref("auto"), p = ref(null), v = ref(null), n = ref(null), r = ref(null), f = computed({
1617
+ get: () => e.reference ?? p.value,
1618
+ set: (m) => {
1619
+ p.value = m;
1620
+ }
1621
+ }), g = computed(() => {
1622
+ const m = [];
1623
+ if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? m.push(Ze()) : m.push(
1624
+ Ze(e.autoPlacement)
1625
+ ) : e.flip && (typeof e.flip == "boolean" ? m.push(et()) : m.push(et(e.flip))), e.shift && (typeof e.shift == "boolean" ? m.push(tt()) : m.push(tt(e.shift))), e.size) {
1626
+ const M = ({
1627
+ availableWidth: ue,
1628
+ availableHeight: ye
1629
+ }) => {
1630
+ u.value = `${ue}px`, c.value = `${ye}px`;
1631
+ };
1632
+ typeof e.size == "boolean" ? m.push(
1633
+ ot({
1634
+ apply: M
1635
+ })
1636
+ ) : m.push(
1637
+ ot({
1638
+ ...e.size,
1639
+ apply: M
1640
+ })
1641
+ );
1642
+ }
1643
+ return e.offset && (m.push(Ge(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? m.push(Ge(Number(e.offset))) : m.push(Ge(e.offset))), e.arrow && m.push(
1644
+ Lt({
1645
+ element: n
1646
+ })
1647
+ ), m;
1648
+ }), { x: k, y: A, strategy: b, middlewareData: S, placement: I } = Ht(
1649
+ f,
1650
+ v,
1651
+ {
1652
+ whileElementsMounted: Gt,
1653
+ placement: e.placement,
1654
+ middleware: g
1655
+ }
1656
+ ), B = computed(() => ({
1657
+ position: b.value,
1658
+ top: `${A.value ?? 0}px`,
1659
+ left: `${k.value ?? 0}px`,
1660
+ maxWidth: u.value,
1661
+ maxHeight: c.value,
1662
+ width: e.triggerWidth && f.value ? `${f.value.offsetWidth}px` : void 0
1663
+ })), E = computed(() => I.value.split("-")[0]), O = computed(
1664
+ () => ({
1665
+ top: "bottom",
1666
+ right: "left",
1667
+ bottom: "top",
1668
+ left: "right"
1669
+ })[E.value] ?? "bottom"
1670
+ ), L = computed(() => {
1671
+ var m, M, ue, ye;
1672
+ return ["bottom", "top"].includes(O.value) ? {
1673
+ right: `${((m = S.value.arrow) == null ? void 0 : m.x) ?? 0}px`,
1674
+ [O.value]: `${-(((M = n.value) == null ? void 0 : M.offsetWidth) ?? 0) / 2}px`
1675
+ } : {
1676
+ top: `${((ue = S.value.arrow) == null ? void 0 : ue.y) ?? 0}px`,
1677
+ [O.value]: `${-(((ye = n.value) == null ? void 0 : ye.offsetWidth) ?? 0) / 2}px`
1678
+ };
1679
+ }), K = useVModel(e, "modelValue", a), ee = ref(!1), P = computed({
1680
+ get: () => K.value ?? ee.value,
1681
+ set: (m) => {
1682
+ if (K.value === void 0) {
1683
+ ee.value = m;
1684
+ return;
1685
+ }
1686
+ K.value = m;
1687
+ }
1688
+ }), T = () => {
1689
+ P.value = !0;
1690
+ }, U = () => {
1691
+ P.value = !1;
1692
+ }, te = () => {
1693
+ P.value = !P.value;
1694
+ }, re = (m) => {
1695
+ f.value = m;
1696
+ };
1697
+ watch(P, (m) => {
1698
+ m && e.autofocusFirst && nextTick(() => {
1699
+ const M = ae(
1700
+ v.value
1701
+ );
1702
+ M.length > 0 && M[0].focus();
1703
+ });
1704
+ }), onClickOutside(
1705
+ v,
1706
+ () => {
1707
+ e.autoClose && (P.value = !1);
1708
+ },
1709
+ { ignore: [f] }
1710
+ );
1711
+ const ie = computed(() => {
1712
+ var m;
1713
+ return ((m = f.value) == null ? void 0 : m.getAttribute("id")) ?? void 0;
1714
+ }), C = computed(() => ({
1715
+ "aria-controls": l.value,
1716
+ "aria-haspopup": !0,
1717
+ "aria-expanded": P.value
1718
+ })), { component: oe, bus: fe } = useProvideDropdownTrigger({
1719
+ reference: f,
1720
+ id: l,
1721
+ expanded: P,
1722
+ aria: C
1030
1723
  });
1031
- function u(d) {
1032
- return Array.isArray(e.modelValue) ? contains(d, e.modelValue) || contains(f(d), e.modelValue) : equals(d, e.modelValue) || equals(f(d), e.modelValue);
1033
- }
1034
- function a(d) {
1035
- return typeof d == "string" || d.disabled === void 0 ? i.value : d.disabled;
1724
+ fe.on("click", te);
1725
+ const { role: se, modifiers: he } = toRefs(e), { itemRole: z } = useProvideDropdownItem({ role: se, expanded: P }), R = useBemModifiers(
1726
+ "vv-dropdown",
1727
+ he,
1728
+ computed(() => ({
1729
+ arrow: e.arrow
1730
+ }))
1731
+ ), { focused: Y } = useFocusWithin(v);
1732
+ function ae(m) {
1733
+ return m ? [
1734
+ ...m.querySelectorAll(
1735
+ 'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
1736
+ )
1737
+ ].filter(
1738
+ (M) => !M.hasAttribute("disabled") && !M.getAttribute("aria-hidden")
1739
+ ) : [];
1036
1740
  }
1037
- function c(d) {
1038
- var g;
1039
- if (e.disabled)
1040
- return;
1041
- let b = d;
1042
- if (e.multiple)
1043
- if (Array.isArray(e.modelValue)) {
1044
- if (e.maxValues !== void 0 && e.maxValues >= 0 && ((g = e.modelValue) == null ? void 0 : g.length) >= e.maxValues && !contains(d, e.modelValue))
1741
+ const me = () => {
1742
+ nextTick(() => {
1743
+ if (Y.value) {
1744
+ const m = ae(
1745
+ v.value
1746
+ );
1747
+ if (m.length === 0 || !document.activeElement)
1045
1748
  return;
1046
- b = contains(d, e.modelValue) ? removeFromList(d, e.modelValue) : [...e.modelValue, d];
1047
- } else
1048
- b = [d];
1049
- else
1050
- e.unselectable && d === e.modelValue && (b = void 0);
1051
- s("update:modelValue", b);
1052
- }
1053
- return (d, b) => {
1054
- var g;
1055
- return m(), _("ul", {
1056
- id: t(n),
1057
- class: U(t(p)),
1058
- role: "listbox"
1059
- }, [
1060
- (g = d.options) != null && g.length ? I("", !0) : (m(), _("li", ho, [
1061
- R("label", null, B(d.labelNoResults), 1)
1062
- ])),
1063
- (m(!0), _(de, null, fe(d.options, (y, v) => (m(), _("li", {
1064
- key: v,
1065
- role: "option",
1066
- "aria-selected": u(y)
1067
- }, [
1068
- R("label", {
1069
- for: `dropdown-${v}-${t(n)}`,
1070
- onClick: Be((V) => c(t(f)(y)), ["prevent"])
1071
- }, [
1072
- R("input", {
1073
- id: `dropdown-${v}-${t(n)}`,
1074
- type: d.multiple ? "checkbox" : "radio",
1075
- value: t(f)(y),
1076
- checked: u(y),
1077
- disabled: a(y),
1078
- name: d.name,
1079
- tabindex: "-1",
1080
- "aria-hidden": "true"
1081
- }, null, 8, _o),
1082
- q(" " + B(t(r)(y)), 1)
1083
- ], 8, yo)
1084
- ], 8, go))), 128))
1085
- ], 10, bo);
1749
+ const M = m.indexOf(
1750
+ document.activeElement
1751
+ );
1752
+ M < m.length - 1 ? m[M + 1].focus() : m[0].focus();
1753
+ }
1754
+ });
1755
+ }, pe = () => {
1756
+ nextTick(() => {
1757
+ if (Y.value) {
1758
+ const m = ae(
1759
+ v.value
1760
+ );
1761
+ if (m.length === 0 || !document.activeElement)
1762
+ return;
1763
+ const M = m.indexOf(
1764
+ document.activeElement
1765
+ );
1766
+ M > 0 ? m[M - 1].focus() : m[m.length - 1].focus();
1767
+ }
1768
+ });
1086
1769
  };
1770
+ return onKeyStroke("Escape", (m) => {
1771
+ P.value && (m.preventDefault(), U());
1772
+ }), onKeyStroke("ArrowDown", (m) => {
1773
+ P.value && Y.value && (m.preventDefault(), me());
1774
+ }), onKeyStroke("ArrowUp", (m) => {
1775
+ P.value && Y.value && (m.preventDefault(), pe());
1776
+ }), onKeyStroke([" ", "Enter"], (m) => {
1777
+ P.value && Y.value && (m.preventDefault(), document.activeElement.click());
1778
+ }), (m, M) => (d(), y(ne, null, [
1779
+ de(t(oe), null, {
1780
+ default: ve(() => [
1781
+ $(m.$slots, "default", j(F({ init: re, show: T, hide: U, toggle: te, expanded: t(P), aria: t(C) })))
1782
+ ]),
1783
+ _: 3
1784
+ }),
1785
+ de(dt, { name: m.transitionName }, {
1786
+ default: ve(() => [
1787
+ Se(N("div", {
1788
+ ref_key: "floatingEl",
1789
+ ref: v,
1790
+ style: Qe(t(B)),
1791
+ class: Z(t(R))
1792
+ }, [
1793
+ e.arrow ? (d(), y("div", {
1794
+ key: 0,
1795
+ ref_key: "arrowEl",
1796
+ ref: n,
1797
+ style: Qe(t(L)),
1798
+ class: "vv-dropdown__arrow"
1799
+ }, null, 4)) : w("", !0),
1800
+ $(m.$slots, "before", j(F({ expanded: t(P) }))),
1801
+ N("ul", G(t(i), {
1802
+ id: t(l),
1803
+ ref_key: "listEl",
1804
+ ref: r,
1805
+ tabindex: t(P) ? void 0 : -1,
1806
+ role: t(se),
1807
+ "aria-labelledby": t(ie),
1808
+ class: "vv-dropdown__list"
1809
+ }), [
1810
+ $(m.$slots, "items", j(F({
1811
+ role: t(z)
1812
+ })))
1813
+ ], 16, zo),
1814
+ $(m.$slots, "after", j(F({ expanded: t(P) })))
1815
+ ], 6), [
1816
+ [qe, t(P)]
1817
+ ])
1818
+ ]),
1819
+ _: 3
1820
+ }, 8, ["name"])
1821
+ ], 64));
1087
1822
  }
1088
- }), Co = {
1089
- ...Ce,
1090
- ...Xe,
1091
- ...Ye,
1092
- ...we,
1093
- ...ye,
1094
- ..._e,
1095
- ...Ve,
1823
+ }), Jo = {
1824
+ name: "VvDropdownItem"
1825
+ }, Ct = /* @__PURE__ */ q({
1826
+ ...Jo,
1827
+ setup(o) {
1828
+ const { role: a, expanded: e } = useInjectedDropdownItem(), s = ref(null);
1829
+ useProvideDropdownAction({ expanded: e });
1830
+ const l = useElementHover(s), { focused: i } = useFocus(s), { focused: u } = useFocusWithin(s);
1831
+ return watch(l, (c) => {
1832
+ c && (i.value = !0);
1833
+ }), (c, p) => (d(), y("li", G({ role: t(a) }, {
1834
+ ref_key: "element",
1835
+ ref: s,
1836
+ class: ["vv-dropdown__item", { "focus-visible": t(i) || t(u) }]
1837
+ }), [
1838
+ $(c.$slots, "default")
1839
+ ], 16));
1840
+ }
1841
+ }), Xo = {
1842
+ ...Le,
1843
+ ...ht,
1844
+ ...yt,
1845
+ ...Me,
1846
+ ...Pe,
1847
+ ...Oe,
1848
+ ...Be,
1849
+ ...Ke,
1850
+ ...Ae,
1096
1851
  ...De,
1097
1852
  ...ce,
1098
- ...Se,
1099
- ...re,
1100
- ...Pe,
1101
- ...Te,
1102
- ...Le,
1103
- ...Ie,
1853
+ ...ze,
1854
+ ...Ye,
1855
+ ...Je,
1856
+ ...xe,
1857
+ /**
1858
+ * This Boolean attribute indicates that multiple options can be selected in the list.
1859
+ * If it is not specified, then only one option can be selected at a time.
1860
+ * When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
1861
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
1862
+ */
1104
1863
  multiple: Boolean,
1864
+ /**
1865
+ * A Boolean attribute indicating that an option with a non-empty string value must be selected.
1866
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
1867
+ */
1105
1868
  required: Boolean,
1869
+ /**
1870
+ * If the control is presented as a scrolling list box (e.g. when multiple is specified),
1871
+ * this attribute represents the number of rows in the list that should be visible at one time.
1872
+ * Browsers are not required to present a select element as a scrolled list box. The default value is 0.
1873
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
1874
+ */
1106
1875
  size: [String, Number],
1876
+ /**
1877
+ * modelValue can be a string, number, boolean, object or array of string, number, boolean, object
1878
+ */
1107
1879
  modelValue: {
1108
1880
  type: [String, Number, Boolean, Object, Array],
1109
1881
  default: void 0
1110
1882
  },
1883
+ /**
1884
+ * <label> value for the select
1885
+ */
1111
1886
  label: String,
1887
+ /**
1888
+ * Select placeholder
1889
+ */
1112
1890
  placeholder: String
1113
- }, $o = ["update:modelValue", "focus", "blur"], ko = ["for"], Ao = { class: "vv-select__wrapper" }, Po = ["id"], wo = ["disabled", "hidden"], Io = ["disabled", "value"], Eo = {
1891
+ }, Qo = ["update:modelValue", "focus", "blur"], Zo = ["for"], ea = { class: "vv-select__wrapper" }, ta = {
1892
+ key: 0,
1893
+ class: "vv-select__input-before"
1894
+ }, oa = { class: "vv-select__inner" }, aa = ["id"], la = ["disabled", "hidden"], sa = ["disabled", "value"], na = {
1895
+ key: 1,
1896
+ class: "vv-select__input-after"
1897
+ }, ra = {
1114
1898
  name: "VvSelect"
1115
- }, Ro = /* @__PURE__ */ N({
1116
- ...Eo,
1117
- props: Co,
1118
- emits: $o,
1119
- setup(o, { emit: s }) {
1120
- const e = o, n = useSlots(), l = ref(), { HintSlot: i, hasHint: r, hasInvalid: f } = pe(e, n), {
1121
- modifiers: p,
1122
- disabled: u,
1123
- readonly: a,
1124
- loading: c,
1125
- icon: d,
1126
- iconPosition: b,
1127
- invalid: g,
1128
- valid: y,
1129
- floating: v,
1130
- multiple: V
1131
- } = toRefs(e), w = computed(() => String(e.id || ne())), C = computed(() => `${w.value}-hint`), { focused: M } = useComponentFocus(l, s), $ = useElementVisibility(l);
1132
- watch($, (P) => {
1133
- P && e.autofocus && (M.value = !0);
1899
+ }, ia = /* @__PURE__ */ q({
1900
+ ...ra,
1901
+ props: Xo,
1902
+ emits: Qo,
1903
+ setup(o, { emit: a }) {
1904
+ const e = o, s = useSlots(), l = ref(), { HintSlot: i, hasHint: u, hasInvalid: c } = Ve(e, s), {
1905
+ id: p,
1906
+ modifiers: v,
1907
+ disabled: n,
1908
+ readonly: r,
1909
+ loading: f,
1910
+ icon: g,
1911
+ iconPosition: k,
1912
+ invalid: A,
1913
+ valid: b,
1914
+ floating: S,
1915
+ multiple: I
1916
+ } = toRefs(e), B = useUniqueId(p), E = computed(() => `${B.value}-hint`), { focused: O } = useComponentFocus(l, a), L = useElementVisibility(l);
1917
+ watch(L, (R) => {
1918
+ R && e.autofocus && (O.value = !0);
1134
1919
  });
1135
- const { hasIcon: H, hasIconLeft: X, hasIconRight: T } = useComponentIcon(
1136
- d,
1137
- b
1138
- ), G = computed(() => !isEmpty(e.modelValue)), J = computed(() => e.disabled || e.readonly), ee = computed(() => J.value ? -1 : e.tabindex), te = computed(() => {
1920
+ const { hasIcon: K, hasIconBefore: ee, hasIconAfter: P } = useComponentIcon(
1921
+ g,
1922
+ k
1923
+ ), T = computed(() => !isEmpty(e.modelValue)), U = computed(() => e.disabled || e.readonly), te = computed(() => U.value ? -1 : e.tabindex), re = computed(() => {
1139
1924
  if (e.invalid === !0)
1140
1925
  return !0;
1141
1926
  if (e.valid === !0)
1142
1927
  return !1;
1143
- }), { bemCssClasses: Q } = useBemModifiers("vv-select", {
1144
- modifiers: p,
1145
- valid: y,
1146
- invalid: g,
1147
- loading: c,
1148
- disabled: u,
1149
- readonly: a,
1150
- iconLeft: X,
1151
- iconRight: T,
1152
- dirty: G,
1153
- focus: M,
1154
- floating: v,
1155
- multiple: V
1156
- }), ie = computed(() => ({
1928
+ }), ie = useBemModifiers(
1929
+ "vv-select",
1930
+ v,
1931
+ computed(() => ({
1932
+ valid: b.value,
1933
+ invalid: A.value,
1934
+ loading: f.value,
1935
+ disabled: n.value,
1936
+ readonly: r.value,
1937
+ "icon-before": ee.value,
1938
+ "icon-after": P.value,
1939
+ dirty: T.value,
1940
+ focus: O.value,
1941
+ floating: S.value,
1942
+ multiple: I.value
1943
+ }))
1944
+ ), C = computed(() => ({
1157
1945
  name: e.name,
1158
- tabindex: ee.value,
1159
- disabled: J.value,
1946
+ tabindex: te.value,
1947
+ disabled: U.value,
1160
1948
  required: e.required,
1161
1949
  size: e.size,
1162
1950
  autocomplete: e.autocomplete,
1163
1951
  multiple: e.multiple,
1164
- "aria-invalid": te.value,
1165
- "aria-describedby": !f.value && r.value ? C.value : void 0,
1166
- "aria-errormessage": f.value ? C.value : void 0
1167
- })), { getOptionLabel: oe, getOptionValue: se } = useOptions(e);
1168
- function le(P) {
1169
- return typeof P == "string" || P.disabled === void 0 ? u.value : P.disabled;
1170
- }
1171
- const W = computed({
1952
+ "aria-invalid": re.value,
1953
+ "aria-describedby": !c.value && u.value ? E.value : void 0,
1954
+ "aria-errormessage": c.value ? E.value : void 0
1955
+ })), oe = computed(() => ({
1956
+ valid: e.valid,
1957
+ invalid: e.invalid,
1958
+ modelValue: e.modelValue
1959
+ })), { getOptionLabel: fe, getOptionValue: se, getOptionDisabled: he } = useOptions(e), z = computed({
1172
1960
  get: () => e.modelValue,
1173
- set: (P) => {
1174
- Array.isArray(P) && (P = P.filter((j) => j !== void 0)), s("update:modelValue", P);
1961
+ set: (R) => {
1962
+ Array.isArray(R) && (R = R.filter((Y) => Y !== void 0)), a("update:modelValue", R);
1175
1963
  }
1176
1964
  });
1177
- return (P, j) => (m(), _("div", {
1178
- class: U(t(Q))
1965
+ return (R, Y) => (d(), y("div", {
1966
+ class: Z(t(ie))
1179
1967
  }, [
1180
- P.label ? (m(), _("label", {
1968
+ R.label ? (d(), y("label", {
1181
1969
  key: 0,
1182
- for: t(w)
1183
- }, B(P.label), 9, ko)) : I("", !0),
1184
- R("div", Ao, [
1185
- k(P.$slots, "before", {}, () => [
1186
- t(X) ? (m(), D(x, F(O({ key: 0 }, t(H))), null, 16)) : I("", !0)
1187
- ]),
1188
- ve(R("select", O({
1189
- id: t(w),
1190
- ref_key: "select",
1191
- ref: l,
1192
- "onUpdate:modelValue": j[0] || (j[0] = (A) => be(W) ? W.value = A : null)
1193
- }, t(ie)), [
1194
- P.placeholder ? (m(), _("option", {
1970
+ for: t(B)
1971
+ }, x(R.label), 9, Zo)) : w("", !0),
1972
+ N("div", ea, [
1973
+ R.$slots.before ? (d(), y("div", ta, [
1974
+ $(R.$slots, "before", j(F(t(oe))))
1975
+ ])) : w("", !0),
1976
+ N("div", oa, [
1977
+ t(ee) ? (d(), W(Q, G({
1195
1978
  key: 0,
1196
- value: void 0,
1197
- disabled: !P.unselectable,
1198
- hidden: !P.unselectable
1199
- }, B(P.placeholder), 9, wo)) : I("", !0),
1200
- (m(!0), _(de, null, fe(P.options, (A, L) => (m(), _("option", {
1201
- key: L,
1202
- disabled: le(A),
1203
- value: t(se)(A)
1204
- }, B(t(oe)(A)), 9, Io))), 128))
1205
- ], 16, Po), [
1206
- [vt, t(W)]
1979
+ class: "vv-select__icon"
1980
+ }, t(K)), null, 16)) : w("", !0),
1981
+ Se(N("select", G({
1982
+ id: t(B),
1983
+ ref_key: "select",
1984
+ ref: l,
1985
+ "onUpdate:modelValue": Y[0] || (Y[0] = (ae) => Ce(z) ? z.value = ae : null)
1986
+ }, t(C)), [
1987
+ R.placeholder ? (d(), y("option", {
1988
+ key: 0,
1989
+ value: void 0,
1990
+ disabled: !R.unselectable,
1991
+ hidden: !R.unselectable
1992
+ }, x(R.placeholder), 9, la)) : w("", !0),
1993
+ (d(!0), y(ne, null, ke(R.options, (ae, me) => (d(), y("option", {
1994
+ key: me,
1995
+ disabled: t(he)(ae),
1996
+ value: t(se)(ae)
1997
+ }, x(t(fe)(ae)), 9, sa))), 128))
1998
+ ], 16, aa), [
1999
+ [Bt, t(z)]
2000
+ ]),
2001
+ t(P) ? (d(), W(Q, G({
2002
+ key: 1,
2003
+ class: "vv-select__icon vv-select__icon-after"
2004
+ }, t(K)), null, 16)) : w("", !0)
1207
2005
  ]),
1208
- k(P.$slots, "after", {}, () => [
1209
- t(T) ? (m(), D(x, F(O({ key: 0 }, t(H))), null, 16)) : I("", !0)
1210
- ])
2006
+ R.$slots.after ? (d(), y("div", na, [
2007
+ $(R.$slots, "after", j(F(t(oe))))
2008
+ ])) : w("", !0)
1211
2009
  ]),
1212
- Z(t(i), {
1213
- id: t(C),
2010
+ de(t(i), {
2011
+ id: t(E),
1214
2012
  class: "vv-select__hint"
1215
2013
  }, null, 8, ["id"])
1216
2014
  ], 2));
1217
2015
  }
1218
- }), Oo = [
1219
- "update:modelValue",
1220
- "change:search",
1221
- "focus",
1222
- "blur"
1223
- ], Bo = {
1224
- ...Ce,
1225
- ...we,
1226
- ...ye,
1227
- ..._e,
1228
- ...Ve,
1229
- ...De,
1230
- ...ce,
1231
- ...Se,
1232
- ...re,
1233
- ...Pe,
1234
- ...Te,
1235
- ...Le,
1236
- ...Ie,
1237
- modelValue: {
1238
- type: [String, Number, Boolean, Object, Array],
1239
- default: void 0
1240
- },
1241
- label: String,
1242
- labelNoResults: { type: String, default: "No results" },
1243
- placeholder: String,
1244
- searchable: Boolean,
1245
- searchPlaceholder: String,
1246
- debounceSearch: {
1247
- type: [Number, String],
1248
- default: 0
1249
- },
1250
- multiple: Boolean,
1251
- maxValues: [Number, String],
1252
- separator: { type: String, default: ", " },
1253
- native: Boolean
1254
- }, Do = ["id"], To = ["id", "for"], Lo = ["tabindex"], Mo = ["id", "placeholder"], No = {
1255
- name: "VvCombobox"
1256
- }, Ds = /* @__PURE__ */ N({
1257
- ...No,
1258
- props: Bo,
1259
- emits: Oo,
1260
- setup(o, { emit: s }) {
1261
- const e = o, n = useSlots(), { HintSlot: l } = pe(e, n), i = ref(), r = ref(), { focused: f } = useComponentFocus(i, s), p = computed(() => String(e.id || ne())), u = ref(""), a = refDebounced(
1262
- u,
2016
+ }), ua = ["id"], da = ["id", "for"], ca = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], va = {
2017
+ key: 0,
2018
+ class: "vv-select__input-before"
2019
+ }, pa = { class: "vv-select__inner" }, fa = ["aria-labelledby", "tabindex"], ma = ["aria-label", "onClick"], ba = {
2020
+ key: 1,
2021
+ class: "vv-select__input-after"
2022
+ }, ha = { class: "vv-dropdown-action__hint" }, ya = {
2023
+ name: "VvCombobox",
2024
+ components: { VvDropdown: kt, VvDropdownItem: Ct }
2025
+ }, _l = /* @__PURE__ */ q({
2026
+ ...ya,
2027
+ props: qo,
2028
+ emits: Fo,
2029
+ setup(o, { emit: a }) {
2030
+ const e = o, s = useSlots(), { HintSlot: l } = Ve(e, s), i = ref(null), u = ref(null), c = ref(null), { focused: p } = useComponentFocus(i, a), { focused: v } = useFocusWithin(c);
2031
+ watch(p, (_) => {
2032
+ if (e.autoOpen) {
2033
+ if (_ && !f.value) {
2034
+ k();
2035
+ return;
2036
+ }
2037
+ !_ && f.value && !v.value && A();
2038
+ }
2039
+ }), watch(v, (_) => {
2040
+ !p.value && !_ && f.value && A();
2041
+ });
2042
+ const n = ref(""), r = refDebounced(
2043
+ n,
1263
2044
  Number(e.debounceSearch)
1264
- ), c = ref(!1), {
1265
- icon: d,
1266
- iconPosition: b,
1267
- modifiers: g,
1268
- disabled: y,
1269
- readonly: v,
1270
- loading: V,
1271
- valid: w,
1272
- invalid: C,
1273
- floating: M
1274
- } = toRefs(e);
2045
+ );
1275
2046
  watch(
1276
- a,
1277
- () => s("change:search", a.value)
2047
+ r,
2048
+ () => a("change:search", r.value)
1278
2049
  );
1279
- const { hasIcon: $, hasIconLeft: H, hasIconRight: X } = useComponentIcon(
1280
- d,
1281
- b
1282
- ), T = computed(() => !isEmpty(e.modelValue)), G = computed(() => y.value || v.value ? -1 : e.tabindex), { bemCssClasses: J } = useBemModifiers("vv-select", {
1283
- modifiers: g,
1284
- disabled: y,
1285
- loading: V,
1286
- readonly: v,
1287
- iconLeft: H,
1288
- iconRight: X,
1289
- valid: w,
1290
- invalid: C,
1291
- dirty: T,
1292
- focus: f,
1293
- floating: M
1294
- }), ee = computed(
1295
- () => e.searchable ? ie.value : e.options
1296
- ), { getOptionLabel: te, getOptionValue: Q } = useOptions(e), ie = computed(() => {
1297
- var A;
1298
- return (A = e.options) == null ? void 0 : A.filter((L) => te(L).toLowerCase().includes(a.value.toLowerCase().trim()));
1299
- }), oe = computed(() => {
1300
- let A = [];
1301
- return Array.isArray(e.modelValue) ? A = e.modelValue : e.modelValue && (A = [e.modelValue]), e.options.filter(
1302
- (L) => A.includes(Q(L))
1303
- );
1304
- }), se = computed(() => oe.value.map((A) => te(A)).join(e.separator));
1305
- onClickOutside(i, () => {
1306
- i.value.open = !1;
2050
+ const f = ref(!1), g = () => {
2051
+ e.disabled || e.readonly || (f.value = !f.value);
2052
+ }, k = () => {
2053
+ e.disabled || e.readonly || f.value || (f.value = !0);
2054
+ }, A = () => {
2055
+ e.disabled || e.readonly || !f.value || (f.value = !1);
2056
+ };
2057
+ watch(f, (_) => {
2058
+ T.value && nextTick(() => {
2059
+ if (_) {
2060
+ u.value && u.value.focus();
2061
+ return;
2062
+ }
2063
+ n.value = "";
2064
+ });
1307
2065
  });
1308
- function le(A) {
1309
- const L = A.target;
1310
- c.value = L.open;
1311
- }
1312
- function W(A) {
1313
- i.value && !e.multiple && (i.value.open = !1), s("update:modelValue", A);
2066
+ const {
2067
+ id: b,
2068
+ icon: S,
2069
+ iconPosition: I,
2070
+ modifiers: B,
2071
+ disabled: E,
2072
+ readonly: O,
2073
+ loading: L,
2074
+ valid: K,
2075
+ invalid: ee,
2076
+ floating: P,
2077
+ searchable: T
2078
+ } = toRefs(e), U = useUniqueId(b), te = computed(() => `${U.value}-hint`), re = computed(() => `${U.value}-dropdown`), ie = computed(() => `${U.value}-search`), C = computed(() => `${U.value}-label`), { hasIcon: oe, hasIconBefore: fe, hasIconAfter: se } = useComponentIcon(
2079
+ S,
2080
+ I
2081
+ ), he = computed(() => !isEmpty(e.modelValue)), z = computed(() => E.value || O.value ? -1 : e.tabindex), R = useBemModifiers(
2082
+ "vv-select",
2083
+ B,
2084
+ computed(() => ({
2085
+ disabled: E.value,
2086
+ loading: L.value,
2087
+ readonly: O.value,
2088
+ "icon-before": Boolean(fe.value),
2089
+ "icon-after": Boolean(se.value),
2090
+ valid: K.value,
2091
+ invalid: ee.value,
2092
+ dirty: he.value,
2093
+ focus: p.value,
2094
+ floating: P.value
2095
+ }))
2096
+ ), Y = computed(
2097
+ () => e.searchable ? m.value : e.options
2098
+ ), { getOptionLabel: ae, getOptionValue: me, getOptionDisabled: pe } = useOptions(e), m = computed(() => {
2099
+ var _;
2100
+ return (_ = e.options) == null ? void 0 : _.filter((J) => ae(J).toLowerCase().includes(r.value.toLowerCase().trim()));
2101
+ });
2102
+ function M(_) {
2103
+ return Array.isArray(e.modelValue) ? contains(_, e.modelValue) || contains(me(_), e.modelValue) : equals(_, e.modelValue) || equals(me(_), e.modelValue);
1314
2104
  }
1315
- const P = computed(() => ({
1316
- name: e.name,
1317
- options: ee.value,
1318
- labelKey: e.labelKey,
1319
- valueKey: e.valueKey,
1320
- disabled: e.disabled,
1321
- labelNoResults: e.labelNoResults,
1322
- multiple: e.multiple,
1323
- maxValues: e.maxValues,
1324
- modelValue: e.modelValue,
1325
- unselectable: e.unselectable
1326
- })), j = computed(() => ({
1327
- id: p.value,
2105
+ const ue = computed(() => {
2106
+ let _ = [];
2107
+ return Array.isArray(e.modelValue) ? _ = e.modelValue : e.modelValue && (_ = [e.modelValue]), e.options.filter(
2108
+ (J) => _.includes(me(J))
2109
+ );
2110
+ }), ye = computed(() => ue.value.map((_) => ae(_)).join(e.separator));
2111
+ watch(ue, () => {
2112
+ !e.multiple && e.autoClose && A();
2113
+ });
2114
+ const He = () => {
2115
+ e.autoOpen ? k() : g();
2116
+ }, Ee = (_) => {
2117
+ var $e;
2118
+ if (e.disabled || e.readonly)
2119
+ return;
2120
+ const J = me(_);
2121
+ let H = J;
2122
+ if (e.multiple)
2123
+ if (Array.isArray(e.modelValue)) {
2124
+ if (e.maxValues !== void 0 && e.maxValues >= 0 && (($e = e.modelValue) == null ? void 0 : $e.length) >= e.maxValues && !contains(J, e.modelValue))
2125
+ return;
2126
+ H = contains(J, e.modelValue) ? removeFromList(J, e.modelValue) : [...e.modelValue, J];
2127
+ } else
2128
+ H = [J];
2129
+ else
2130
+ e.unselectable && J === e.modelValue && (H = void 0);
2131
+ a("update:modelValue", H);
2132
+ }, D = computed(() => ({
2133
+ id: U.value,
1328
2134
  name: e.name,
1329
- tabindex: G.value,
1330
- valid: w.value,
2135
+ tabindex: z.value,
2136
+ valid: K.value,
1331
2137
  validLabel: e.validLabel,
1332
- invalid: C.value,
2138
+ invalid: ee.value,
1333
2139
  invalidLabel: e.invalidLabel,
1334
2140
  hintLabel: e.hintLabel,
1335
- loading: V.value,
2141
+ loading: L.value,
1336
2142
  loadingLabel: e.loadingLabel,
1337
- disabled: y.value,
1338
- readonly: v.value,
2143
+ disabled: E.value,
2144
+ readonly: O.value,
1339
2145
  modifiers: e.modifiers,
1340
- options: ee.value,
2146
+ options: Y.value,
1341
2147
  labelKey: e.labelKey,
1342
2148
  valueKey: e.valueKey,
1343
2149
  icon: e.icon,
@@ -1348,142 +2154,263 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1348
2154
  label: e.label,
1349
2155
  placeholder: e.placeholder,
1350
2156
  modelValue: e.modelValue
2157
+ })), le = computed(() => ({
2158
+ id: re.value,
2159
+ reference: c.value,
2160
+ placement: e.placement,
2161
+ transitionName: e.transitionName,
2162
+ offset: e.offset,
2163
+ shift: e.shift,
2164
+ flip: e.flip,
2165
+ autoPlacement: e.autoPlacement,
2166
+ arrow: e.arrow,
2167
+ autoClose: e.autoClose,
2168
+ autofocusFirst: T.value ? !1 : e.autofocusFirst,
2169
+ triggerWidth: e.triggerWidth,
2170
+ modifiers: e.dropdownModifiers
2171
+ })), we = computed(() => ({
2172
+ valid: e.valid,
2173
+ invalid: e.invalid,
2174
+ modelValue: e.modelValue
1351
2175
  }));
1352
- return (A, L) => A.native ? (m(), D(Ro, O({ key: 1 }, t(j), {
1353
- "onUpdate:modelValue": L[4] || (L[4] = (z) => s("update:modelValue", z))
1354
- }), null, 16)) : (m(), _("div", {
2176
+ return onKeyStroke([" ", "Enter"], (_) => {
2177
+ e.autoOpen || !f.value && p.value && (_.preventDefault(), _.stopImmediatePropagation(), g());
2178
+ }), (_, J) => _.native ? (d(), W(ia, G({ key: 1 }, t(D), {
2179
+ "onUpdate:modelValue": J[2] || (J[2] = (H) => a("update:modelValue", H))
2180
+ }), null, 16)) : (d(), y("div", {
1355
2181
  key: 0,
1356
- id: t(p),
1357
- class: U(t(J))
2182
+ id: t(U),
2183
+ class: Z(t(R))
1358
2184
  }, [
1359
- A.label ? (m(), _("label", {
2185
+ _.label ? (d(), y("label", {
1360
2186
  key: 0,
1361
- id: `${t(p)}-label`,
1362
- for: A.searchable && t(c) ? `${t(p)}-input` : void 0
1363
- }, B(A.label), 9, To)) : I("", !0),
1364
- R("details", {
1365
- ref_key: "dropdown",
1366
- ref: i,
1367
- class: "vv-select__wrapper",
1368
- onClick: L[2] || (L[2] = (z) => t(y) || t(v) ? z.preventDefault() : null),
1369
- onKeyup: L[3] || (L[3] = Ne((z) => t(i).open = !1, ["esc"])),
1370
- onToggle: le
2187
+ id: t(C),
2188
+ for: t(T) ? t(ie) : void 0
2189
+ }, x(_.label), 9, da)) : w("", !0),
2190
+ N("div", {
2191
+ ref_key: "wrapperEl",
2192
+ ref: c,
2193
+ class: "vv-select__wrapper"
1371
2194
  }, [
1372
- R("summary", {
1373
- class: "vv-select__input",
1374
- tabindex: t(G),
1375
- onKeyup: L[1] || (L[1] = Ne((z) => A.searchable ? z.preventDefault() : null, ["space"]))
1376
- }, [
1377
- k(A.$slots, "before", {}, () => [
1378
- t(H) ? (m(), D(x, O({
1379
- key: 0,
1380
- class: "vv-select__icon-left"
1381
- }, t($)), null, 16)) : I("", !0)
2195
+ de(kt, G({
2196
+ modelValue: t(f),
2197
+ "onUpdate:modelValue": J[1] || (J[1] = (H) => Ce(f) ? f.value = H : null)
2198
+ }, t(le), { role: "listbox" }), Rt({
2199
+ default: ve(({ aria: H }) => [
2200
+ _.$slots.before ? (d(), y("div", va, [
2201
+ $(_.$slots, "before", j(F(t(we))))
2202
+ ])) : w("", !0),
2203
+ N("div", pa, [
2204
+ t(fe) ? (d(), W(Q, G({
2205
+ key: 0,
2206
+ class: "vv-select__icon"
2207
+ }, t(oe)), null, 16)) : w("", !0),
2208
+ N("div", G({
2209
+ ref_key: "inputEl",
2210
+ ref: i
2211
+ }, H, {
2212
+ "aria-labelledby": t(C),
2213
+ class: "vv-select__input",
2214
+ role: "combobox",
2215
+ tabindex: t(z),
2216
+ onClickPassive: He
2217
+ }), [
2218
+ $(_.$slots, "value", j(F({ selectedOptions: t(ue), onInput: Ee })), () => [
2219
+ t(ye) ? (d(), y(ne, { key: 0 }, [
2220
+ _.badges ? (d(!0), y(ne, { key: 1 }, ke(t(ue), ($e, Xe) => (d(), W(co, {
2221
+ key: Xe,
2222
+ modifiers: _.badgeModifiers,
2223
+ class: "vv-select__badge"
2224
+ }, {
2225
+ default: ve(() => [
2226
+ X(x(t(ae)($e)) + " ", 1),
2227
+ _.unselectable && !t(O) && !t(E) ? (d(), y("button", {
2228
+ key: 0,
2229
+ "aria-label": _.deselectLabel,
2230
+ onClick: it((rl) => Ee($e), ["stop"])
2231
+ }, [
2232
+ de(Q, { name: "close" })
2233
+ ], 8, ma)) : w("", !0)
2234
+ ]),
2235
+ _: 2
2236
+ }, 1032, ["modifiers"]))), 128)) : (d(), y(ne, { key: 0 }, [
2237
+ X(x(t(ye)), 1)
2238
+ ], 64))
2239
+ ], 64)) : (d(), y(ne, { key: 1 }, [
2240
+ X(x(_.placeholder), 1)
2241
+ ], 64))
2242
+ ])
2243
+ ], 16, fa),
2244
+ t(se) ? (d(), W(Q, G({
2245
+ key: 1,
2246
+ class: "vv-select__icon vv-select__icon-after"
2247
+ }, t(oe)), null, 16)) : w("", !0)
2248
+ ]),
2249
+ _.$slots.after ? (d(), y("div", ba, [
2250
+ $(_.$slots, "after", j(F(t(we))))
2251
+ ])) : w("", !0)
1382
2252
  ]),
1383
- A.searchable && t(c) ? ve((m(), _("input", {
1384
- key: 0,
1385
- id: `${t(p)}-input`,
1386
- ref_key: "inputSearch",
1387
- ref: r,
1388
- "onUpdate:modelValue": L[0] || (L[0] = (z) => be(u) ? u.value = z : null),
1389
- role: "combobox",
1390
- type: "search",
1391
- placeholder: A.searchPlaceholder
1392
- }, null, 8, Mo)), [
1393
- [Ke, t(u)]
1394
- ]) : (m(), _(de, { key: 1 }, [
1395
- q(B(t(se) || A.placeholder), 1)
1396
- ], 64)),
1397
- k(A.$slots, "after", {}, () => [
1398
- t(X) ? (m(), D(x, O({
1399
- key: 0,
1400
- class: "vv-select__icon-right"
1401
- }, t($)), null, 16)) : I("", !0)
1402
- ])
1403
- ], 40, Lo),
1404
- Z(Vo, O({
1405
- id: `${t(p)}-dropdown`
1406
- }, t(P), { "onUpdate:modelValue": W }), null, 16, ["id"])
1407
- ], 544),
1408
- Z(t(l), { class: "vv-select__hint" })
1409
- ], 10, Do));
2253
+ items: ve(() => [
2254
+ (d(!0), y(ne, null, ke(t(m), (H, $e) => (d(), W(Ct, {
2255
+ key: $e,
2256
+ class: Z(["vv-dropdown-action", {
2257
+ disabled: t(pe)(H),
2258
+ selected: M(H),
2259
+ "vv-dropdown-action--unselectable": _.unselectable && M(H)
2260
+ }]),
2261
+ tabindex: t(pe)(H) ? -1 : 0,
2262
+ "aria-selected": M(H),
2263
+ "aria-disabled": t(pe)(H),
2264
+ onClickPassive: (Xe) => Ee(H)
2265
+ }, {
2266
+ default: ve(() => [
2267
+ $(_.$slots, "option", j(F({
2268
+ option: H,
2269
+ selectedOptions: t(ue),
2270
+ selected: M(H),
2271
+ disabled: t(pe)(H)
2272
+ })), () => [
2273
+ X(x(t(ae)(H)) + " ", 1),
2274
+ N("span", ha, [
2275
+ M(H) ? (d(), y(ne, { key: 0 }, [
2276
+ X(x(_.unselectable ? _.pressToDeselectLabel : _.selectedLabel), 1)
2277
+ ], 64)) : t(pe)(H) ? w("", !0) : (d(), y(ne, { key: 1 }, [
2278
+ X(x(_.pressToSelectLabel), 1)
2279
+ ], 64))
2280
+ ])
2281
+ ])
2282
+ ]),
2283
+ _: 2
2284
+ }, 1032, ["tabindex", "class", "aria-selected", "aria-disabled", "onClickPassive"]))), 128))
2285
+ ]),
2286
+ _: 2
2287
+ }, [
2288
+ t(T) ? {
2289
+ name: "before",
2290
+ fn: ve(() => [
2291
+ t(T) ? Se((d(), y("input", {
2292
+ key: 0,
2293
+ id: t(ie),
2294
+ ref_key: "inputSearchEl",
2295
+ ref: u,
2296
+ "onUpdate:modelValue": J[0] || (J[0] = (H) => Ce(n) ? n.value = H : null),
2297
+ "aria-autocomplete": "list",
2298
+ "aria-controls": t(re),
2299
+ "aria-labelledby": t(C),
2300
+ "aria-describedby": t(te),
2301
+ autocomplete: "off",
2302
+ spellcheck: "false",
2303
+ type: "search",
2304
+ class: "vv-dropdown__search",
2305
+ placeholder: _.searchPlaceholder
2306
+ }, null, 8, ca)), [
2307
+ [qe, t(f)],
2308
+ [ct, t(n)]
2309
+ ]) : w("", !0)
2310
+ ]),
2311
+ key: "0"
2312
+ } : void 0
2313
+ ]), 1040, ["modelValue"])
2314
+ ], 512),
2315
+ de(t(l), {
2316
+ id: t(te),
2317
+ class: "vv-select__hint"
2318
+ }, null, 8, ["id"])
2319
+ ], 10, ua));
1410
2320
  }
1411
- }), Ho = ["open", "close", "update:modelValue"], xo = {
1412
- id: { type: String, required: !0 },
2321
+ }), ga = ["open", "close", "update:modelValue"], _a = {
2322
+ ...Ne,
2323
+ /**
2324
+ * Dialog title
2325
+ */
1413
2326
  title: String,
2327
+ /**
2328
+ * Show / hide dialog programmatically
2329
+ */
1414
2330
  modelValue: Boolean,
2331
+ /**
2332
+ * Dialog transition
2333
+ */
1415
2334
  transition: { type: String, default: "fade-block" },
2335
+ /**
2336
+ * Dialog size
2337
+ */
1416
2338
  size: String,
2339
+ /**
2340
+ * Close dialog on click outside
2341
+ */
1417
2342
  autoClose: { type: Boolean, default: !0 }
1418
- }, Go = {
2343
+ }, Sa = {
1419
2344
  key: 0,
1420
2345
  class: "vv-dialog__header"
1421
- }, Uo = ["onClick"], Fo = { class: "vv-dialog__content" }, Ko = {
2346
+ }, Va = { class: "vv-dialog__content" }, $a = {
1422
2347
  key: 1,
1423
2348
  class: "vv-dialog__footer"
1424
- }, Wo = {
2349
+ }, ka = {
1425
2350
  name: "VvDialog"
1426
- }, Ts = /* @__PURE__ */ N({
1427
- ...Wo,
1428
- props: xo,
1429
- emits: Ho,
1430
- setup(o, { emit: s }) {
1431
- const e = o, n = useVModel(e, "modelValue", s), l = ref(!0), i = ref(null), r = computed(() => {
1432
- const { id: c } = e;
2351
+ }, Sl = /* @__PURE__ */ q({
2352
+ ...ka,
2353
+ props: _a,
2354
+ emits: ga,
2355
+ setup(o, { emit: a }) {
2356
+ const e = o, s = useVModel(e, "modelValue", a), l = ref(!0), i = ref(null), u = computed(() => {
2357
+ const { id: r } = e;
1433
2358
  return {
1434
- id: c,
2359
+ id: r,
1435
2360
  open: l.value
1436
2361
  };
1437
- }), f = computed(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), p = computed(() => `vv-dialog--${e.transition}`), u = {
2362
+ }), c = computed(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), p = computed(() => `vv-dialog--${e.transition}`), v = {
1438
2363
  "before-enter": () => {
1439
- l.value = !0, s("open");
2364
+ l.value = !0, a("open");
1440
2365
  },
1441
2366
  "after-leave": () => {
1442
- l.value = !1, s("close");
2367
+ l.value = !1, a("close");
1443
2368
  }
1444
2369
  };
1445
2370
  onClickOutside(i, () => {
1446
- e.autoClose && (n.value = !1);
2371
+ e.autoClose && (s.value = !1);
1447
2372
  });
1448
- function a() {
1449
- n.value = !1;
2373
+ function n() {
2374
+ s.value = !1;
1450
2375
  }
1451
- return (c, d) => (m(), D(mt, O({ name: t(p) }, ft(u)), {
1452
- default: ge(() => [
1453
- ve(R("dialog", O(t(r), { class: t(f) }), [
1454
- R("article", {
2376
+ return onKeyStroke("Escape", (r) => {
2377
+ s.value && (r.preventDefault(), n());
2378
+ }), (r, f) => (d(), W(dt, G({ name: t(p) }, Tt(v)), {
2379
+ default: ve(() => [
2380
+ Se(N("dialog", G(t(u), { class: t(c) }), [
2381
+ N("article", {
1455
2382
  ref_key: "modalWrapper",
1456
2383
  ref: i,
1457
2384
  class: "vv-dialog__wrapper"
1458
2385
  }, [
1459
- c.$slots.header || c.title ? (m(), _("header", Go, [
1460
- k(c.$slots, "header", {}, () => [
1461
- q(B(c.title) + " ", 1),
1462
- R("button", {
2386
+ r.$slots.header || r.title ? (d(), y("header", Sa, [
2387
+ $(r.$slots, "header", {}, () => [
2388
+ X(x(r.title) + " ", 1),
2389
+ N("button", {
1463
2390
  type: "button",
1464
2391
  "aria-label": "Close",
1465
2392
  class: "vv-dialog__close",
1466
- onClick: Be(a, ["prevent"])
2393
+ onClickPassive: n
1467
2394
  }, [
1468
- Z(x, { name: "close" })
1469
- ], 8, Uo)
2395
+ de(Q, { name: "close" })
2396
+ ], 32)
1470
2397
  ])
1471
- ])) : I("", !0),
1472
- R("div", Fo, [
1473
- k(c.$slots, "default")
2398
+ ])) : w("", !0),
2399
+ N("div", Va, [
2400
+ $(r.$slots, "default")
1474
2401
  ]),
1475
- c.$slots.footer ? (m(), _("footer", Ko, [
1476
- k(c.$slots, "footer")
1477
- ])) : I("", !0)
2402
+ r.$slots.footer ? (d(), y("footer", $a, [
2403
+ $(r.$slots, "footer")
2404
+ ])) : w("", !0)
1478
2405
  ], 512)
1479
2406
  ], 16), [
1480
- [bt, t(n)]
2407
+ [qe, t(s)]
1481
2408
  ])
1482
2409
  ]),
1483
2410
  _: 3
1484
2411
  }, 16, ["name"]));
1485
2412
  }
1486
- }), S = {
2413
+ }), V = {
1487
2414
  TEXT: "text",
1488
2415
  PASSWORD: "password",
1489
2416
  NUMBER: "number",
@@ -1497,61 +2424,121 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1497
2424
  DATETIME_LOCAL: "datetime-local",
1498
2425
  MONTH: "month",
1499
2426
  WEEK: "week"
1500
- }, ue = {
2427
+ }, _e = {
1501
2428
  PASSWORD_SHOW: "eye-on",
1502
2429
  PASSWORD_HIDE: "eye-off",
1503
2430
  DATE: "calendar",
1504
2431
  TIME: "time",
1505
2432
  COLOR: "color",
1506
2433
  SEARCH: "close"
1507
- }, qo = ["update:modelValue", "focus", "blur", "keyup"], jo = {
1508
- ...Je,
2434
+ }, Ca = ["update:modelValue", "focus", "blur", "keyup"], Aa = {
2435
+ ...gt,
2436
+ /**
2437
+ * Input value
2438
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
2439
+ */
1509
2440
  modelValue: [String, Number],
2441
+ /**
2442
+ * Type of form control
2443
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#type
2444
+ */
1510
2445
  type: {
1511
2446
  type: String,
1512
- default: S.TEXT,
1513
- validator: (o) => Object.values(S).includes(o)
2447
+ default: V.TEXT,
2448
+ validator: (o) => Object.values(V).includes(o)
1514
2449
  },
2450
+ /**
2451
+ * Minimum value
2452
+ * Available for input types: date, month, week, time, datetime-local, number, range.
2453
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
2454
+ */
1515
2455
  min: [Number, Date, String],
2456
+ /**
2457
+ * Maximum value
2458
+ * Available for input types: date, month, week, time, datetime-local, number, range.
2459
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
2460
+ */
1516
2461
  max: [Number, Date, String],
2462
+ /**
2463
+ * Incremental values that are valid
2464
+ * Available for input types: date, month, week, time, datetime-local and number
2465
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
2466
+ */
1517
2467
  step: { type: [String, Number], default: 1 },
2468
+ /**
2469
+ * Pattern the value must match to be valid
2470
+ * Available for input types: text, search, url, tel, email and password
2471
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
2472
+ */
1518
2473
  pattern: String,
2474
+ /**
2475
+ * Whether to allow multiple values
2476
+ * Available for input type email
2477
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
2478
+ */
1519
2479
  multiple: Boolean,
2480
+ /**
2481
+ * VvIcon name for show password button
2482
+ * @see VVIcon
2483
+ */
1520
2484
  iconShowPassword: {
1521
2485
  type: String,
1522
- default: ue.PASSWORD_SHOW
2486
+ default: _e.PASSWORD_SHOW
1523
2487
  },
2488
+ /**
2489
+ * VvIcon name for hide password button
2490
+ * @see VVIcon
2491
+ */
1524
2492
  iconHidePassword: {
1525
2493
  type: String,
1526
- default: ue.PASSWORD_HIDE
2494
+ default: _e.PASSWORD_HIDE
1527
2495
  },
2496
+ /**
2497
+ * VvIcon name for clear button
2498
+ * @see VVIcon
2499
+ */
1528
2500
  iconClear: {
1529
2501
  type: String,
1530
- default: ue.SEARCH
2502
+ default: _e.SEARCH
1531
2503
  },
2504
+ /**
2505
+ * Label for step up button
2506
+ */
1532
2507
  labelStepUp: {
1533
2508
  type: String,
1534
2509
  default: "Increase value"
1535
2510
  },
2511
+ /**
2512
+ * Label for step down button
2513
+ */
1536
2514
  labelStepDown: {
1537
2515
  type: String,
1538
2516
  default: "Decrease value"
1539
2517
  },
2518
+ /**
2519
+ * Label for show password button
2520
+ */
1540
2521
  labelShowPassword: {
1541
2522
  type: String,
1542
2523
  default: "Show password"
1543
2524
  },
2525
+ /**
2526
+ * Label for hide password button
2527
+ */
1544
2528
  labelHidePassword: {
1545
2529
  type: String,
1546
2530
  default: "Hide password"
1547
2531
  },
2532
+ /**
2533
+ * Label for clear button
2534
+ */
1548
2535
  labelClear: {
1549
2536
  type: String,
1550
2537
  default: "Clear"
1551
2538
  }
1552
- }, xe = defineComponent({
2539
+ }, st = defineComponent({
1553
2540
  components: {
1554
- VvIcon: x
2541
+ VvIcon: Q
1555
2542
  },
1556
2543
  props: {
1557
2544
  disabled: {
@@ -1568,29 +2555,29 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1568
2555
  },
1569
2556
  iconShow: {
1570
2557
  type: String,
1571
- default: ue.PASSWORD_SHOW
2558
+ default: _e.PASSWORD_SHOW
1572
2559
  },
1573
2560
  iconHide: {
1574
2561
  type: String,
1575
- default: ue.PASSWORD_HIDE
2562
+ default: _e.PASSWORD_HIDE
1576
2563
  }
1577
2564
  },
1578
2565
  emits: ["toggle-password"],
1579
- setup(o, { emit: s }) {
1580
- const e = ref(!1), n = computed(
2566
+ setup(o, { emit: a }) {
2567
+ const e = ref(!1), s = computed(
1581
2568
  () => e.value ? o.iconHide : o.iconShow
1582
2569
  );
1583
2570
  function l(i) {
1584
- i == null || i.stopPropagation(), o.disabled || (e.value = !e.value, s("toggle-password", e.value));
2571
+ i == null || i.stopPropagation(), o.disabled || (e.value = !e.value, a("toggle-password", e.value));
1585
2572
  }
1586
2573
  return {
1587
2574
  active: e,
1588
- activeIcon: n,
2575
+ activeIcon: s,
1589
2576
  onClick: l
1590
2577
  };
1591
2578
  },
1592
2579
  render() {
1593
- const o = h(x, {
2580
+ const o = h(Q, {
1594
2581
  name: this.activeIcon,
1595
2582
  class: "vv-input-text__action-icon"
1596
2583
  });
@@ -1606,9 +2593,9 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1606
2593
  o
1607
2594
  );
1608
2595
  }
1609
- }), Re = defineComponent({
2596
+ }), Ue = defineComponent({
1610
2597
  components: {
1611
- VvIcon: x
2598
+ VvIcon: Q
1612
2599
  },
1613
2600
  props: {
1614
2601
  disabled: {
@@ -1625,12 +2612,12 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1625
2612
  }
1626
2613
  },
1627
2614
  emits: ["step-up", "step-down"],
1628
- setup(o, { emit: s }) {
2615
+ setup(o, { emit: a }) {
1629
2616
  const e = computed(() => o.mode === "up");
1630
2617
  return {
1631
2618
  isUp: e,
1632
2619
  onClick: (l) => {
1633
- l == null || l.stopPropagation(), o.disabled || s(e.value ? "step-up" : "step-down");
2620
+ l == null || l.stopPropagation(), o.disabled || a(e.value ? "step-up" : "step-down");
1634
2621
  }
1635
2622
  };
1636
2623
  },
@@ -1645,9 +2632,9 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1645
2632
  onClick: this.onClick
1646
2633
  });
1647
2634
  }
1648
- }), Ge = defineComponent({
2635
+ }), nt = defineComponent({
1649
2636
  components: {
1650
- VvIcon: x
2637
+ VvIcon: Q
1651
2638
  },
1652
2639
  props: {
1653
2640
  disabled: {
@@ -1664,16 +2651,16 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1664
2651
  }
1665
2652
  },
1666
2653
  emits: ["clear"],
1667
- setup(o, { emit: s }) {
1668
- function e(n) {
1669
- n == null || n.stopPropagation(), o.disabled || s("clear");
2654
+ setup(o, { emit: a }) {
2655
+ function e(s) {
2656
+ s == null || s.stopPropagation(), o.disabled || a("clear");
1670
2657
  }
1671
2658
  return {
1672
2659
  onClick: e
1673
2660
  };
1674
2661
  },
1675
2662
  render() {
1676
- const o = h(x, {
2663
+ const o = h(Q, {
1677
2664
  name: this.icon,
1678
2665
  class: "vv-input-text__action-icon"
1679
2666
  });
@@ -1690,47 +2677,47 @@ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-i
1690
2677
  );
1691
2678
  }
1692
2679
  });
1693
- function Oe(o, s) {
2680
+ function We(o, a) {
1694
2681
  return {
1695
2682
  name: "VvInputTextActions",
1696
2683
  components: {
1697
- VvIcon: x,
1698
- VvInputPasswordAction: xe,
1699
- VvInputStepAction: Re,
1700
- VvInputClearAction: Ge
2684
+ VvIcon: Q,
2685
+ VvInputPasswordAction: st,
2686
+ VvInputStepAction: Ue,
2687
+ VvInputClearAction: nt
1701
2688
  },
1702
2689
  setup() {
1703
2690
  return {
1704
- isDisabled: computed(() => s.disabled || s.readonly),
1705
- labelStepUp: s.labelStepUp,
1706
- labelStepDown: s.labelStepDown,
1707
- labelShowPassword: s.labelShowPassword,
1708
- labelHidePassword: s.labelHidePassword,
1709
- labelClear: s.labelClear,
1710
- iconShowPassword: s.iconShowPassword,
1711
- iconHidePassword: s.iconHidePassword
2691
+ isDisabled: computed(() => a.disabled || a.readonly),
2692
+ labelStepUp: a.labelStepUp,
2693
+ labelStepDown: a.labelStepDown,
2694
+ labelShowPassword: a.labelShowPassword,
2695
+ labelHidePassword: a.labelHidePassword,
2696
+ labelClear: a.labelClear,
2697
+ iconShowPassword: a.iconShowPassword,
2698
+ iconHidePassword: a.iconHidePassword
1712
2699
  };
1713
2700
  },
1714
2701
  render() {
1715
2702
  let e = null;
1716
2703
  switch (o) {
1717
- case S.SEARCH: {
1718
- const { onClear: n } = this.$attrs;
2704
+ case V.SEARCH: {
2705
+ const { onClear: s } = this.$attrs;
1719
2706
  e = [
1720
- h(Ge, {
2707
+ h(nt, {
1721
2708
  disabled: this.isDisabled,
1722
2709
  label: this.labelShowPassword,
1723
- onClear: n
2710
+ onClear: s
1724
2711
  })
1725
2712
  ];
1726
2713
  break;
1727
2714
  }
1728
- case S.PASSWORD: {
1729
- const { onTogglePassword: n } = this.$attrs;
2715
+ case V.PASSWORD: {
2716
+ const { onTogglePassword: s } = this.$attrs;
1730
2717
  e = [
1731
- h(xe, {
2718
+ h(st, {
1732
2719
  disabled: this.isDisabled,
1733
- onTogglePassword: n,
2720
+ onTogglePassword: s,
1734
2721
  labelShow: this.labelShowPassword,
1735
2722
  labelHide: this.labelHidePassword,
1736
2723
  iconShow: this.iconShowPassword,
@@ -1739,21 +2726,21 @@ function Oe(o, s) {
1739
2726
  ];
1740
2727
  break;
1741
2728
  }
1742
- case S.NUMBER: {
1743
- const { onStepUp: n, onStepDown: l } = this.$attrs;
2729
+ case V.NUMBER: {
2730
+ const { onStepUp: s, onStepDown: l } = this.$attrs;
1744
2731
  e = [
1745
- h(Re, {
2732
+ h(Ue, {
1746
2733
  mode: "up",
1747
- disabled: this.isDisabled || s.max !== void 0 && s.modelValue === s.max,
2734
+ disabled: this.isDisabled || a.max !== void 0 && a.modelValue === a.max,
1748
2735
  label: this.labelStepUp,
1749
- onStepUp: n,
2736
+ onStepUp: s,
1750
2737
  onStepDown: l
1751
2738
  }),
1752
- h(Re, {
2739
+ h(Ue, {
1753
2740
  mode: "down",
1754
- disabled: this.isDisabled || s.min !== void 0 && s.modelValue === s.min,
2741
+ disabled: this.isDisabled || a.min !== void 0 && a.modelValue === a.min,
1755
2742
  label: this.labelStepDown,
1756
- onStepUp: n,
2743
+ onStepUp: s,
1757
2744
  onStepDown: l
1758
2745
  })
1759
2746
  ];
@@ -1764,378 +2751,454 @@ function Oe(o, s) {
1764
2751
  }
1765
2752
  };
1766
2753
  }
1767
- const zo = ["for"], Xo = { class: "vv-input-text__wrapper" }, Yo = ["id"], Jo = {
2754
+ const wa = ["for"], Ea = { class: "vv-input-text__wrapper" }, Ia = {
1768
2755
  key: 0,
2756
+ class: "vv-input-text__input-before"
2757
+ }, Pa = { class: "vv-input-text__inner" }, Oa = ["id"], Da = {
2758
+ key: 1,
2759
+ class: "vv-input-text__input-after"
2760
+ }, Ba = {
2761
+ key: 2,
1769
2762
  class: "vv-input-text__limit"
1770
- }, Qo = {
2763
+ }, Ra = {
1771
2764
  name: "VvInputText"
1772
- }, Ls = /* @__PURE__ */ N({
1773
- ...Qo,
1774
- props: jo,
1775
- emits: qo,
1776
- setup(o, { emit: s }) {
1777
- const e = o, n = useSlots(), l = ref(), {
1778
- icon: i,
1779
- iconPosition: r,
1780
- label: f,
1781
- modelValue: p,
1782
- count: u,
1783
- valid: a,
1784
- invalid: c,
1785
- loading: d
1786
- } = toRefs(e), b = computed(() => String(e.id || ne())), g = computed(() => `${b.value}-hint`), y = computed(
2765
+ }, Vl = /* @__PURE__ */ q({
2766
+ ...Ra,
2767
+ props: Aa,
2768
+ emits: Ca,
2769
+ setup(o, { emit: a }) {
2770
+ const e = o, s = useSlots(), l = ref(), {
2771
+ id: i,
2772
+ icon: u,
2773
+ iconPosition: c,
2774
+ label: p,
2775
+ modelValue: v,
2776
+ count: n,
2777
+ valid: r,
2778
+ invalid: f,
2779
+ loading: g
2780
+ } = toRefs(e), k = useUniqueId(i), A = computed(() => `${k.value}-hint`), b = computed(
1787
2781
  () => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
1788
- ), v = useDebouncedInput(p, s, e.debounce), { focused: V } = useComponentFocus(l, s), w = useElementVisibility(l);
1789
- watch(w, (E) => {
1790
- E && e.autofocus && (V.value = !0);
2782
+ ), S = useDebouncedInput(v, a, e.debounce), { focused: I } = useComponentFocus(l, a), B = useElementVisibility(l);
2783
+ watch(B, (D) => {
2784
+ D && e.autofocus && (I.value = !0);
1791
2785
  });
1792
- const C = ref(!1), M = computed(() => e.type === S.PASSWORD), $ = () => {
1793
- C.value = !C.value;
1794
- }, H = computed(
1795
- () => e.type === S.TIME || e.type === S.DATETIME_LOCAL || e.type === S.DATE || e.type === S.WEEK || e.type === S.MONTH
1796
- ), X = computed(() => e.type === S.NUMBER), T = () => {
1797
- le.value && (l.value.stepUp(), v.value = unref(l).value);
1798
- }, G = () => {
1799
- le.value && (l.value.stepDown(), v.value = unref(l).value);
1800
- }, J = computed(() => e.type === S.SEARCH), ee = () => {
1801
- v.value = void 0;
1802
- }, { hasIconLeft: te, hasIconRight: Q, hasIcon: ie } = useComponentIcon(
1803
- i,
1804
- r
2786
+ const E = ref(!1), O = computed(() => e.type === V.PASSWORD), L = () => {
2787
+ E.value = !E.value;
2788
+ }, K = computed(
2789
+ () => e.type === V.TIME || e.type === V.DATETIME_LOCAL || e.type === V.DATE || e.type === V.WEEK || e.type === V.MONTH
2790
+ ), ee = computed(() => e.type === V.NUMBER), P = () => {
2791
+ se.value && (l.value.stepUp(), S.value = unref(l).value);
2792
+ }, T = () => {
2793
+ se.value && (l.value.stepDown(), S.value = unref(l).value);
2794
+ }, U = computed(() => e.type === V.SEARCH), te = () => {
2795
+ S.value = void 0;
2796
+ }, { hasIcon: re, hasIconBefore: ie, hasIconAfter: C } = useComponentIcon(
2797
+ u,
2798
+ c
1805
2799
  ), oe = computed(() => {
1806
2800
  switch (e.type) {
1807
- case S.COLOR:
1808
- return { name: ue.COLOR };
1809
- case S.DATE:
1810
- case S.DATETIME_LOCAL:
1811
- case S.WEEK:
1812
- case S.MONTH:
1813
- return { name: ue.DATE };
1814
- case S.TIME:
1815
- return { name: ue.TIME };
2801
+ case V.COLOR:
2802
+ return { name: _e.COLOR };
2803
+ case V.DATE:
2804
+ case V.DATETIME_LOCAL:
2805
+ case V.WEEK:
2806
+ case V.MONTH:
2807
+ return { name: _e.DATE };
2808
+ case V.TIME:
2809
+ return { name: _e.TIME };
1816
2810
  default:
1817
2811
  return "";
1818
2812
  }
1819
- }), { formatted: se } = useTextCount(v, {
2813
+ }), { formatted: fe } = useTextCount(S, {
1820
2814
  mode: e.count,
1821
2815
  upperLimit: e.maxlength,
1822
2816
  lowerLimit: e.minlength
1823
- }), le = computed(() => !e.disabled && !e.readonly), W = computed(
1824
- () => le.value ? e.tabindex : -1
1825
- ), P = computed(() => !isEmpty(p)), j = computed(() => {
1826
- if (c.value === !0)
2817
+ }), se = computed(() => !e.disabled && !e.readonly), he = computed(
2818
+ () => se.value ? e.tabindex : -1
2819
+ ), z = computed(() => !isEmpty(v)), R = computed(() => {
2820
+ if (f.value === !0)
1827
2821
  return !0;
1828
- if (a.value === !0)
2822
+ if (r.value === !0)
1829
2823
  return !1;
1830
- }), { bemCssClasses: A } = useBemModifiers("vv-input-text", {
1831
- modifiers: e.modifiers,
1832
- valid: a,
1833
- invalid: c,
1834
- loading: d,
1835
- disabled: e.disabled,
1836
- readonly: e.readonly,
1837
- iconLeft: te,
1838
- iconRight: Q.value || !isEmpty(oe),
1839
- floating: e.floating && !isEmpty(e.label),
1840
- dirty: P,
1841
- focus: V
1842
- }), L = computed(() => {
1843
- const E = (() => M.value && C.value || H.value && !P.value && !V.value ? S.TEXT : e.type)(), K = {
1844
- type: E,
2824
+ }), { modifiers: Y } = toRefs(e), ae = useBemModifiers(
2825
+ "vv-input-text",
2826
+ Y,
2827
+ computed(() => ({
2828
+ valid: r.value,
2829
+ invalid: f.value,
2830
+ loading: g.value,
2831
+ disabled: e.disabled,
2832
+ readonly: e.readonly,
2833
+ "icon-before": ie.value,
2834
+ "icon-after": C.value || !isEmpty(oe),
2835
+ floating: e.floating && !isEmpty(e.label),
2836
+ dirty: z.value,
2837
+ focus: I.value
2838
+ }))
2839
+ ), me = computed(() => {
2840
+ const D = (() => O.value && E.value || K.value && !z.value && !I.value ? V.TEXT : e.type)(), le = {
2841
+ type: D,
1845
2842
  name: e.name,
1846
- tabindex: W.value,
2843
+ tabindex: he.value,
1847
2844
  disabled: e.disabled,
1848
2845
  readonly: e.readonly,
1849
2846
  required: e.required,
1850
2847
  autocomplete: e.autocomplete,
1851
- "aria-invalid": j.value,
1852
- "aria-describedby": !Me.value && st.value ? g.value : void 0,
1853
- "aria-errormessage": Me.value ? g.value : void 0
2848
+ "aria-invalid": R.value,
2849
+ "aria-describedby": !ue.value && M.value ? A.value : void 0,
2850
+ "aria-errormessage": ue.value ? A.value : void 0
1854
2851
  };
1855
- return (E === S.DATE || E === S.MONTH || E === S.WEEK || E === S.TIME || E === S.DATETIME_LOCAL || E === S.NUMBER) && (K.step = e.step, K.max = String(e.max), K.min = String(e.min)), (E === S.TEXT || E === S.SEARCH || E === S.URL || E === S.TEL || E === S.EMAIL || E === S.PASSWORD || E === S.NUMBER) && (K.placeholder = y.value), (E === S.TEXT || E === S.SEARCH || E === S.URL || E === S.TEL || E === S.EMAIL || E === S.PASSWORD) && (K.minlength = e.minlength, K.maxlength = e.maxlength, K.pattern = e.pattern), E === S.EMAIL && (K.multiple = e.multiple), K;
1856
- }), z = computed(() => ({
2852
+ return (D === V.DATE || D === V.MONTH || D === V.WEEK || D === V.TIME || D === V.DATETIME_LOCAL || D === V.NUMBER) && (le.step = e.step, le.max = String(e.max), le.min = String(e.min)), (D === V.TEXT || D === V.SEARCH || D === V.URL || D === V.TEL || D === V.EMAIL || D === V.PASSWORD || D === V.NUMBER) && (le.placeholder = b.value), (D === V.TEXT || D === V.SEARCH || D === V.URL || D === V.TEL || D === V.EMAIL || D === V.PASSWORD) && (le.minlength = e.minlength, le.maxlength = e.maxlength, le.pattern = e.pattern), D === V.EMAIL && (le.multiple = e.multiple), le;
2853
+ }), pe = computed(() => ({
1857
2854
  valid: e.valid,
1858
2855
  invalid: e.invalid,
1859
2856
  modelValue: e.modelValue,
1860
- togglePassword: $,
1861
- stepUp: T,
1862
- stepDown: G,
1863
- clear: ee
1864
- })), { HintSlot: ot, hasHint: st, hasInvalid: Me } = pe(e, n), lt = Oe(
1865
- S.PASSWORD,
2857
+ togglePassword: L,
2858
+ stepUp: P,
2859
+ stepDown: T,
2860
+ clear: te
2861
+ })), { HintSlot: m, hasHint: M, hasInvalid: ue } = Ve(e, s), ye = We(
2862
+ V.PASSWORD,
1866
2863
  e
1867
- ), at = Oe(
1868
- S.NUMBER,
2864
+ ), He = We(
2865
+ V.NUMBER,
1869
2866
  e
1870
- ), nt = Oe(
1871
- S.SEARCH,
2867
+ ), Ee = We(
2868
+ V.SEARCH,
1872
2869
  e
1873
2870
  );
1874
- return (E, K) => (m(), _("div", {
1875
- class: U(t(A))
2871
+ return (D, le) => (d(), y("div", {
2872
+ class: Z(t(ae))
1876
2873
  }, [
1877
- t(f) ? (m(), _("label", {
2874
+ t(p) ? (d(), y("label", {
1878
2875
  key: 0,
1879
- for: t(b),
2876
+ for: t(k),
1880
2877
  class: "vv-input-text__label"
1881
- }, B(t(f)), 9, zo)) : I("", !0),
1882
- R("div", Xo, [
1883
- k(E.$slots, "before", F(Y(t(z))), () => [
1884
- t(te) ? (m(), D(x, O({
2878
+ }, x(t(p)), 9, wa)) : w("", !0),
2879
+ N("div", Ea, [
2880
+ D.$slots.before ? (d(), y("div", Ia, [
2881
+ $(D.$slots, "before", j(F(t(pe))))
2882
+ ])) : w("", !0),
2883
+ N("div", Pa, [
2884
+ t(ie) ? (d(), W(Q, G({
1885
2885
  key: 0,
1886
- class: "vv-input-text__icon-left"
1887
- }, t(ie)), null, 16)) : I("", !0)
1888
- ]),
1889
- ve(R("input", O({
1890
- id: t(b),
1891
- ref_key: "input",
1892
- ref: l,
1893
- "onUpdate:modelValue": K[0] || (K[0] = (Ee) => be(v) ? v.value = Ee : null)
1894
- }, t(L), {
1895
- onKeyup: K[1] || (K[1] = (Ee) => s("keyup", Ee))
1896
- }), null, 16, Yo), [
1897
- [ht, t(v)]
1898
- ]),
1899
- k(E.$slots, "after", F(Y(t(z))), () => [
1900
- t(Q) || t(oe) ? (m(), D(x, F(O({ key: 0 }, t(Q) ? t(ie) : t(oe))), null, 16)) : t(M) ? (m(), D(t(lt), {
2886
+ class: "vv-input-text__icon"
2887
+ }, t(re)), null, 16)) : w("", !0),
2888
+ Se(N("input", G({
2889
+ id: t(k),
2890
+ ref_key: "input",
2891
+ ref: l,
2892
+ "onUpdate:modelValue": le[0] || (le[0] = (we) => Ce(S) ? S.value = we : null)
2893
+ }, t(me), {
2894
+ onKeyup: le[1] || (le[1] = (we) => a("keyup", we))
2895
+ }), null, 16, Oa), [
2896
+ [Mt, t(S)]
2897
+ ]),
2898
+ t(C) || t(oe) ? (d(), W(Q, G({
1901
2899
  key: 1,
1902
- onTogglePassword: $
1903
- })) : t(X) ? (m(), D(t(at), {
2900
+ class: "vv-input-text__icon vv-input-text__icon-after"
2901
+ }, t(C) ? t(re) : t(oe)), null, 16)) : t(O) ? (d(), W(t(ye), {
1904
2902
  key: 2,
1905
- onStepUp: T,
1906
- onStepDown: G
1907
- })) : t(J) ? (m(), D(t(nt), {
2903
+ onTogglePassword: L
2904
+ })) : t(ee) ? (d(), W(t(He), {
1908
2905
  key: 3,
1909
- onClear: ee
1910
- })) : I("", !0)
2906
+ onStepUp: P,
2907
+ onStepDown: T
2908
+ })) : t(U) ? (d(), W(t(Ee), {
2909
+ key: 4,
2910
+ onClear: te
2911
+ })) : w("", !0)
1911
2912
  ]),
1912
- t(u) ? (m(), _("span", Jo, [
1913
- k(E.$slots, "count", F(Y(t(z))), () => [
1914
- q(B(t(se)), 1)
2913
+ D.$slots.after ? (d(), y("div", Da, [
2914
+ $(D.$slots, "after", j(F(t(pe))))
2915
+ ])) : w("", !0),
2916
+ t(n) ? (d(), y("span", Ba, [
2917
+ $(D.$slots, "count", j(F(t(pe))), () => [
2918
+ X(x(t(fe)), 1)
1915
2919
  ])
1916
- ])) : I("", !0)
2920
+ ])) : w("", !0)
1917
2921
  ]),
1918
- Z(t(ot), {
1919
- id: t(g),
2922
+ de(t(m), {
2923
+ id: t(A),
1920
2924
  class: "vv-input-text__hint"
1921
2925
  }, null, 8, ["id"])
1922
2926
  ], 2));
1923
2927
  }
1924
- }), Zo = {
1925
- ...re,
2928
+ }), Ta = {
2929
+ ...ce,
2930
+ /**
2931
+ * Progress value
2932
+ * This attribute specifies how much of the task that has been completed.
2933
+ * It must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted.
2934
+ * If there is no value attribute, the progress bar is indeterminate.
2935
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
2936
+ */
1926
2937
  value: {
1927
2938
  type: [Number, String],
1928
2939
  default: void 0
1929
2940
  },
2941
+ /**
2942
+ * Progress max
2943
+ * This attribute describes how much work the task indicated by the progress element requires.
2944
+ * The max attribute, if present, must have a value greater than 0 and be a valid floating point number. The default value is 1.
2945
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
2946
+ */
1930
2947
  max: {
1931
2948
  type: [Number, String]
1932
2949
  },
2950
+ /**
2951
+ * Progress aria-label
2952
+ */
1933
2953
  label: {
1934
2954
  type: String,
1935
2955
  required: !0
1936
2956
  }
1937
- }, es = {
2957
+ }, Ma = {
1938
2958
  name: "VvProgress"
1939
- }, Ms = /* @__PURE__ */ N({
1940
- ...es,
1941
- props: Zo,
2959
+ }, $l = /* @__PURE__ */ q({
2960
+ ...Ma,
2961
+ props: Ta,
1942
2962
  setup(o) {
1943
- const s = o, { value: e, max: n, label: l } = toRefs(s), i = computed(() => s.value === void 0), { bemCssClasses: r } = useBemModifiers("vv-progress", {
1944
- modifiers: s.modifiers,
1945
- indeterminate: i
1946
- });
1947
- return (f, p) => (m(), _("progress", O({ role: "progressbar" }, {
1948
- class: t(r),
2963
+ const a = o, { value: e, max: s, label: l } = toRefs(a), i = computed(() => a.value === void 0), { modifiers: u } = toRefs(a), c = useBemModifiers(
2964
+ "vv-progress",
2965
+ u,
2966
+ computed(() => ({ indeterminate: i.value }))
2967
+ );
2968
+ return (p, v) => (d(), y("progress", G({ role: "progressbar" }, {
2969
+ class: t(c),
1949
2970
  ariaLabel: t(l),
1950
- max: t(n),
2971
+ max: t(s),
1951
2972
  value: t(e)
1952
2973
  }), null, 16));
1953
2974
  }
1954
- }), ts = Qe, os = ["click", "update:modelValue", "change", "blur"];
1955
- function ss(o, s) {
1956
- const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(qe), i = l("modelValue", o, s), r = l("readonly", o), f = l("disabled", o), p = l("valid", o), u = l("invalid", o);
2975
+ }), xa = _t, Na = ["click", "update:modelValue", "change", "blur"];
2976
+ function La(o, a) {
2977
+ const { id: e } = toRefs(o), { group: s, isInGroup: l, getGroupOrLocalRef: i } = useInjectedGroupState(ft), u = i("modelValue", o, a), c = i("readonly", o), p = i("disabled", o), v = i("valid", o), n = i("invalid", o);
1957
2978
  return {
1958
- group: e,
1959
- isInGroup: n,
1960
- modelValue: i,
1961
- readonly: r,
1962
- disabled: f,
1963
- valid: p,
1964
- invalid: u
2979
+ // local props
2980
+ id: e,
2981
+ // global props
2982
+ group: s,
2983
+ isInGroup: l,
2984
+ modelValue: u,
2985
+ readonly: c,
2986
+ disabled: p,
2987
+ valid: v,
2988
+ invalid: n
1965
2989
  };
1966
2990
  }
1967
- const ls = ["for"], as = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ns = {
2991
+ const Ha = ["for"], Ga = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ua = {
1968
2992
  name: "VvRadio"
1969
- }, rs = /* @__PURE__ */ N({
1970
- ...ns,
1971
- props: ts,
1972
- emits: os,
1973
- setup(o, { emit: s }) {
1974
- const e = o, n = useSlots(), { disabled: l, readonly: i, modelValue: r, valid: f, invalid: p } = ss(
1975
- e,
1976
- s
1977
- ), u = computed(() => String(e.id || ne())), a = computed(() => d.value ? -1 : e.tabindex), c = ref(), d = computed(() => l.value || i.value), b = computed(() => {
1978
- if (p.value === !0)
2993
+ }, Wa = /* @__PURE__ */ q({
2994
+ ...Ua,
2995
+ props: xa,
2996
+ emits: Na,
2997
+ setup(o, { emit: a }) {
2998
+ const e = o, s = useSlots(), { id: l, disabled: i, readonly: u, modelValue: c, valid: p, invalid: v } = La(e, a), n = useUniqueId(l), r = computed(() => g.value ? -1 : e.tabindex), f = ref(), g = computed(() => i.value || u.value), k = computed(() => {
2999
+ if (v.value === !0)
1979
3000
  return !0;
1980
- if (f.value === !0)
3001
+ if (p.value === !0)
1981
3002
  return !1;
1982
- }), g = computed(
1983
- () => Array.isArray(r.value) ? contains(e.value, r.value) : equals(e.value, r.value)
1984
- ), y = computed(
3003
+ }), A = computed(
3004
+ () => Array.isArray(c.value) ? contains(e.value, c.value) : equals(e.value, c.value)
3005
+ ), b = computed(
1985
3006
  () => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
1986
- ), v = computed({
3007
+ ), S = computed({
1987
3008
  get() {
1988
- return g.value ? y.value : null;
3009
+ return A.value ? b.value : null;
1989
3010
  },
1990
- set(C) {
1991
- Array.isArray(r.value) ? r.value = [e.value] : r.value = e.value, s("change", C);
3011
+ set(O) {
3012
+ Array.isArray(c.value) ? c.value = [e.value] : c.value = e.value, a("change", O);
1992
3013
  }
1993
- }), { bemCssClasses: V } = useBemModifiers("vv-radio", {
1994
- valid: f,
1995
- invalid: p,
1996
- disabled: l,
1997
- readonly: i
1998
- }), { HintSlot: w } = pe(e, n);
1999
- return (C, M) => (m(), _("label", {
2000
- class: U(t(V)),
2001
- for: t(u)
3014
+ }), { modifiers: I } = toRefs(e), B = useBemModifiers(
3015
+ "vv-radio",
3016
+ I,
3017
+ computed(() => ({
3018
+ valid: p.value,
3019
+ invalid: v.value,
3020
+ disabled: i.value,
3021
+ readonly: u.value
3022
+ }))
3023
+ ), { HintSlot: E } = Ve(e, s);
3024
+ return (O, L) => (d(), y("label", {
3025
+ class: Z(t(B)),
3026
+ for: t(n)
2002
3027
  }, [
2003
- ve(R("input", {
2004
- id: t(u),
3028
+ Se(N("input", {
3029
+ id: t(n),
2005
3030
  ref_key: "input",
2006
- ref: c,
2007
- "onUpdate:modelValue": M[0] || (M[0] = ($) => be(v) ? v.value = $ : null),
3031
+ ref: f,
3032
+ "onUpdate:modelValue": L[0] || (L[0] = (K) => Ce(S) ? S.value = K : null),
2008
3033
  type: "radio",
2009
3034
  class: "vv-radio__input",
2010
- name: C.name,
2011
- disabled: t(d),
2012
- value: t(y),
2013
- tabindex: t(a),
2014
- "aria-invalid": t(b)
2015
- }, null, 8, as), [
2016
- [gt, t(v)]
3035
+ name: O.name,
3036
+ disabled: t(g),
3037
+ value: t(b),
3038
+ tabindex: t(r),
3039
+ "aria-invalid": t(k)
3040
+ }, null, 8, Ga), [
3041
+ [xt, t(S)]
2017
3042
  ]),
2018
- k(C.$slots, "default", { value: t(r) }, () => [
2019
- q(B(C.label), 1)
3043
+ $(O.$slots, "default", { value: t(c) }, () => [
3044
+ X(x(O.label), 1)
2020
3045
  ]),
2021
- Z(t(w), {
3046
+ de(t(E), {
2022
3047
  class: "vv-radio__hint",
2023
- params: { value: t(r) }
3048
+ params: { value: t(c) }
2024
3049
  }, null, 8, ["params"])
2025
- ], 10, ls));
3050
+ ], 10, Ha));
2026
3051
  }
2027
- }), is = Ze, us = ["update:modelValue", "change"], ds = ["textContent"], cs = { class: "vv-radio-group__wrapper" }, ps = {
3052
+ }), ja = St, Fa = ["update:modelValue", "change"], qa = ["textContent"], Ka = { class: "vv-radio-group__wrapper" }, za = {
2028
3053
  name: "VvRadioGroup"
2029
- }, Ns = /* @__PURE__ */ N({
2030
- ...ps,
2031
- props: is,
2032
- emits: us,
2033
- setup(o, { emit: s }) {
2034
- const e = o, n = useSlots(), l = useVModel(e, "modelValue", s), { disabled: i, readonly: r, vertical: f, valid: p, invalid: u } = toRefs(e), a = {
2035
- key: qe,
3054
+ }, kl = /* @__PURE__ */ q({
3055
+ ...za,
3056
+ props: ja,
3057
+ emits: Fa,
3058
+ setup(o, { emit: a }) {
3059
+ const e = o, s = useSlots(), l = useVModel(e, "modelValue", a), { disabled: i, readonly: u, vertical: c, valid: p, invalid: v, modifiers: n } = toRefs(e);
3060
+ useProvideGroupState({
3061
+ key: ft,
2036
3062
  modelValue: l,
2037
3063
  disabled: i,
2038
- readonly: r,
3064
+ readonly: u,
2039
3065
  valid: p,
2040
- invalid: u
2041
- };
2042
- useProvideGroupState(a);
2043
- const { getOptionLabel: c, getOptionValue: d } = useOptions(e), { bemCssClasses: b } = useBemModifiers("vv-radio-group", {
2044
- disabled: i,
2045
- readonly: r,
2046
- horizontal: computed(() => !f.value),
2047
- valid: p,
2048
- invalid: u
2049
- }), g = (v, V) => ({
2050
- id: `${e.name}_opt${V}`,
3066
+ invalid: v
3067
+ });
3068
+ const { getOptionLabel: r, getOptionValue: f } = useOptions(e), g = useBemModifiers(
3069
+ "vv-radio-group",
3070
+ n,
3071
+ computed(() => ({
3072
+ disabled: i.value,
3073
+ readonly: u.value,
3074
+ horizontal: !c.value,
3075
+ valid: p.value,
3076
+ invalid: v.value
3077
+ }))
3078
+ ), k = (b, S) => ({
3079
+ id: `${e.name}_opt${S}`,
2051
3080
  name: e.name,
2052
- label: c(v),
2053
- value: d(v)
2054
- }), { HintSlot: y } = pe(e, n);
2055
- return (v, V) => (m(), _("fieldset", {
2056
- class: U(t(b))
3081
+ label: r(b),
3082
+ value: f(b)
3083
+ }), { HintSlot: A } = Ve(e, s);
3084
+ return (b, S) => (d(), y("fieldset", {
3085
+ class: Z(t(g))
2057
3086
  }, [
2058
- v.label ? (m(), _("legend", {
3087
+ b.label ? (d(), y("legend", {
2059
3088
  key: 0,
2060
- textContent: B(v.label)
2061
- }, null, 8, ds)) : I("", !0),
2062
- R("div", cs, [
2063
- v.options.length > 0 ? (m(!0), _(de, { key: 0 }, fe(v.options, (w, C) => (m(), D(rs, O({ key: C }, g(w, C)), null, 16))), 128)) : k(v.$slots, "default", { key: 1 })
3089
+ textContent: x(b.label)
3090
+ }, null, 8, qa)) : w("", !0),
3091
+ N("div", Ka, [
3092
+ b.options.length > 0 ? (d(!0), y(ne, { key: 0 }, ke(b.options, (I, B) => (d(), W(Wa, G({ key: B }, k(I, B)), null, 16))), 128)) : $(b.$slots, "default", { key: 1 })
2064
3093
  ]),
2065
- Z(t(y), { class: "vv-radio-group__hint" })
3094
+ de(t(A), { class: "vv-radio-group__hint" })
2066
3095
  ], 2));
2067
3096
  }
2068
- }), vs = {
3097
+ }), Ya = {
2069
3098
  hard: "hard",
2070
3099
  soft: "soft"
2071
- }, ms = {
3100
+ }, Ja = {
2072
3101
  true: !0,
2073
3102
  false: !1,
2074
3103
  default: "default"
2075
- }, fs = ["update:modelValue", "focus", "blur", "keyup"], bs = {
2076
- ...Je,
3104
+ }, Xa = ["update:modelValue", "focus", "blur", "keyup"], Qa = {
3105
+ ...gt,
3106
+ /**
3107
+ * Textarea value
3108
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
3109
+ */
2077
3110
  modelValue: String,
3111
+ /**
3112
+ * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
3113
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
3114
+ */
2078
3115
  cols: { type: [String, Number], default: 20 },
3116
+ /**
3117
+ * The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
3118
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
3119
+ */
2079
3120
  rows: { type: [String, Number], default: 2 },
2080
- wrap: { type: String, default: vs.soft },
2081
- spellcheck: { type: [Boolean, String], default: ms.default },
3121
+ /**
3122
+ * Indicates how the control should wrap the value for form submission.
3123
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
3124
+ */
3125
+ wrap: { type: String, default: Ya.soft },
3126
+ /**
3127
+ * Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
3128
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
3129
+ */
3130
+ spellcheck: { type: [Boolean, String], default: Ja.default },
3131
+ /**
3132
+ * If true, the textarea will be resizable
3133
+ */
2082
3134
  resizable: Boolean
2083
- }, hs = ["for"], gs = { class: "vv-textarea__wrapper" }, ys = ["id"], _s = {
3135
+ }, Za = ["for"], el = { class: "vv-textarea__wrapper" }, tl = {
2084
3136
  key: 0,
3137
+ class: "vv-textarea__input-before"
3138
+ }, ol = { class: "vv-textarea__inner" }, al = ["id"], ll = {
3139
+ key: 1,
3140
+ class: "vv-textarea__input-after"
3141
+ }, sl = {
3142
+ key: 2,
2085
3143
  class: "vv-textarea__limit"
2086
- }, Ss = {
3144
+ }, nl = {
2087
3145
  name: "VvTextarea"
2088
- }, Hs = /* @__PURE__ */ N({
2089
- ...Ss,
2090
- props: bs,
2091
- emits: fs,
2092
- setup(o, { emit: s }) {
2093
- const e = o, n = useSlots(), l = ref(), {
2094
- icon: i,
2095
- iconPosition: r,
2096
- label: f,
2097
- modelValue: p,
2098
- count: u,
2099
- valid: a,
2100
- invalid: c,
2101
- loading: d
2102
- } = toRefs(e), b = computed(() => String(e.id || ne())), g = computed(() => `${b.value}-hint`), y = computed(
3146
+ }, Cl = /* @__PURE__ */ q({
3147
+ ...nl,
3148
+ props: Qa,
3149
+ emits: Xa,
3150
+ setup(o, { emit: a }) {
3151
+ const e = o, s = useSlots(), l = ref(), {
3152
+ id: i,
3153
+ icon: u,
3154
+ iconPosition: c,
3155
+ label: p,
3156
+ modelValue: v,
3157
+ count: n,
3158
+ valid: r,
3159
+ invalid: f,
3160
+ loading: g,
3161
+ modifiers: k
3162
+ } = toRefs(e), A = useUniqueId(i), b = computed(() => `${A.value}-hint`), S = computed(
2103
3163
  () => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
2104
- ), v = useDebouncedInput(p, s, e.debounce), { hasIcon: V, hasIconLeft: w, hasIconRight: C } = useComponentIcon(
2105
- i,
2106
- r
2107
- ), { focused: M } = useComponentFocus(l, s), $ = useElementVisibility(l);
2108
- watch($, (W) => {
2109
- W && e.autofocus && (M.value = !0);
3164
+ ), I = useDebouncedInput(v, a, e.debounce), { hasIcon: B, hasIconBefore: E, hasIconAfter: O } = useComponentIcon(
3165
+ u,
3166
+ c
3167
+ ), { focused: L } = useComponentFocus(l, a), K = useElementVisibility(l);
3168
+ watch(K, (z) => {
3169
+ z && e.autofocus && (L.value = !0);
2110
3170
  });
2111
- const { formatted: H } = useTextCount(v, {
3171
+ const { formatted: ee } = useTextCount(I, {
2112
3172
  mode: e.count,
2113
3173
  upperLimit: e.maxlength,
2114
3174
  lowerLimit: e.minlength
2115
- }), X = computed(() => !e.disabled && !e.readonly), T = computed(
2116
- () => X.value ? e.tabindex : -1
2117
- ), G = computed(() => !isEmpty(p)), J = computed(() => {
3175
+ }), P = computed(() => !e.disabled && !e.readonly), T = computed(
3176
+ () => P.value ? e.tabindex : -1
3177
+ ), U = computed(() => !isEmpty(v)), te = computed(() => {
2118
3178
  if (e.invalid === !0)
2119
3179
  return !0;
2120
3180
  if (e.valid === !0)
2121
3181
  return !1;
2122
- }), { HintSlot: ee, hasHint: te, hasInvalid: Q } = pe(e, n), { bemCssClasses: ie } = useBemModifiers("vv-textarea", {
2123
- modifiers: e.modifiers,
2124
- valid: a,
2125
- invalid: c,
2126
- loading: d,
2127
- disabled: e.disabled,
2128
- readonly: e.readonly,
2129
- iconLeft: w,
2130
- iconRight: C,
2131
- floating: e.floating && !isEmpty(e.label),
2132
- dirty: G,
2133
- focused: M,
2134
- resizable: e.resizable
2135
- }), oe = computed(
3182
+ }), { HintSlot: re, hasHint: ie, hasInvalid: C } = Ve(e, s), oe = useBemModifiers(
3183
+ "vv-textarea",
3184
+ k,
3185
+ computed(() => ({
3186
+ valid: r.value,
3187
+ invalid: f.value,
3188
+ loading: g.value,
3189
+ disabled: e.disabled,
3190
+ readonly: e.readonly,
3191
+ "icon-before": E.value,
3192
+ "icon-after": O.value,
3193
+ floating: e.floating && !isEmpty(e.label),
3194
+ dirty: U.value,
3195
+ focused: L.value,
3196
+ resizable: e.resizable
3197
+ }))
3198
+ ), fe = computed(
2136
3199
  () => ({
2137
3200
  name: e.name,
2138
- placeholder: y.value,
3201
+ placeholder: S.value,
2139
3202
  tabindex: T.value,
2140
3203
  disabled: e.disabled,
2141
3204
  readonly: e.readonly,
@@ -2147,9 +3210,9 @@ const ls = ["for"], as = ["id", "name", "disabled", "value", "tabindex", "aria-i
2147
3210
  rows: e.rows,
2148
3211
  wrap: e.wrap,
2149
3212
  spellcheck: e.spellcheck,
2150
- "aria-invalid": J.value,
2151
- "aria-describedby": !Q.value && te.value ? g.value : void 0,
2152
- "aria-errormessage": Q.value ? g.value : void 0
3213
+ "aria-invalid": te.value,
3214
+ "aria-describedby": !C.value && ie.value ? b.value : void 0,
3215
+ "aria-errormessage": C.value ? b.value : void 0
2153
3216
  })
2154
3217
  ), se = computed(() => ({
2155
3218
  valid: e.valid,
@@ -2158,70 +3221,77 @@ const ls = ["for"], as = ["id", "name", "disabled", "value", "tabindex", "aria-i
2158
3221
  hintLabel: e.hintLabel,
2159
3222
  maxlength: e.maxlength,
2160
3223
  minlength: e.minlength,
2161
- clear: le
2162
- })), le = () => {
2163
- v.value = void 0;
3224
+ clear: he
3225
+ })), he = () => {
3226
+ I.value = void 0;
2164
3227
  };
2165
- return (W, P) => (m(), _("div", {
2166
- class: U(t(ie))
3228
+ return (z, R) => (d(), y("div", {
3229
+ class: Z(t(oe))
2167
3230
  }, [
2168
- t(f) ? (m(), _("label", {
3231
+ t(p) ? (d(), y("label", {
2169
3232
  key: 0,
2170
- for: t(b),
3233
+ for: t(A),
2171
3234
  class: "vv-textarea__label"
2172
- }, B(t(f)), 9, hs)) : I("", !0),
2173
- R("div", gs, [
2174
- k(W.$slots, "before", F(Y(t(se))), () => [
2175
- t(w) ? (m(), D(x, O({
3235
+ }, x(t(p)), 9, Za)) : w("", !0),
3236
+ N("div", el, [
3237
+ z.$slots.before ? (d(), y("div", tl, [
3238
+ $(z.$slots, "before", j(F(t(se))))
3239
+ ])) : w("", !0),
3240
+ N("div", ol, [
3241
+ t(E) ? (d(), W(Q, G({
2176
3242
  key: 0,
2177
- class: "vv-textarea__icon-left"
2178
- }, t(V)), null, 16)) : I("", !0)
2179
- ]),
2180
- ve(R("textarea", O({
2181
- id: t(b),
2182
- ref_key: "textarea",
2183
- ref: l,
2184
- "onUpdate:modelValue": P[0] || (P[0] = (j) => be(v) ? v.value = j : null)
2185
- }, t(oe), {
2186
- onKeyup: P[1] || (P[1] = (j) => s("keyup", j))
2187
- }), null, 16, ys), [
2188
- [Ke, t(v)]
2189
- ]),
2190
- k(W.$slots, "after", F(Y(t(se))), () => [
2191
- t(C) ? (m(), D(x, F(O({ key: 0 }, t(V))), null, 16)) : I("", !0)
3243
+ class: "vv-textarea__icon"
3244
+ }, t(B)), null, 16)) : w("", !0),
3245
+ Se(N("textarea", G({
3246
+ id: t(A),
3247
+ ref_key: "textarea",
3248
+ ref: l,
3249
+ "onUpdate:modelValue": R[0] || (R[0] = (Y) => Ce(I) ? I.value = Y : null)
3250
+ }, t(fe), {
3251
+ onKeyup: R[1] || (R[1] = (Y) => a("keyup", Y))
3252
+ }), null, 16, al), [
3253
+ [ct, t(I)]
3254
+ ]),
3255
+ t(O) ? (d(), W(Q, G({
3256
+ key: 1,
3257
+ class: "vv-textarea__icon vv-textarea__icon-after"
3258
+ }, t(B)), null, 16)) : w("", !0)
2192
3259
  ]),
2193
- t(u) ? (m(), _("span", _s, [
2194
- k(W.$slots, "count", F(Y(t(se))), () => [
2195
- q(B(t(H)), 1)
3260
+ z.$slots.after ? (d(), y("div", ll, [
3261
+ $(z.$slots, "after", j(F(t(se))))
3262
+ ])) : w("", !0),
3263
+ t(n) ? (d(), y("span", sl, [
3264
+ $(z.$slots, "count", j(F(t(se))), () => [
3265
+ X(x(t(ee)), 1)
2196
3266
  ])
2197
- ])) : I("", !0)
3267
+ ])) : w("", !0)
2198
3268
  ]),
2199
- Z(t(ee), {
2200
- id: t(g),
3269
+ de(t(re), {
3270
+ id: t(b),
2201
3271
  class: "vv-textarea__hint"
2202
3272
  }, null, 8, ["id"])
2203
3273
  ], 2));
2204
3274
  }
2205
3275
  });
2206
3276
  export {
2207
- As as VolverPlugin,
2208
- Pt as VvAccordion,
2209
- Ps as VvAccordionGroup,
2210
- ws as VvBadge,
2211
- Is as VvBreadcrumb,
2212
- Es as VvButton,
2213
- Rs as VvButtonGroup,
2214
- Os as VvCard,
2215
- io as VvCheckbox,
2216
- Bs as VvCheckboxGroup,
2217
- Ds as VvCombobox,
2218
- Ts as VvDialog,
2219
- Vo as VvDropdown,
2220
- x as VvIcon,
2221
- Ls as VvInputText,
2222
- Ms as VvProgress,
2223
- rs as VvRadio,
2224
- Ns as VvRadioGroup,
2225
- Ro as VvSelect,
2226
- Hs as VvTextarea
3277
+ pl as VolverPlugin,
3278
+ lo as VvAccordion,
3279
+ fl as VvAccordionGroup,
3280
+ co as VvBadge,
3281
+ ml as VvBreadcrumb,
3282
+ bl as VvButton,
3283
+ hl as VvButtonGroup,
3284
+ yl as VvCard,
3285
+ Lo as VvCheckbox,
3286
+ gl as VvCheckboxGroup,
3287
+ _l as VvCombobox,
3288
+ Sl as VvDialog,
3289
+ kt as VvDropdown,
3290
+ Q as VvIcon,
3291
+ Vl as VvInputText,
3292
+ $l as VvProgress,
3293
+ Wa as VvRadio,
3294
+ kl as VvRadioGroup,
3295
+ ia as VvSelect,
3296
+ Cl as VvTextarea
2227
3297
  };