@volverjs/ui-vue 0.0.1-beta.12 → 0.0.1-beta.17

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 (432) hide show
  1. package/README.md +1 -1
  2. package/bin/icons.cjs +73 -0
  3. package/bin/icons.js +75 -0
  4. package/dist/Volver.d.ts +15 -2
  5. package/dist/components/VvAccordion/VvAccordion.es.js +133 -236
  6. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
  8. package/dist/components/VvAccordion/index.d.ts +46 -0
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +199 -277
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +44 -151
  12. package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +9 -13
  13. package/dist/components/VvBadge/VvBadge.es.js +42 -151
  14. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  15. package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -53
  16. package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +0 -0
  17. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +55 -168
  18. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  19. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +24 -104
  20. package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +1 -1
  21. package/dist/components/VvButton/VvButton.es.js +298 -312
  22. package/dist/components/VvButton/VvButton.umd.js +1 -1
  23. package/dist/components/VvButton/VvButton.vue.d.ts +91 -163
  24. package/dist/components/VvButton/{VvButton.d.ts → index.d.ts} +46 -9
  25. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +59 -172
  26. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  27. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +30 -125
  28. package/dist/components/VvButtonGroup/{VvButtonGroup.d.ts → index.d.ts} +0 -0
  29. package/dist/components/VvCard/VvCard.es.js +55 -166
  30. package/dist/components/VvCard/VvCard.umd.js +1 -1
  31. package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
  32. package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
  33. package/dist/components/VvCheckbox/VvCheckbox.es.js +344 -0
  34. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
  35. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +87 -0
  36. package/dist/components/VvCheckbox/index.d.ts +86 -0
  37. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +415 -0
  38. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
  39. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +113 -0
  40. package/dist/components/{VvCheckGroup/VvCheckGroup.d.ts → VvCheckboxGroup/index.d.ts} +10 -10
  41. package/dist/components/VvDialog/VvDialog.es.js +108 -230
  42. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  43. package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
  44. package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
  45. package/dist/components/VvDropdown/VvDropdown.es.js +167 -186
  46. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  47. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +34 -136
  48. package/dist/components/VvDropdown/{VvDropdown.d.ts → index.d.ts} +7 -3
  49. package/dist/components/VvIcon/VvIcon.es.js +62 -174
  50. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  51. package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
  52. package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
  53. package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
  54. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
  55. package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
  56. package/dist/components/VvInputText/VvInputText.es.js +586 -577
  57. package/dist/components/VvInputText/VvInputText.umd.js +1 -2
  58. package/dist/components/VvInputText/VvInputText.vue.d.ts +187 -275
  59. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  60. package/dist/components/VvInputText/index.d.ts +175 -0
  61. package/dist/components/VvNativeSelect/VvNativeSelect.es.js +299 -347
  62. package/dist/components/VvNativeSelect/VvNativeSelect.umd.js +1 -2
  63. package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +78 -190
  64. package/dist/components/VvNativeSelect/{VvNativeSelect.d.ts → index.d.ts} +35 -8
  65. package/dist/components/VvProgress/VvProgress.es.js +45 -162
  66. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  67. package/dist/components/VvProgress/VvProgress.vue.d.ts +17 -103
  68. package/dist/components/VvProgress/{VvProgress.d.ts → index.d.ts} +1 -7
  69. package/dist/components/VvRadio/VvRadio.es.js +292 -267
  70. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  71. package/dist/components/VvRadio/VvRadio.vue.d.ts +52 -122
  72. package/dist/components/VvRadio/index.d.ts +64 -0
  73. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +342 -380
  74. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -2
  75. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +58 -213
  76. package/dist/components/VvRadioGroup/{VvRadioGroup.d.ts → index.d.ts} +2 -2
  77. package/dist/components/VvSelect/VvSelect.es.js +556 -510
  78. package/dist/components/VvSelect/VvSelect.umd.js +1 -2
  79. package/dist/components/VvSelect/VvSelect.vue.d.ts +75 -240
  80. package/dist/components/VvSelect/{VvSelect.d.ts → index.d.ts} +12 -5
  81. package/dist/components/VvTextarea/VvTextarea.es.js +372 -481
  82. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -2
  83. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +103 -299
  84. package/dist/components/VvTextarea/{VvTextarea.d.ts → index.d.ts} +36 -13
  85. package/dist/components/common/HintSlot.d.ts +10 -4
  86. package/dist/components/index.d.ts +13 -6
  87. package/dist/components/index.es.js +2070 -895
  88. package/dist/components/index.umd.js +1 -2
  89. package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -2
  90. package/dist/composables/focus/useComponentFocus.d.ts +3 -3
  91. package/dist/composables/group/types/IAccordionGroupState.d.ts +1 -3
  92. package/dist/composables/group/types/IGroupState.d.ts +2 -2
  93. package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
  94. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  95. package/dist/composables/icons/useComponentIcons.d.ts +2 -2
  96. package/dist/composables/textLimit/useTextLimit.d.ts +0 -3
  97. package/dist/constants.d.ts +4 -4
  98. package/dist/icons.d.ts +1881 -0
  99. package/dist/icons.es.js +4 -6
  100. package/dist/icons.umd.js +1 -1
  101. package/dist/index.es.js +2113 -932
  102. package/dist/index.umd.js +1 -2
  103. package/dist/props/index.d.ts +9 -3
  104. package/dist/resolvers/unplugin.d.ts +27 -0
  105. package/dist/resolvers/unplugin.es.js +40 -0
  106. package/dist/resolvers/unplugin.umd.js +1 -0
  107. package/dist/stories/Accordion/Accordion.test.d.ts +4 -0
  108. package/dist/stories/Badge/Badge.test.d.ts +2 -0
  109. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
  110. package/dist/stories/Button/Button.test.d.ts +3 -8
  111. package/dist/stories/Card/Card.test.d.ts +3 -0
  112. package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
  113. package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
  114. package/dist/stories/Icon/IconList.vue.d.ts +1 -43
  115. package/dist/stories/InputText/InputText.test.d.ts +6 -0
  116. package/dist/stories/Radio/Radio.test.d.ts +3 -0
  117. package/dist/stories/RadioGroup/RadioGroup.test.d.ts +8 -0
  118. package/dist/stories/Select/Select.test.d.ts +3 -0
  119. package/dist/stories/Textarea/Textarea.test.d.ts +8 -0
  120. package/dist/stories/utils.d.ts +1 -3
  121. package/dist/test/sleep.d.ts +1 -0
  122. package/dist/utils/ObjectUtilities.d.ts +82 -95
  123. package/env.d.ts +1 -0
  124. package/package.json +103 -68
  125. package/src/Volver.ts +32 -3
  126. package/src/assets/icons/detailed.json +1 -1
  127. package/src/assets/icons/normal.json +1 -1
  128. package/src/assets/icons/simple.json +1 -1
  129. package/src/components/VvAccordion/VvAccordion.vue +80 -76
  130. package/src/components/VvAccordion/index.ts +69 -0
  131. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +77 -41
  132. package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +8 -12
  133. package/src/components/VvBadge/VvBadge.vue +14 -10
  134. package/src/components/VvBadge/{VvBadge.ts → index.ts} +0 -0
  135. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +18 -19
  136. package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -1
  137. package/src/components/VvButton/VvButton.vue +123 -113
  138. package/src/components/VvButton/index.ts +147 -0
  139. package/src/components/VvButtonGroup/VvButtonGroup.vue +21 -17
  140. package/src/components/VvButtonGroup/{VvButtonGroup.ts → index.ts} +0 -0
  141. package/src/components/VvCard/VvCard.vue +20 -22
  142. package/src/components/VvCard/{VvCard.ts → index.ts} +0 -0
  143. package/src/components/VvCheckbox/VvCheckbox.vue +124 -0
  144. package/src/components/VvCheckbox/index.ts +94 -0
  145. package/src/components/{VvCheckGroup/VvCheckGroup.vue → VvCheckboxGroup/VvCheckboxGroup.vue} +49 -54
  146. package/src/components/{VvCheckGroup/VvCheckGroup.ts → VvCheckboxGroup/index.ts} +9 -9
  147. package/src/components/VvDialog/VvDialog.vue +47 -50
  148. package/src/components/VvDialog/index.ts +10 -0
  149. package/src/components/VvDropdown/VvDropdown.vue +61 -40
  150. package/src/components/VvDropdown/{VvDropdown.ts → index.ts} +8 -4
  151. package/src/components/VvIcon/VvIcon.vue +31 -25
  152. package/src/components/VvIcon/{VvIcon.ts → index.ts} +9 -0
  153. package/src/components/VvInputText/VvInputClearAction.ts +53 -0
  154. package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
  155. package/src/components/VvInputText/VvInputStepAction.ts +49 -0
  156. package/src/components/VvInputText/VvInputText.vue +168 -170
  157. package/src/components/VvInputText/VvInputTextActions.ts +54 -108
  158. package/src/components/VvInputText/index.ts +135 -0
  159. package/src/components/VvNativeSelect/VvNativeSelect.vue +130 -68
  160. package/src/components/VvNativeSelect/{VvNativeSelect.ts → index.ts} +26 -7
  161. package/src/components/VvProgress/VvProgress.vue +25 -26
  162. package/src/components/VvProgress/{VvProgress.ts → index.ts} +4 -7
  163. package/src/components/VvRadio/VvRadio.vue +81 -108
  164. package/src/components/VvRadio/index.ts +78 -0
  165. package/src/components/VvRadioGroup/VvRadioGroup.vue +45 -45
  166. package/src/components/VvRadioGroup/{VvRadioGroup.ts → index.ts} +1 -1
  167. package/src/components/VvSelect/VvSelect.vue +90 -69
  168. package/src/components/VvSelect/{VvSelect.ts → index.ts} +12 -5
  169. package/src/components/VvTextarea/VvTextarea.vue +121 -128
  170. package/src/components/VvTextarea/{VvTextarea.ts → index.ts} +31 -11
  171. package/src/components/common/HintSlot.ts +157 -136
  172. package/src/components/index.ts +13 -6
  173. package/src/composables/debouncedInput/useDebouncedInput.ts +21 -15
  174. package/src/composables/focus/useComponentFocus.ts +6 -8
  175. package/src/composables/group/types/IAccordionGroupState.ts +1 -3
  176. package/src/composables/group/types/IGroupState.ts +2 -2
  177. package/src/composables/group/useInjectedGroupState.ts +20 -30
  178. package/src/composables/group/useProvideGroupState.ts +1 -2
  179. package/src/composables/icons/useComponentIcons.ts +2 -3
  180. package/src/composables/options/useOptions.ts +3 -0
  181. package/src/composables/textLimit/useTextLimit.ts +1 -4
  182. package/src/composables/useModifiers.ts +13 -15
  183. package/src/constants.ts +5 -7
  184. package/src/directives/{.README → .gitkeep} +0 -0
  185. package/src/icons.ts +7 -0
  186. package/src/index.ts +0 -1
  187. package/src/props/index.ts +7 -1
  188. package/src/resolvers/unplugin.ts +103 -0
  189. package/src/shims.d.ts +11 -0
  190. package/src/stories/Accordion/Accordion.stories.mdx +10 -9
  191. package/src/stories/Accordion/Accordion.test.ts +37 -0
  192. package/src/stories/Accordion/AccordionSlots.stories.mdx +40 -25
  193. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +10 -16
  194. package/src/stories/AccordionGroup/{accordionGroupTest.js → AccordionGroup.test.js} +15 -17
  195. package/src/stories/AccordionGroup/AccordionGroupCollapse.stories.mdx +38 -0
  196. package/src/stories/AccordionGroup/{AccordionItems.stories.mdx → AccordionGroupItems.stories.mdx} +7 -13
  197. package/src/stories/Badge/Badge.stories.mdx +8 -8
  198. package/src/stories/Badge/Badge.test.ts +16 -0
  199. package/src/stories/Badge/BadgeColor.stories.mdx +6 -7
  200. package/src/stories/Badge/BadgeDot.stories.mdx +4 -3
  201. package/src/stories/Badge/BadgeModifiers.stories.mdx +7 -6
  202. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +15 -7
  203. package/src/stories/Breadcrumb/Breadcrumb.test.ts +49 -0
  204. package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +15 -7
  205. package/src/stories/Button/Button.stories.mdx +16 -17
  206. package/src/stories/Button/Button.test.ts +8 -12
  207. package/src/stories/Button/ButtonActive.stories.mdx +2 -1
  208. package/src/stories/Button/ButtonBadge.stories.mdx +2 -2
  209. package/src/stories/Button/ButtonDisabled.stories.mdx +1 -1
  210. package/src/stories/Button/ButtonIcon.stories.mdx +6 -3
  211. package/src/stories/Button/ButtonIconPosition.stories.mdx +1 -1
  212. package/src/stories/Button/ButtonLink.stories.mdx +1 -19
  213. package/src/stories/Button/ButtonLoading.stories.mdx +4 -4
  214. package/src/stories/Button/ButtonModifiers.stories.mdx +1 -1
  215. package/src/stories/Button/ButtonPressed.stories.mdx +31 -0
  216. package/src/stories/Button/ButtonSlots.stories.mdx +1 -1
  217. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +5 -6
  218. package/src/stories/ButtonGroup/{ButtonGroupTest.js → ButtonGroup.test.js} +6 -28
  219. package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +5 -6
  220. package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +3 -4
  221. package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +3 -4
  222. package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +3 -4
  223. package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +3 -4
  224. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +11 -12
  225. package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +3 -4
  226. package/src/stories/Card/Card.stories.mdx +7 -5
  227. package/src/stories/Card/Card.test.ts +26 -0
  228. package/src/stories/Card/CardSlots.stories.mdx +5 -5
  229. package/src/stories/Card/CardVariant.stories.mdx +5 -4
  230. package/src/stories/Checkbox/Checkbox.stories.mdx +51 -0
  231. package/src/stories/Checkbox/Checkbox.test.js +115 -0
  232. package/src/stories/Checkbox/CheckboxBinary.stories.mdx +76 -0
  233. package/src/stories/{Check/CheckDisabled.stories.mdx → Checkbox/CheckboxDisabled.stories.mdx} +7 -7
  234. package/src/stories/Checkbox/CheckboxError.stories.mdx +43 -0
  235. package/src/stories/Checkbox/CheckboxHintLabel.stories.mdx +35 -0
  236. package/src/stories/{Check/CheckReadonly.stories.mdx → Checkbox/CheckboxReadonly.stories.mdx} +6 -8
  237. package/src/stories/Checkbox/CheckboxSlots.stories.mdx +69 -0
  238. package/src/stories/{Check/CheckSwitch.stories.mdx → Checkbox/CheckboxSwitch.stories.mdx} +8 -8
  239. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +69 -0
  240. package/src/stories/CheckboxGroup/CheckboxGroupDisabled.stories.mdx +26 -0
  241. package/src/stories/CheckboxGroup/CheckboxGroupError.stories.mdx +28 -0
  242. package/src/stories/CheckboxGroup/CheckboxGroupHintLabel.stories.mdx +27 -0
  243. package/src/stories/CheckboxGroup/CheckboxGroupLabel.stories.mdx +26 -0
  244. package/src/stories/{CheckGroup/CheckGroupOptionLabel.stories.mdx → CheckboxGroup/CheckboxGroupOptionLabel.stories.mdx} +14 -11
  245. package/src/stories/{CheckGroup/CheckGroupOptionValue.stories.mdx → CheckboxGroup/CheckboxGroupOptionValue.stories.mdx} +13 -10
  246. package/src/stories/{CheckGroup/CheckGroupOptions.stories.mdx → CheckboxGroup/CheckboxGroupOptions.stories.mdx} +8 -8
  247. package/src/stories/CheckboxGroup/CheckboxGroupReadonly.stories.mdx +26 -0
  248. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +152 -0
  249. package/src/stories/CheckboxGroup/CheckboxGroupValid.stories.mdx +28 -0
  250. package/src/stories/CheckboxGroup/CheckboxGroupVertical.stories.mdx +26 -0
  251. package/src/stories/Dialog/Dialog.stories.mdx +5 -5
  252. package/src/stories/Dialog/Dialog.test.ts +26 -0
  253. package/src/stories/Dialog/DialogAutoClose.stories.mdx +1 -1
  254. package/src/stories/Dialog/DialogSize.stories.mdx +1 -1
  255. package/src/stories/Dropdown/Dropdown.stories.mdx +11 -7
  256. package/src/stories/Dropdown/Dropdown.test.ts +80 -0
  257. package/src/stories/Dropdown/DropdownDisabled.stories.mdx +9 -2
  258. package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +2 -2
  259. package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +4 -2
  260. package/src/stories/Dropdown/DropdownMultiple.stories.mdx +4 -2
  261. package/src/stories/Dropdown/DropdownOptions.stories.mdx +4 -4
  262. package/src/stories/Dropdown/DropdownUseObject.stories.mdx +4 -2
  263. package/src/stories/Icon/Icon.stories.mdx +8 -8
  264. package/src/stories/Icon/{IconTest.js → Icon.test.js} +2 -5
  265. package/src/stories/Icon/IconList.vue +5 -6
  266. package/src/stories/Icon/IconPrefix.stories.mdx +2 -2
  267. package/src/stories/Icon/IconRemote.stories.mdx +2 -2
  268. package/src/stories/Icon/IconsList.stories.mdx +2 -18
  269. package/src/stories/InputText/InputText.stories.mdx +25 -19
  270. package/src/stories/InputText/InputText.test.ts +156 -0
  271. package/src/stories/InputText/InputTextAutocomplete.stories.mdx +9 -2
  272. package/src/stories/InputText/InputTextAutofocus.stories.mdx +6 -3
  273. package/src/stories/InputText/InputTextDisabled.stories.mdx +10 -2
  274. package/src/stories/InputText/InputTextError.stories.mdx +10 -2
  275. package/src/stories/InputText/InputTextFloating.stories.mdx +10 -3
  276. package/src/stories/InputText/InputTextHintLabel.stories.mdx +10 -2
  277. package/src/stories/InputText/InputTextIcon.stories.mdx +6 -2
  278. package/src/stories/InputText/InputTextIconPosition.stories.mdx +10 -3
  279. package/src/stories/InputText/InputTextLabel.stories.mdx +8 -2
  280. package/src/stories/InputText/InputTextLoading.stories.mdx +10 -2
  281. package/src/stories/InputText/InputTextMax.stories.mdx +10 -3
  282. package/src/stories/InputText/InputTextMaxLength.stories.mdx +22 -5
  283. package/src/stories/InputText/InputTextMin.stories.mdx +10 -3
  284. package/src/stories/InputText/InputTextMinLength.stories.mdx +9 -2
  285. package/src/stories/InputText/InputTextPlaceholder.stories.mdx +8 -2
  286. package/src/stories/InputText/InputTextReadonly.stories.mdx +6 -2
  287. package/src/stories/InputText/InputTextSlots.stories.mdx +4 -5
  288. package/src/stories/InputText/InputTextStep.stories.mdx +9 -3
  289. package/src/stories/InputText/InputTextType.stories.mdx +110 -13
  290. package/src/stories/InputText/InputTextValid.stories.mdx +10 -2
  291. package/src/stories/NativeSelect/NativeSelect.stories.mdx +15 -11
  292. package/src/stories/NativeSelect/NativeSelect.test.js +151 -0
  293. package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +6 -7
  294. package/src/stories/NativeSelect/NativeSelectError.stories.mdx +7 -3
  295. package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +7 -3
  296. package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +14 -12
  297. package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +7 -3
  298. package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +44 -38
  299. package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +19 -11
  300. package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +26 -30
  301. package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +7 -3
  302. package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +30 -30
  303. package/src/stories/Progress/Progress.stories.mdx +8 -11
  304. package/src/stories/Progress/{ProgressTest.js → Progress.test.js} +4 -10
  305. package/src/stories/Progress/ProgressDeterminate.stories.mdx +3 -6
  306. package/src/stories/Radio/Radio.stories.mdx +11 -17
  307. package/src/stories/Radio/Radio.test.ts +52 -0
  308. package/src/stories/Radio/RadioDisabled.stories.mdx +4 -7
  309. package/src/stories/Radio/RadioError.stories.mdx +8 -28
  310. package/src/stories/Radio/RadioHintLabel.stories.mdx +6 -7
  311. package/src/stories/Radio/RadioSlots.stories.mdx +21 -7
  312. package/src/stories/RadioGroup/RadioGroup.stories.mdx +20 -27
  313. package/src/stories/RadioGroup/RadioGroup.test.ts +139 -0
  314. package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +6 -8
  315. package/src/stories/RadioGroup/RadioGroupError.stories.mdx +9 -11
  316. package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +8 -10
  317. package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +6 -8
  318. package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +11 -13
  319. package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +9 -11
  320. package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +7 -9
  321. package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +6 -8
  322. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +39 -62
  323. package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +9 -11
  324. package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +6 -8
  325. package/src/stories/Select/Select.stories.mdx +32 -29
  326. package/src/stories/Select/Select.test.ts +104 -0
  327. package/src/stories/Select/SelectDisabled.stories.mdx +3 -3
  328. package/src/stories/Select/SelectMaxValues.stories.mdx +3 -3
  329. package/src/stories/Select/SelectMultiple.stories.mdx +5 -6
  330. package/src/stories/Select/SelectNative.stories.mdx +6 -8
  331. package/src/stories/Select/SelectOptions.stories.mdx +4 -4
  332. package/src/stories/Select/SelectSearchable.stories.mdx +13 -12
  333. package/src/stories/Select/SelectSeparator.stories.mdx +3 -3
  334. package/src/stories/Select/SelectUseObject.stories.mdx +3 -3
  335. package/src/stories/Textarea/Textarea.stories.mdx +6 -10
  336. package/src/stories/Textarea/Textarea.test.ts +204 -0
  337. package/src/stories/Textarea/TextareaAutoclear.stories.mdx +3 -2
  338. package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +3 -2
  339. package/src/stories/Textarea/TextareaAutofocus.stories.mdx +3 -2
  340. package/src/stories/Textarea/TextareaDebounce.stories.mdx +7 -6
  341. package/src/stories/Textarea/TextareaDisabled.stories.mdx +9 -3
  342. package/src/stories/Textarea/TextareaError.stories.mdx +7 -2
  343. package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +12 -2
  344. package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
  345. package/src/stories/Textarea/TextareaHintLabel.stories.mdx +7 -2
  346. package/src/stories/Textarea/TextareaIcon.stories.mdx +3 -2
  347. package/src/stories/Textarea/TextareaIconPosition.stories.mdx +4 -2
  348. package/src/stories/Textarea/TextareaId.stories.mdx +3 -2
  349. package/src/stories/Textarea/TextareaLabel.stories.mdx +3 -2
  350. package/src/stories/Textarea/TextareaLimit.stories.mdx +5 -2
  351. package/src/stories/Textarea/TextareaLoading.stories.mdx +7 -2
  352. package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +9 -3
  353. package/src/stories/Textarea/TextareaMaxLength.stories.mdx +5 -4
  354. package/src/stories/Textarea/TextareaMinLength.stories.mdx +3 -2
  355. package/src/stories/Textarea/TextareaModifiers.stories.mdx +10 -2
  356. package/src/stories/Textarea/TextareaName.stories.mdx +3 -2
  357. package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +4 -3
  358. package/src/stories/Textarea/TextareaReadonly.stories.mdx +8 -3
  359. package/src/stories/Textarea/TextareaRequired.stories.mdx +3 -2
  360. package/src/stories/Textarea/TextareaResizable.stories.mdx +7 -2
  361. package/src/stories/Textarea/TextareaRowsCols.stories.mdx +4 -2
  362. package/src/stories/Textarea/TextareaSlots.stories.mdx +7 -8
  363. package/src/stories/Textarea/TextareaValid.stories.mdx +7 -1
  364. package/src/stories/Textarea/TextareaValidLabel.stories.mdx +14 -4
  365. package/src/stories/utils.ts +1 -1
  366. package/src/stories/volver-ui-vue.stories.mdx +1 -1
  367. package/src/test/expect.ts +3 -1
  368. package/src/test/sleep.ts +2 -0
  369. package/src/test/types.d.ts +14 -1
  370. package/src/types/{.README → .gitkeep} +0 -0
  371. package/src/utils/ObjectUtilities.ts +247 -241
  372. package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
  373. package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
  374. package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -18
  375. package/dist/components/VvCheck/VvCheck.d.ts +0 -47
  376. package/dist/components/VvCheck/VvCheck.es.js +0 -318
  377. package/dist/components/VvCheck/VvCheck.umd.js +0 -1
  378. package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
  379. package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
  380. package/dist/components/VvCheckGroup/VvCheckGroup.es.js +0 -451
  381. package/dist/components/VvCheckGroup/VvCheckGroup.umd.js +0 -2
  382. package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
  383. package/dist/components/VvDialog/constants.d.ts +0 -5
  384. package/dist/components/VvInputText/VvInputText.d.ts +0 -73
  385. package/dist/components/VvInputText/constants.d.ts +0 -55
  386. package/dist/components/VvRadio/VvRadio.d.ts +0 -22
  387. package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
  388. package/dist/components/VvTextarea/constants.d.ts +0 -19
  389. package/dist/stories/RadioGroup/RadioOption.test.d.ts +0 -4
  390. package/dist/stories/RadioGroup/RadioProperty.test.d.ts +0 -12
  391. package/dist/stories/RadioGroup/RadioSlots.test.d.ts +0 -6
  392. package/src/assets/icons/index.js +0 -7
  393. package/src/components/VvAccordion/VvAccordion.ts +0 -34
  394. package/src/components/VvAccordion/useAccordionProps.ts +0 -45
  395. package/src/components/VvButton/VvButton.ts +0 -87
  396. package/src/components/VvButton/useButtonGroupProps.ts +0 -43
  397. package/src/components/VvCheck/VvCheck.ts +0 -48
  398. package/src/components/VvCheck/VvCheck.vue +0 -147
  399. package/src/components/VvCheck/useCheckProps.ts +0 -41
  400. package/src/components/VvDialog/VvDialog.ts +0 -17
  401. package/src/components/VvDialog/constants.ts +0 -5
  402. package/src/components/VvInputText/VvInputText.ts +0 -66
  403. package/src/components/VvInputText/constants.ts +0 -34
  404. package/src/components/VvRadio/VvRadio.ts +0 -25
  405. package/src/components/VvRadio/useRadioProps.ts +0 -40
  406. package/src/components/VvTextarea/constants.ts +0 -14
  407. package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
  408. package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
  409. package/src/stories/Accordion/accordionTest.js +0 -36
  410. package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
  411. package/src/stories/Badge/BadgeTest.js +0 -21
  412. package/src/stories/Button/ButtonSelected.stories.mdx +0 -30
  413. package/src/stories/Check/Check.stories.mdx +0 -62
  414. package/src/stories/Check/CheckBinary.stories.mdx +0 -75
  415. package/src/stories/Check/CheckError.stories.mdx +0 -64
  416. package/src/stories/Check/CheckErrorTests.js +0 -74
  417. package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
  418. package/src/stories/Check/CheckPropertyTest.js +0 -102
  419. package/src/stories/Check/CheckSlots.stories.mdx +0 -51
  420. package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
  421. package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
  422. package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
  423. package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
  424. package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
  425. package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
  426. package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
  427. package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
  428. package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
  429. package/src/stories/RadioGroup/RadioOption.test.ts +0 -45
  430. package/src/stories/RadioGroup/RadioProperty.test.ts +0 -87
  431. package/src/stories/RadioGroup/RadioSlots.test.ts +0 -29
  432. package/src/stories/stories.scss +0 -13
package/dist/index.es.js CHANGED
@@ -1,205 +1,478 @@
1
- var be = Object.defineProperty;
2
- var _e = (e, n, t) => n in e ? be(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var K = (e, n, t) => (_e(e, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { addCollection as Ve, addIcon as ae, iconExists as Y, Icon as Ce } from "@iconify/vue";
5
- import { computed as y, unref as p, defineComponent as P, ref as H, toRefs as S, inject as le, openBlock as g, createBlock as D, mergeProps as E, createCommentVNode as O, toRef as ke, useAttrs as W, useSlots as ie, resolveDynamicComponent as ue, withCtx as ee, renderSlot as C, createElementBlock as _, toDisplayString as B, Fragment as U, createTextVNode as j, normalizeClass as N, isRef as $e, provide as Se, createElementVNode as $, renderList as J, watch as Ae, h as Oe, createVNode as ce, Transition as Be, toHandlers as we, withDirectives as Pe, withModifiers as Ge, vShow as Ee } from "vue";
6
- import { v4 as te } from "uuid";
7
- import { useVModel as X, useFocus as Ie, toReactive as Re, onClickOutside as De } from "@vueuse/core";
8
- const ne = "ds";
9
- class je {
1
+ var At = Object.defineProperty;
2
+ var Pt = (o, t, e) => t in o ? At(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var ye = (o, t, e) => (Pt(o, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { addCollection as wt, addIcon as We, addAPIProvider as Ot, iconExists as $e, Icon as It } from "@iconify/vue";
5
+ import { unref as a, computed as i, inject as xe, toRef as Et, toRefs as x, defineComponent as B, useAttrs as ze, ref as H, openBlock as m, createElementBlock as _, normalizeClass as U, withModifiers as Xe, createElementVNode as O, renderSlot as C, normalizeProps as te, guardReactiveProps as he, createTextVNode as K, toDisplayString as E, isRef as be, provide as Tt, watchEffect as Ze, Fragment as re, renderList as ge, createBlock as G, mergeProps as D, withCtx as _e, resolveDynamicComponent as Je, createCommentVNode as w, useSlots as oe, h as W, withDirectives as ne, vModelCheckbox as Bt, createVNode as q, Transition as Rt, toHandlers as Dt, vShow as Qe, watch as et, onMounted as tt, vModelDynamic as Nt, vModelSelect as Lt, vModelRadio as xt, withKeys as Me, vModelText as ot } from "vue";
6
+ import { useToggle as Ht, useVModel as Ae, toReactive as Gt, onClickOutside as at, useFocus as nt, isString as Ue, refDebounced as jt } from "@vueuse/core";
7
+ import { nanoid as ve } from "nanoid";
8
+ const Pe = "ds";
9
+ class Mt {
10
10
  constructor({
11
- fetchWithCredentials: n = !1,
12
- fetchOptions: t = {},
13
- iconsCollections: r = []
11
+ fetchWithCredentials: t = !1,
12
+ fetchOptions: e = {},
13
+ iconsCollections: n = [],
14
+ nuxt: l = !1
14
15
  } = {}) {
15
- K(this, "fetchOptions");
16
- K(this, "iconsCollections");
17
- K(this, "provider");
18
- n && (t = { ...t, credentials: "include" }), this.provider = ne, this.fetchOptions = t, this.iconsCollections = r, this.iconsCollections.forEach((o) => {
19
- this.addCollection(o, this.provider);
16
+ ye(this, "fetchOptions");
17
+ ye(this, "iconsCollections");
18
+ ye(this, "provider");
19
+ ye(this, "nuxt");
20
+ t && (e = { ...e, credentials: "include" }), this.provider = Pe, this.fetchOptions = e, this.iconsCollections = n, this.iconsCollections.forEach((s) => {
21
+ this.addCollection(s, this.provider);
22
+ }), this.nuxt = l;
23
+ }
24
+ addCollection(t, e) {
25
+ return wt(t, e);
26
+ }
27
+ addIcon(t, e) {
28
+ return We(t, e);
29
+ }
30
+ addAPIProvider(t, e) {
31
+ return Ot(t, e);
32
+ }
33
+ fetchIcon(t, e = { cache: "force-cache" }) {
34
+ return new Promise((n, l) => {
35
+ fetch(t, { ...this.fetchOptions, ...e }).catch((s) => l(s)).then((s) => s == null ? void 0 : s.text()).then((s) => n(s));
20
36
  });
21
37
  }
22
- addCollection(n, t) {
23
- return Ve(n, t);
38
+ }
39
+ const Fa = {
40
+ install(o, t) {
41
+ const e = new Mt(t);
42
+ o.config.globalProperties.$ds = e, o.provide(Pe, e);
43
+ }
44
+ };
45
+ function le(o, t, e) {
46
+ return e ? ke(o, e) === ke(t, e) : Ne(o, t);
47
+ }
48
+ function Ne(o, t) {
49
+ if (o === t)
50
+ return !0;
51
+ if (o && t && typeof o == "object" && typeof t == "object") {
52
+ const e = Array.isArray(o), n = Array.isArray(t);
53
+ let l, s, r;
54
+ if (e && n) {
55
+ if (s = o.length, s != t.length)
56
+ return !1;
57
+ for (l = s; l-- !== 0; )
58
+ if (!Ne(o[l], t[l]))
59
+ return !1;
60
+ return !0;
61
+ }
62
+ if (e != n)
63
+ return !1;
64
+ const f = o instanceof Date, v = t instanceof Date;
65
+ if (f != v)
66
+ return !1;
67
+ if (f && v)
68
+ return o.getTime() == t.getTime();
69
+ const p = o instanceof RegExp, u = t instanceof RegExp;
70
+ if (p != u)
71
+ return !1;
72
+ if (p && u)
73
+ return o.toString() == t.toString();
74
+ const d = Object.keys(o);
75
+ if (s = d.length, s !== Object.keys(t).length)
76
+ return !1;
77
+ for (l = s; l-- !== 0; )
78
+ if (!Object.prototype.hasOwnProperty.call(t, d[l]))
79
+ return !1;
80
+ for (l = s; l-- !== 0; )
81
+ if (r = d[l], !Ne(o[r], t[r]))
82
+ return !1;
83
+ return !0;
84
+ }
85
+ return o !== o && t !== t;
86
+ }
87
+ function ke(o, t) {
88
+ if (o && Object.keys(o).length && t) {
89
+ if (t.indexOf(".") === -1)
90
+ return o[t];
91
+ {
92
+ const e = t.split(".");
93
+ let n = o;
94
+ for (let l = 0, s = e.length; l < s; ++l) {
95
+ if (o == null)
96
+ return null;
97
+ n = n[e[l]];
98
+ }
99
+ return n;
100
+ }
101
+ } else
102
+ return null;
103
+ }
104
+ function Ut(o, t) {
105
+ let e = -1;
106
+ if (t) {
107
+ for (let n = 0; n < t.length; n++)
108
+ if (le(t[n], o)) {
109
+ e = n;
110
+ break;
111
+ }
24
112
  }
25
- addIcon(n, t) {
26
- return ae(n, t);
113
+ return e;
114
+ }
115
+ function ce(o, t) {
116
+ if (o != null && t && t.length) {
117
+ for (const e of t)
118
+ if (le(o, e))
119
+ return !0;
27
120
  }
28
- fetchIcon(n, t) {
29
- return new Promise((r, o) => {
30
- fetch(n, { ...this.fetchOptions, ...t }).catch((a) => o(a)).then((a) => a == null ? void 0 : a.text()).then((a) => r(a));
121
+ return !1;
122
+ }
123
+ function z(o) {
124
+ return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(a(o));
125
+ }
126
+ function He(o, t) {
127
+ const e = Ut(o, t);
128
+ return e > -1 ? t.filter((n, l) => l !== e) : t;
129
+ }
130
+ function qt(o) {
131
+ return typeof o == "string" || o instanceof String;
132
+ }
133
+ function Kt(o, t, e) {
134
+ return o.filter((n) => t.some((l) => typeof l == "string" ? n[e] == l : le(n[e], l[e])));
135
+ }
136
+ function qe(o) {
137
+ var t, e;
138
+ if (o)
139
+ return (e = (t = o.match(
140
+ /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
141
+ )) == null ? void 0 : t.join("-")) == null ? void 0 : e.toLowerCase();
142
+ }
143
+ function L(o, t) {
144
+ const e = { [`${o}`]: !0 };
145
+ return {
146
+ bemCssClasses: i(() => Object.keys(t).reduce((l, s) => {
147
+ const r = a(t[s]) || !1;
148
+ if (!r)
149
+ return l;
150
+ if (s === "modifiers") {
151
+ const f = Array.isArray(r) ? r : r.split(" ");
152
+ return {
153
+ ...l,
154
+ ...f.reduce(
155
+ (v, p) => ({
156
+ ...v,
157
+ [`${o}--${qe(p)}`]: !0
158
+ }),
159
+ {}
160
+ )
161
+ };
162
+ } else
163
+ return {
164
+ ...l,
165
+ [`${o}--${qe(s)}`]: r
166
+ };
167
+ }, e) || {})
168
+ };
169
+ }
170
+ function we(o) {
171
+ const t = xe(o, void 0), e = i(() => !z(t));
172
+ function n(l, s, r) {
173
+ if (t != null && t.value) {
174
+ const v = a(t.value)[l];
175
+ return i({
176
+ get() {
177
+ return v == null ? void 0 : v.value;
178
+ },
179
+ set(p) {
180
+ v.value = p;
181
+ }
182
+ });
183
+ }
184
+ const f = Et(s, l);
185
+ return i({
186
+ get() {
187
+ return f.value;
188
+ },
189
+ set(v) {
190
+ r && r(`update:${l}`, v);
191
+ }
31
192
  });
32
193
  }
194
+ return {
195
+ group: t,
196
+ isInGroup: e,
197
+ getGroupOrLocalRef: n
198
+ };
199
+ }
200
+ const lt = "VV_BUTTON_GROUP", rt = "VV_RADIO_GROUP", st = "VV_CHECK_GROUP", it = "VV_ACCORDION_GROUP", Yt = {
201
+ name: String,
202
+ title: String,
203
+ content: String,
204
+ modelValue: {
205
+ type: Boolean,
206
+ default: void 0
207
+ },
208
+ modifiers: [String, Array],
209
+ disabled: Boolean
210
+ }, Ft = ["update:modelValue"];
211
+ function Wt(o, t) {
212
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = we(it), { modifiers: s, title: r, content: f } = x(o), v = l("modelValue", o, t), p = l("disabled", o), u = l("collapse", o);
213
+ return {
214
+ modelValue: v,
215
+ disabled: p,
216
+ isInGroup: n,
217
+ group: e,
218
+ collapse: u,
219
+ modifiers: s,
220
+ title: r,
221
+ content: f
222
+ };
223
+ }
224
+ const zt = ["id", "open"], Xt = ["aria-controls", "aria-expanded"], Zt = ["aria-hidden"], Jt = {
225
+ name: "VvAccordion"
226
+ }, Qt = /* @__PURE__ */ B({
227
+ ...Jt,
228
+ props: Yt,
229
+ emits: Ft,
230
+ setup(o, { emit: t }) {
231
+ const e = o, n = ze(), l = e.name || (n == null ? void 0 : n.id) || ve(), { modifiers: s, title: r, content: f, disabled: v, collapse: p, modelValue: u, isInGroup: d } = Wt(e, t), c = H(!1), b = i({
232
+ get: () => d.value ? p.value && Array.isArray(u.value) ? u.value.includes(l) : u.value === l : u.value === void 0 ? c.value : u.value,
233
+ set: (h) => {
234
+ if (d.value) {
235
+ if (p.value && Array.isArray(u.value)) {
236
+ if (h) {
237
+ u.value.push(l);
238
+ return;
239
+ }
240
+ u.value = u.value.filter(
241
+ (k) => k !== l
242
+ );
243
+ return;
244
+ }
245
+ u.value = h ? l : null;
246
+ return;
247
+ }
248
+ if (u.value === void 0 && typeof h == "boolean") {
249
+ c.value = h;
250
+ return;
251
+ }
252
+ u.value = h;
253
+ }
254
+ }), { bemCssClasses: g } = L("vv-accordion", {
255
+ modifiers: s,
256
+ disabled: v
257
+ }), y = Ht(b);
258
+ return (h, k) => (m(), _("details", {
259
+ id: a(l),
260
+ class: U(a(g)),
261
+ open: a(b),
262
+ onClick: k[0] || (k[0] = Xe((P) => a(y)(), ["prevent"]))
263
+ }, [
264
+ O("summary", {
265
+ "aria-controls": a(l),
266
+ "aria-expanded": a(b),
267
+ class: "vv-collapse__summary"
268
+ }, [
269
+ C(h.$slots, "header", te(he({ open: a(b) })), () => [
270
+ K(E(a(r)), 1)
271
+ ])
272
+ ], 8, Xt),
273
+ O("div", {
274
+ "aria-hidden": !a(b),
275
+ class: "vv-collapse__content"
276
+ }, [
277
+ C(h.$slots, "details", te(he({ open: a(b) })), () => [
278
+ K(E(a(f)), 1)
279
+ ])
280
+ ], 8, Zt)
281
+ ], 10, zt));
282
+ }
283
+ });
284
+ function Oe(o) {
285
+ if (Object.keys(o).some(
286
+ (t) => t !== "key" && !be(o[t])
287
+ ))
288
+ throw Error("One or more groupState props aren't ref.");
289
+ Tt(
290
+ o.key,
291
+ i(() => o)
292
+ );
33
293
  }
34
- const jt = {
35
- install(e, n) {
36
- const t = new je(n);
37
- e.config.globalProperties.$ds = t, e.provide(ne, t);
294
+ const eo = {
295
+ modelValue: [String, Array],
296
+ items: { type: Array, default: () => [] },
297
+ collapse: Boolean,
298
+ modifiers: [String, Array],
299
+ disabled: Boolean
300
+ }, to = ["update:modelValue"], oo = {
301
+ name: "VvAccordionGroup"
302
+ }, Wa = /* @__PURE__ */ B({
303
+ ...oo,
304
+ props: eo,
305
+ emits: to,
306
+ setup(o, { emit: t }) {
307
+ const e = o, { disabled: n, collapse: l, modifiers: s, items: r } = x(e), f = i(
308
+ () => l.value && (e.modelValue === void 0 || Array.isArray(e.modelValue))
309
+ );
310
+ Ze(() => {
311
+ typeof e.modelValue == "string" && l.value && console.warn(
312
+ "[VvAccordionGroup]: modelValue is a string but collapse is true."
313
+ );
314
+ });
315
+ const v = H([]), p = i({
316
+ get: () => {
317
+ var c;
318
+ return e.modelValue !== void 0 ? f.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : f.value ? v.value : (c = v.value) == null ? void 0 : c[0];
319
+ },
320
+ set: (c) => {
321
+ if (e.modelValue !== void 0)
322
+ return t("update:modelValue", c);
323
+ v.value = Array.isArray(c) ? c : [c];
324
+ }
325
+ });
326
+ Oe({
327
+ key: it,
328
+ modelValue: p,
329
+ disabled: n,
330
+ collapse: f
331
+ });
332
+ const { bemCssClasses: d } = L("vv-accordion-group", {
333
+ modifiers: s,
334
+ disabled: n
335
+ });
336
+ return (c, b) => {
337
+ var g;
338
+ return m(), _("div", {
339
+ class: U(a(d))
340
+ }, [
341
+ ((g = e.items) == null ? void 0 : g.length) > 0 ? (m(!0), _(re, { key: 0 }, ge(a(r), (y) => (m(), G(Qt, D({
342
+ key: y.title
343
+ }, {
344
+ name: y.name,
345
+ title: y.title,
346
+ content: y.content,
347
+ disabled: y.disabled,
348
+ modifiers: a(s)
349
+ }), {
350
+ header: _e((h) => [
351
+ C(c.$slots, `header::${y.name}`, te(he(h)))
352
+ ]),
353
+ details: _e((h) => [
354
+ C(c.$slots, `details::${y.name}`, te(he(h)))
355
+ ]),
356
+ _: 2
357
+ }, 1040))), 128)) : C(c.$slots, "default", { key: 1 })
358
+ ], 2);
359
+ };
38
360
  }
39
- }, de = {
361
+ }), se = {
40
362
  valid: Boolean,
41
363
  validLabel: [String, Array]
42
- }, ve = {
364
+ }, ie = {
43
365
  error: Boolean,
44
366
  errorLabel: [String, Array]
45
- }, oe = {
367
+ }, Ie = {
368
+ loading: Boolean,
369
+ loadingLabel: String
370
+ }, Se = {
46
371
  disabled: Boolean
47
- }, z = {
372
+ }, ut = {
373
+ readonly: Boolean
374
+ }, J = {
48
375
  modifiers: [String, Array]
49
- }, Ne = {
376
+ }, ue = {
50
377
  hintLabel: { type: String, default: "" }
51
- }, Fe = {
378
+ }, dt = {
52
379
  options: { type: Array, default: () => [] },
53
380
  optionLabel: { type: [String, Function], default: () => "label" },
54
381
  optionValue: { type: [String, Function], default: () => "value" }
55
- };
56
- var L = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(L || {}), q = /* @__PURE__ */ ((e) => (e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e))(q || {}), fe = /* @__PURE__ */ ((e) => (e._blank = "_blank", e._self = "_self", e._parent = "_parent", e._top = "_top", e))(fe || {});
57
- const qe = {
58
- ...z,
59
- ...oe,
60
- icon: String,
61
- iconPosition: {
62
- type: String,
63
- default: "left",
64
- validator: (e) => e in L
65
- },
382
+ }, ct = {
383
+ limit: {
384
+ type: [Boolean, String],
385
+ default: !1,
386
+ validator: (o) => [!0, !1, "countdown"].includes(o)
387
+ }
388
+ }, vt = {
389
+ id: [String, Number],
390
+ name: { type: String, required: !0 },
391
+ autocomplete: { type: String, default: "off" },
392
+ autofocus: Boolean,
393
+ minlength: Number,
394
+ maxlength: Number,
66
395
  label: String,
67
- loading: Boolean,
68
- loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
69
- loadingLabel: {
70
- type: String,
71
- default: "Loading..."
72
- },
73
- to: {
74
- type: [String, Object]
75
- },
76
- href: String,
77
- target: {
78
- type: String,
79
- validator: (e) => e in fe
80
- },
81
- active: Boolean,
82
- selected: Boolean
83
- }, b = {
84
- equals(e, n, t) {
85
- return t ? this.resolveFieldData(e, t) === this.resolveFieldData(n, t) : this.deepEquals(e, n);
86
- },
87
- deepEquals(e, n) {
88
- if (e === n)
89
- return !0;
90
- if (e && n && typeof e == "object" && typeof n == "object") {
91
- const t = Array.isArray(e), r = Array.isArray(n);
92
- let o, a, l;
93
- if (t && r) {
94
- if (a = e.length, a != n.length)
95
- return !1;
96
- for (o = a; o-- !== 0; )
97
- if (!this.deepEquals(e[o], n[o]))
98
- return !1;
99
- return !0;
100
- }
101
- if (t != r)
102
- return !1;
103
- const u = e instanceof Date, i = n instanceof Date;
104
- if (u != i)
105
- return !1;
106
- if (u && i)
107
- return e.getTime() == n.getTime();
108
- const d = e instanceof RegExp, c = n instanceof RegExp;
109
- if (d != c)
110
- return !1;
111
- if (d && c)
112
- return e.toString() == n.toString();
113
- const s = Object.keys(e);
114
- if (a = s.length, a !== Object.keys(n).length)
115
- return !1;
116
- for (o = a; o-- !== 0; )
117
- if (!Object.prototype.hasOwnProperty.call(n, s[o]))
118
- return !1;
119
- for (o = a; o-- !== 0; )
120
- if (l = s[o], !this.deepEquals(e[l], n[l]))
121
- return !1;
122
- return !0;
123
- }
124
- return e !== e && n !== n;
125
- },
126
- resolveFieldData(e, n) {
127
- if (e && Object.keys(e).length && n) {
128
- if (n.indexOf(".") === -1)
129
- return e[n];
130
- {
131
- const t = n.split(".");
132
- let r = e;
133
- for (let o = 0, a = t.length; o < a; ++o) {
134
- if (e == null)
135
- return null;
136
- r = r[t[o]];
137
- }
138
- return r;
139
- }
140
- } else
141
- return null;
142
- },
143
- isFunction(e) {
144
- return !!(e && e.constructor && e.call && e.apply);
145
- },
146
- findIndexInList(e, n) {
147
- let t = -1;
148
- if (n) {
149
- for (let r = 0; r < n.length; r++)
150
- if (this.equals(n[r], e)) {
151
- t = r;
152
- break;
153
- }
154
- }
155
- return t;
156
- },
157
- contains(e, n) {
158
- if (e != null && n && n.length) {
159
- for (const t of n)
160
- if (this.equals(e, t))
161
- return !0;
162
- }
163
- return !1;
164
- },
165
- isEmpty(e) {
166
- return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
167
- },
168
- isNotEmpty(e) {
169
- return !this.isEmpty(e);
170
- },
171
- pickBy(e, n) {
172
- return Object.fromEntries(
173
- Object.entries(e).filter(([t]) => n(t))
174
- );
175
- },
176
- removeFromList(e, n) {
177
- const t = this.findIndexInList(e, n);
178
- return t > -1 ? n.filter((r, o) => o !== t) : n;
179
- },
180
- isString(e) {
181
- return typeof e == "string" || e instanceof String;
182
- },
183
- propsToObject(e) {
184
- return Object.keys(e).reduce((n, t) => {
185
- var r, o, a, l, u;
186
- return this.isFunction(e[t]) ? n[t] = e[t]() : Array.isArray(e[t]) ? n[t] = e[t][0]() : (r = e[t]) != null && r.type && (Array.isArray(e[t].type) ? n[t] = ((o = e[t]) == null ? void 0 : o.default) || ((a = e[t]) == null ? void 0 : a.type[0]()) : n[t] = ((l = e[t]) == null ? void 0 : l.default) || ((u = e[t]) == null ? void 0 : u.type())), n;
187
- }, {});
188
- },
189
- filterArray(e, n, t) {
190
- return e.filter((r) => n.some((o) => typeof o == "string" ? r[t] == o : this.equals(
191
- r[t],
192
- o[t]
193
- )));
194
- },
195
- kebabCase(e) {
196
- var n, t;
197
- if (e)
198
- return (t = (n = e.match(
199
- /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
200
- )) == null ? void 0 : n.join("-")) == null ? void 0 : t.toLowerCase();
396
+ placeholder: String,
397
+ required: Boolean,
398
+ disabled: Boolean,
399
+ readonly: Boolean
400
+ }, ao = {
401
+ debounce: Number
402
+ }, no = {
403
+ ...J,
404
+ value: [String, Number]
405
+ }, lo = {
406
+ name: "VvBadge"
407
+ }, za = /* @__PURE__ */ B({
408
+ ...lo,
409
+ props: no,
410
+ setup(o) {
411
+ const t = o, { bemCssClasses: e } = L("vv-badge", {
412
+ modifiers: t.modifiers
413
+ });
414
+ return (n, l) => (m(), _("span", {
415
+ class: U(a(e)),
416
+ role: "status"
417
+ }, [
418
+ C(n.$slots, "default", {}, () => [
419
+ K(E(n.value), 1)
420
+ ])
421
+ ], 2));
201
422
  }
202
- }, Le = {
423
+ }), ro = {
424
+ ...J,
425
+ routes: Array,
426
+ multiline: Boolean
427
+ }, so = { class: "vv-breadcrumb__list" }, io = ["content"], uo = {
428
+ name: "VvBreadcrumb"
429
+ }, Xa = /* @__PURE__ */ B({
430
+ ...uo,
431
+ props: ro,
432
+ setup(o) {
433
+ const t = o, { bemCssClasses: e } = L("vv-breadcrumb", {
434
+ modifiers: t.modifiers,
435
+ multiline: t.multiline
436
+ });
437
+ return (n, l) => (m(), _("nav", {
438
+ class: U(a(e)),
439
+ "aria-label": "breadcrumbs"
440
+ }, [
441
+ O("ol", so, [
442
+ (m(!0), _(re, null, ge(n.routes, (s, r) => {
443
+ var f, v, p, u;
444
+ return m(), _("li", {
445
+ key: `${s.label}-${r}`,
446
+ class: U({
447
+ "vv-breadcrumb__item": r < Number((f = n.routes) == null ? void 0 : f.length) - 1,
448
+ "vv-breadcrumb__item-active": r === Number((v = n.routes) == null ? void 0 : v.length) - 1
449
+ }),
450
+ itemprop: "itemListElement",
451
+ itemtype: "https://schema.org/ListItem",
452
+ itemscope: ""
453
+ }, [
454
+ (m(), G(Je(s.to ? "router-link" : s.href ? "a" : "span"), D(s, {
455
+ class: {
456
+ "vv-breadcrumb__link": r < Number((p = n.routes) == null ? void 0 : p.length) - 1
457
+ },
458
+ "aria-current": r === Number((u = n.routes) == null ? void 0 : u.length) - 1 ? "page" : void 0,
459
+ itemprop: "item"
460
+ }), {
461
+ default: _e(() => [
462
+ K(E(s.label), 1)
463
+ ]),
464
+ _: 2
465
+ }, 1040, ["class", "aria-current"])),
466
+ O("meta", {
467
+ itemprop: "position",
468
+ content: `${r + 1}`
469
+ }, null, 8, io)
470
+ ], 2);
471
+ }), 128))
472
+ ])
473
+ ], 2));
474
+ }
475
+ }), co = {
203
476
  color: String,
204
477
  width: {
205
478
  type: [String, Number]
@@ -230,809 +503,606 @@ const qe = {
230
503
  modifiers: {
231
504
  type: [String, Array]
232
505
  }
233
- };
234
- function w(e, n) {
235
- const t = { [`${e}`]: !0 };
236
- return {
237
- bemCssClasses: y(() => Object.keys(n).reduce((o, a) => {
238
- const l = p(n[a]) || !1;
239
- if (!l)
240
- return o;
241
- if (a === "modifiers") {
242
- const u = Array.isArray(l) ? l : [l];
243
- return {
244
- ...o,
245
- ...u.reduce(
246
- (i, d) => ({
247
- ...i,
248
- [`${e}--${b.kebabCase(
249
- d
250
- )}`]: !0
251
- }),
252
- {}
253
- )
254
- };
255
- } else
256
- return {
257
- ...o,
258
- [`${e}--${b.kebabCase(a)}`]: l
259
- };
260
- }, t) || {})
261
- };
262
- }
263
- const x = /* @__PURE__ */ P({
264
- __name: "VvIcon",
265
- props: Le,
266
- setup(e) {
267
- const n = e, t = H(!0), { modifiers: r } = S(n), o = le(ne), { bemCssClasses: a } = w("vv-icon", {
268
- modifiers: r
269
- }), l = y(() => n.provider || (o == null ? void 0 : o.provider)), u = y(() => {
270
- const c = n.name || "", s = `@${l.value}:${n.prefix}:${n.name}`;
271
- return Y(c) ? c : Y(s) ? s : (o == null ? void 0 : o.iconsCollections.find((f) => {
272
- const v = `@${l.value}:${f.prefix}:${c}`;
273
- if (Y(v))
274
- return v;
275
- })) || c;
506
+ }, vo = {
507
+ name: "VvIcon"
508
+ }, j = /* @__PURE__ */ B({
509
+ ...vo,
510
+ props: co,
511
+ setup(o) {
512
+ const t = o, e = H(!0), { modifiers: n } = x(t), l = xe(Pe), { bemCssClasses: s } = L("vv-icon", {
513
+ modifiers: n
514
+ }), r = i(() => t.provider || (l == null ? void 0 : l.provider)), f = i(() => {
515
+ const u = t.name || "", d = `@${r.value}:${t.prefix}:${t.name}`;
516
+ return $e(u) ? u : $e(d) ? d : (l == null ? void 0 : l.iconsCollections.find((c) => {
517
+ const b = `@${r.value}:${c.prefix}:${u}`;
518
+ if ($e(b))
519
+ return b;
520
+ })) || u;
276
521
  });
277
- function i(c) {
278
- let s = null;
522
+ function v(u) {
523
+ let d = null;
279
524
  if (typeof window > "u") {
280
- const { JSDOM: m } = require("jsdom");
281
- s = new m().window;
525
+ const { JSDOM: y } = require("jsdom");
526
+ d = new y().window;
282
527
  }
283
- return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(c, "text/html").querySelector("svg");
528
+ return (d ? new d.DOMParser() : new window.DOMParser()).parseFromString(u, "text/html").querySelector("svg");
284
529
  }
285
- function d(c) {
286
- const s = i(c), f = (s == null ? void 0 : s.innerHTML.trim()) || "";
287
- s && f && ae(`@${l.value}:${n.prefix}:${n.name}`, {
288
- body: f,
289
- height: s.viewBox.baseVal.height,
290
- width: s.viewBox.baseVal.width
530
+ function p(u) {
531
+ const d = v(u), c = (d == null ? void 0 : d.innerHTML.trim()) || "";
532
+ d && c && We(`@${r.value}:${t.prefix}:${t.name}`, {
533
+ body: c,
534
+ height: d.viewBox.baseVal.height,
535
+ width: d.viewBox.baseVal.width
291
536
  });
292
537
  }
293
- return o && (n.src ? (t.value = !1, o.fetchIcon(n.src).then((c) => {
294
- c && (d(c), t.value = !0);
295
- }).catch((c) => {
296
- throw new Error(`During fetch icon: ${c == null ? void 0 : c.message}`);
297
- })) : n.svg && d(n.svg)), (c, s) => t.value ? (g(), D(p(Ce), E({
538
+ return l && (t.src && !$e(`@${r.value}:${t.prefix}:${t.name}`) ? (e.value = !1, l.fetchIcon(t.src).then((u) => {
539
+ u && (p(u), e.value = !0);
540
+ }).catch((u) => {
541
+ throw new Error(`During fetch icon: ${u == null ? void 0 : u.message}`);
542
+ })) : t.svg && p(t.svg)), (u, d) => e.value ? (m(), G(a(It), D({
298
543
  key: 0,
299
- class: p(a)
544
+ class: a(s)
300
545
  }, {
301
- ...c.$props,
302
- provider: p(l),
303
- icon: p(u)
304
- }), null, 16, ["class"])) : O("", !0);
546
+ ...u.$props,
547
+ provider: a(r),
548
+ icon: a(f)
549
+ }), null, 16, ["class"])) : w("", !0);
305
550
  }
306
551
  });
307
- function re(e) {
308
- const n = le(e, void 0), t = y(() => b.isNotEmpty(n));
309
- function r(o, a, l) {
310
- if (n != null && n.value) {
311
- const u = p(n.value)[o];
312
- return y({
313
- get() {
314
- return u == null ? void 0 : u.value;
315
- },
316
- set(i) {
317
- u.value = i;
318
- }
319
- });
320
- } else {
321
- const u = ke(a, o);
322
- return y({
323
- get() {
324
- return u.value;
325
- },
326
- set(i) {
327
- l && l(`update:${o}`, i);
328
- }
329
- });
330
- }
552
+ var pe = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(pe || {}), pt = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(pt || {}), ee = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ee || {}), ft = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))(ft || {});
553
+ const po = {
554
+ ...J,
555
+ ...Se,
556
+ icon: {
557
+ type: [String, Object],
558
+ default: ""
559
+ },
560
+ iconPosition: {
561
+ type: String,
562
+ default: "left",
563
+ validator: (o) => o in pe
564
+ },
565
+ label: [String, Number],
566
+ loading: Boolean,
567
+ loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
568
+ loadingLabel: {
569
+ type: String,
570
+ default: "Loading..."
571
+ },
572
+ to: {
573
+ type: [String, Object]
574
+ },
575
+ href: String,
576
+ target: {
577
+ type: String,
578
+ validator: (o) => o in ft
579
+ },
580
+ active: Boolean,
581
+ pressed: Boolean,
582
+ rel: {
583
+ type: String,
584
+ default: "noopener noreferrer"
585
+ },
586
+ type: {
587
+ type: String,
588
+ default: "button",
589
+ validator: (o) => o in pt
331
590
  }
591
+ };
592
+ function fo(o) {
593
+ const { group: t, isInGroup: e, getGroupOrLocalRef: n } = we(lt), { iconPosition: l, icon: s, label: r, pressed: f } = x(o), v = n("modelValue", o), p = n("disabled", o), u = n("toggle", o), d = n("modifiers", o);
332
594
  return {
333
- group: n,
334
- isInGroup: t,
335
- getGroupOrLocalRef: r
336
- };
337
- }
338
- const pe = Symbol("VV_BUTTON_GROUP"), me = Symbol("VV_CHECK_GROUP"), ge = Symbol("VV_ACCORDION_GROUP");
339
- function He(e) {
340
- const { group: n, isInGroup: t, getGroupOrLocalRef: r } = re(pe), { iconPosition: o, icon: a, label: l, selected: u } = S(e), i = r("modelValue", e), d = r("disabled", e), c = r("toggle", e), s = r("modifiers", e);
341
- return {
342
- modelValue: i,
343
- disabled: d,
344
- toggle: c,
345
- isInGroup: t,
346
- group: n,
347
- modifiers: s,
348
- selected: u,
349
- iconPosition: o,
350
- icon: a,
351
- label: l
595
+ modelValue: v,
596
+ disabled: p,
597
+ toggle: u,
598
+ isInGroup: e,
599
+ group: t,
600
+ modifiers: d,
601
+ pressed: f,
602
+ iconPosition: l,
603
+ icon: s,
604
+ label: r
352
605
  };
353
606
  }
354
- const Me = {
607
+ const mo = {
355
608
  key: 1,
356
609
  class: "vv-button__label"
357
- }, Ue = {
610
+ }, bo = {
358
611
  key: 1,
359
612
  class: "vv-button__label"
360
- }, Nt = /* @__PURE__ */ P({
361
- __name: "VvButton",
362
- props: qe,
363
- setup(e) {
364
- const n = e, t = W(), r = ie(), o = (t == null ? void 0 : t.name) || te(), {
365
- modifiers: a,
366
- iconPosition: l,
367
- icon: u,
368
- label: i,
369
- modelValue: d,
370
- disabled: c,
371
- toggle: s,
372
- isInGroup: f
373
- } = He(n), v = y(() => {
613
+ }, go = {
614
+ name: "VvButton"
615
+ }, Za = /* @__PURE__ */ B({
616
+ ...go,
617
+ props: po,
618
+ setup(o) {
619
+ const t = o, e = ze(), n = oe(), l = (e == null ? void 0 : e.name) || ve(), {
620
+ modifiers: s,
621
+ iconPosition: r,
622
+ icon: f,
623
+ label: v,
624
+ modelValue: p,
625
+ disabled: u,
626
+ toggle: d,
627
+ isInGroup: c
628
+ } = fo(t), b = xe(Pe), g = i(() => {
374
629
  switch (!0) {
375
- case c.value:
376
- return q.button;
377
- case n.to !== void 0:
378
- return q.routerLink;
379
- case n.href !== void 0:
380
- return q.a;
630
+ case u.value:
631
+ return ee.button;
632
+ case t.to !== void 0:
633
+ return b != null && b.nuxt ? ee.nuxtLink : ee.routerLink;
634
+ case t.href !== void 0:
635
+ return ee.a;
381
636
  default:
382
- return q.button;
637
+ return ee.button;
383
638
  }
384
- }), h = y(() => s.value ? Array.isArray(d.value) ? b.contains(o, d.value) : b.equals(o, d.value) : n.active), m = y(() => s.value ? Array.isArray(d.value) ? b.contains(o, d.value) : b.equals(o, d.value) : n.selected), { bemCssClasses: V } = w("vv-button", {
385
- modifiers: a,
386
- active: h,
387
- selected: m,
388
- disabled: c,
389
- reverse: y(
390
- () => [L.right, L.bottom].includes(
391
- l.value
639
+ }), y = i(() => d.value ? Array.isArray(p.value) ? ce(l, p.value) : le(l, p.value) : t.pressed), { bemCssClasses: h } = L("vv-button", {
640
+ modifiers: s,
641
+ active: t.active,
642
+ pressed: y,
643
+ disabled: u,
644
+ reverse: i(
645
+ () => [pe.right, pe.bottom].includes(
646
+ r.value
392
647
  )
393
648
  ),
394
- column: y(
395
- () => [L.top, L.bottom].includes(
396
- l.value
649
+ column: i(
650
+ () => [pe.top, pe.bottom].includes(
651
+ r.value
397
652
  )
398
653
  ),
399
- iconOnly: y(() => (u == null ? void 0 : u.value) && !(i != null && i.value) && !r.default)
400
- }), A = y(() => ({
401
- ...I.value,
402
- "aria-label": n.label || t["aria-label"],
403
- "aria-disabled": c.value,
404
- role: "button",
405
- class: V.value,
406
- to: n.to
407
- })), I = y(() => {
408
- const k = v.value === q.a;
409
- let M = {};
410
- return k && (M = c.value ? {
411
- href: "javascript:;"
412
- } : {
413
- target: n.target,
414
- href: n.href
415
- }), M;
654
+ iconOnly: i(() => (f == null ? void 0 : f.value) && !(v != null && v.value) && !n.default)
655
+ }), k = i(
656
+ () => typeof (f == null ? void 0 : f.value) == "string" ? { name: f == null ? void 0 : f.value } : f == null ? void 0 : f.value
657
+ ), P = i(() => {
658
+ const A = {
659
+ class: h.value,
660
+ "aria-label": e["aria-label"],
661
+ "aria-pressed": y.value ? !0 : void 0
662
+ };
663
+ switch (g.value) {
664
+ case ee.a:
665
+ return {
666
+ ...A,
667
+ role: "button",
668
+ href: t.href,
669
+ target: t.target,
670
+ rel: t.rel
671
+ };
672
+ case ee.routerLink:
673
+ case ee.nuxtLink:
674
+ return {
675
+ ...A,
676
+ role: "button",
677
+ to: t.to,
678
+ target: t.target
679
+ };
680
+ default:
681
+ return {
682
+ ...A,
683
+ type: t.type,
684
+ disabled: u.value
685
+ };
686
+ }
416
687
  });
417
- function R() {
418
- f.value && (d.value = o);
688
+ function I() {
689
+ c.value && (p.value = l);
419
690
  }
420
- return (k, M) => (g(), D(ue(p(v)), E(p(A), { onClickPassive: R }), {
421
- default: ee(() => [
422
- C(k.$slots, "default", {}, () => [
423
- k.loading ? C(k.$slots, "loading", { key: 0 }, () => [
424
- k.loadingIcon ? (g(), D(x, {
691
+ return (A, R) => (m(), G(Je(a(g)), D(a(P), { onClickPassive: I }), {
692
+ default: _e(() => [
693
+ C(A.$slots, "default", {}, () => [
694
+ A.loading ? C(A.$slots, "loading", { key: 0 }, () => [
695
+ A.loadingIcon ? (m(), G(j, {
425
696
  key: 0,
426
697
  class: "vv-button__loading-icon",
427
- name: k.loadingIcon
428
- }, null, 8, ["name"])) : O("", !0),
429
- k.loadingLabel ? (g(), _("span", Me, B(k.loadingLabel), 1)) : O("", !0)
430
- ]) : (g(), _(U, { key: 1 }, [
431
- C(k.$slots, "before"),
432
- p(u) ? (g(), D(x, {
698
+ name: A.loadingIcon
699
+ }, null, 8, ["name"])) : w("", !0),
700
+ A.loadingLabel ? (m(), _("span", mo, E(A.loadingLabel), 1)) : w("", !0)
701
+ ]) : (m(), _(re, { key: 1 }, [
702
+ C(A.$slots, "before"),
703
+ a(f) ? (m(), G(j, D({
433
704
  key: 0,
434
- class: "vv-button__icon",
435
- name: p(u)
436
- }, null, 8, ["name"])) : O("", !0),
437
- p(i) ? (g(), _("span", Ue, [
438
- C(k.$slots, "label", {}, () => [
439
- j(B(p(i)), 1)
705
+ class: "vv-button__icon"
706
+ }, a(k)), null, 16)) : w("", !0),
707
+ a(v) ? (m(), _("span", bo, [
708
+ C(A.$slots, "label", {}, () => [
709
+ K(E(a(v)), 1)
440
710
  ])
441
- ])) : O("", !0),
442
- C(k.$slots, "after")
711
+ ])) : w("", !0),
712
+ C(A.$slots, "after")
443
713
  ], 64))
444
714
  ])
445
715
  ]),
446
716
  _: 3
447
717
  }, 16));
448
718
  }
449
- }), ze = {
450
- ...z,
451
- value: [String, Number]
452
- }, Ft = /* @__PURE__ */ P({
453
- __name: "VvBadge",
454
- props: ze,
455
- setup(e) {
456
- const n = e, { modifiers: t } = S(n), { bemCssClasses: r } = w("vv-badge", {
457
- modifiers: t
458
- });
459
- return (o, a) => (g(), _("span", {
460
- class: N(p(r)),
461
- role: "status"
462
- }, B(o.value), 3));
463
- }
464
- }), Ke = {
465
- ...z,
466
- ...oe,
719
+ }), yo = {
720
+ ...J,
721
+ ...Se,
467
722
  vertical: { type: Boolean, default: !1 },
468
723
  compact: { type: Boolean, default: !1 },
469
724
  toggle: { type: Boolean, default: !1 },
470
725
  modelValue: { type: String, default: void 0 }
471
- }, Te = ["update:modelValue"];
472
- function se(e) {
473
- if (Object.keys(e).some(
474
- (n) => n !== "key" && !$e(e[n])
475
- ))
476
- throw Error("One or more groupState props aren't ref.");
477
- Se(
478
- e.key,
479
- y(() => e)
480
- );
481
- }
482
- const qt = /* @__PURE__ */ P({
483
- __name: "VvButtonGroup",
484
- props: Ke,
485
- emits: Te,
486
- setup(e, { emit: n }) {
487
- const t = e, r = X(t, "modelValue", n), { disabled: o, vertical: a, compact: l, toggle: u, modifiers: i } = S(t), { bemCssClasses: d } = w("vv-button-group", {
488
- modifiers: i,
489
- vertical: a,
490
- compact: l
491
- }), c = {
492
- key: pe,
493
- modelValue: r,
494
- disabled: o,
495
- toggle: u,
496
- modifiers: i != null && i.value ? i : H([])
726
+ }, ho = ["update:modelValue"], _o = {
727
+ name: "VvButtonGroup"
728
+ }, Ja = /* @__PURE__ */ B({
729
+ ..._o,
730
+ props: yo,
731
+ emits: ho,
732
+ setup(o, { emit: t }) {
733
+ const e = o, n = Ae(e, "modelValue", t), { disabled: l, vertical: s, compact: r, toggle: f, modifiers: v } = x(e), { bemCssClasses: p } = L("vv-button-group", {
734
+ modifiers: v,
735
+ vertical: s,
736
+ compact: r
737
+ }), u = {
738
+ key: lt,
739
+ modelValue: n,
740
+ disabled: l,
741
+ toggle: f,
742
+ modifiers: v != null && v.value ? v : H([])
497
743
  };
498
- return se(c), (s, f) => (g(), _("div", {
499
- class: N(p(d)),
744
+ return Oe(u), (d, c) => (m(), _("div", {
745
+ class: U(a(p)),
500
746
  role: "group"
501
747
  }, [
502
- C(s.$slots, "default")
748
+ C(d.$slots, "default")
503
749
  ], 2));
504
750
  }
505
- }), Ze = {
506
- title: String,
507
- content: String,
508
- open: Boolean,
509
- iconRight: Boolean,
510
- bordered: Boolean,
511
- modifiers: [String, Array],
512
- disabled: Boolean
513
- }, We = ["update:open"];
514
- function Je(e, n) {
515
- const { group: t, isInGroup: r, getGroupOrLocalRef: o } = re(ge), { modifiers: a } = S(e), l = o("modelValue", e, n), u = o("bordered", e), i = o("disabled", e), d = o("iconRight", e), c = o("accordion", e);
516
- return {
517
- modelValue: l,
518
- disabled: i,
519
- bordered: u,
520
- iconRight: d,
521
- isInGroup: r,
522
- group: t,
523
- accordion: c,
524
- modifiers: a
525
- };
526
- }
527
- const Xe = ["open"], Qe = ["aria-controls", "aria-expanded"], Ye = ["aria-hidden"], xe = /* @__PURE__ */ P({
528
- __name: "VvAccordion",
529
- props: Ze,
530
- emits: We,
531
- setup(e, { emit: n }) {
532
- const t = e, r = W(), o = (r == null ? void 0 : r.name) || te(), {
533
- modelValue: a,
534
- modifiers: l,
535
- bordered: u,
536
- disabled: i = H(!1),
537
- iconRight: d,
538
- isInGroup: c,
539
- accordion: s
540
- } = Je(t, n), f = y(() => c.value ? s.value ? b.equals(o, a.value) : b.contains(o, a.value) : t.open), { bemCssClasses: v } = w("vv-accordion", {
541
- modifiers: l,
542
- disabled: i,
543
- markerRight: y(() => d.value),
544
- bordered: u
545
- }), h = (V) => {
546
- const A = V.target;
547
- n("update:open", A.open);
548
- }, m = (V) => {
549
- c.value && (s.value ? a.value = f.value ? null : o : a.value = f.value ? b.removeFromList(
550
- o,
551
- a.value
552
- ) : [...a.value, o], V.preventDefault());
553
- };
554
- return (V, A) => (g(), _("details", {
555
- class: N(p(v)),
556
- open: p(f),
557
- onToggle: h,
558
- onClick: m
559
- }, [
560
- $("summary", {
561
- "aria-controls": `#${p(o)}`,
562
- "aria-expanded": p(f),
563
- class: "vv-collapse__summary"
564
- }, [
565
- C(V.$slots, "header", {}, () => [
566
- j(B(V.title), 1)
567
- ])
568
- ], 8, Qe),
569
- $("div", {
570
- "aria-hidden": !p(f),
571
- class: "vv-collapse__content"
572
- }, [
573
- C(V.$slots, "details", {}, () => [
574
- j(B(V.content), 1)
575
- ])
576
- ], 8, Ye)
577
- ], 42, Xe));
578
- }
579
- }), et = {
580
- modelValue: [String, Array],
581
- iconRight: Boolean,
582
- bordered: Boolean,
583
- items: { type: Array, default: () => [] },
584
- accordion: Boolean,
585
- modifiers: [String, Array],
586
- disabled: Boolean
587
- }, tt = ["update:open"], Lt = /* @__PURE__ */ P({
588
- __name: "VvAccordionGroup",
589
- props: et,
590
- emits: tt,
591
- setup(e, { emit: n }) {
592
- const t = e, r = X(t, "modelValue", n), { disabled: o, bordered: a, iconRight: l, accordion: u, modifiers: i, items: d } = S(t);
593
- se({
594
- key: ge,
595
- modelValue: r,
596
- disabled: o,
597
- bordered: a,
598
- iconRight: l,
599
- accordion: u
600
- });
601
- const { bemCssClasses: s } = w("vv-accordion-group", {
602
- modifiers: i,
603
- disabled: o
604
- });
605
- return (f, v) => {
606
- var h;
607
- return g(), _("div", {
608
- class: N(p(s))
609
- }, [
610
- ((h = t.items) == null ? void 0 : h.length) > 0 ? (g(!0), _(U, { key: 0 }, J(p(d), (m) => (g(), D(xe, E({
611
- key: m.title
612
- }, {
613
- name: m.name,
614
- title: m.title,
615
- content: m.content,
616
- ...t
617
- }), null, 16))), 128)) : C(f.$slots, "default", { key: 1 })
618
- ], 2);
619
- };
620
- }
621
- }), nt = {
622
- ...z,
623
- routes: Array,
624
- multiline: Boolean
625
- }, ot = { class: "vv-breadcrumb__list" }, rt = ["content"], Ht = /* @__PURE__ */ P({
626
- __name: "VvBreadcrumb",
627
- props: nt,
628
- setup(e) {
629
- const n = e, { modifiers: t, multiline: r } = S(n), { bemCssClasses: o } = w("vv-breadcrumb", {
630
- modifiers: t,
631
- multiline: r
632
- });
633
- return (a, l) => (g(), _("nav", {
634
- class: N(p(o)),
635
- "aria-label": "breadcrumbs"
636
- }, [
637
- $("ol", ot, [
638
- (g(!0), _(U, null, J(a.routes, (u, i) => {
639
- var d, c, s, f;
640
- return g(), _("li", {
641
- key: `${u.label}-${i}`,
642
- class: N({
643
- "vv-breadcrumb__item": i < Number((d = a.routes) == null ? void 0 : d.length) - 1,
644
- "vv-breadcrumb__item-active": i === Number((c = a.routes) == null ? void 0 : c.length) - 1
645
- }),
646
- itemprop: "itemListElement",
647
- itemtype: "https://schema.org/ListItem",
648
- itemscope: ""
649
- }, [
650
- (g(), D(ue(u.to ? "router-link" : u.href ? "a" : "span"), E(u, {
651
- class: {
652
- "vv-breadcrumb__link": i < Number((s = a.routes) == null ? void 0 : s.length) - 1
653
- },
654
- "aria-current": i === Number((f = a.routes) == null ? void 0 : f.length) - 1 ? "page" : void 0,
655
- itemprop: "item"
656
- }), {
657
- default: ee(() => [
658
- j(B(u.label) + " ", 1)
659
- ]),
660
- _: 2
661
- }, 1040, ["class", "aria-current"])),
662
- $("meta", {
663
- itemprop: "position",
664
- content: `${i + 1}`
665
- }, null, 8, rt)
666
- ], 2);
667
- }), 128))
668
- ])
669
- ], 2));
670
- }
671
- }), st = {
751
+ }), So = {
672
752
  title: String,
673
753
  modifiers: [String, Array]
674
- }, at = {
754
+ }, Vo = {
675
755
  key: 0,
676
756
  class: "vv-card__header"
677
- }, lt = {
757
+ }, $o = {
678
758
  key: 1,
679
759
  class: "vv-card__content"
680
- }, it = {
760
+ }, Co = {
681
761
  key: 2,
682
762
  class: "vv-card__footer"
683
- }, Mt = /* @__PURE__ */ P({
684
- __name: "VvCard",
685
- props: st,
686
- setup(e) {
687
- const n = e, t = W(), { modifiers: r } = S(n), { bemCssClasses: o } = w("vv-card", {
688
- modifiers: r
689
- }), a = y(() => t);
690
- return (l, u) => (g(), _("article", E({ class: p(o) }, p(a)), [
691
- l.$slots.header || l.title ? (g(), _("header", at, [
692
- C(l.$slots, "header", {}, () => [
693
- j(B(l.title), 1)
763
+ }, ko = {
764
+ name: "VvCard"
765
+ }, Qa = /* @__PURE__ */ B({
766
+ ...ko,
767
+ props: So,
768
+ setup(o) {
769
+ const t = o, { bemCssClasses: e } = L("vv-card", {
770
+ modifiers: t.modifiers
771
+ });
772
+ return (n, l) => (m(), _("article", {
773
+ class: U(a(e))
774
+ }, [
775
+ n.$slots.header || n.title ? (m(), _("header", Vo, [
776
+ C(n.$slots, "header", {}, () => [
777
+ K(E(n.title), 1)
694
778
  ])
695
- ])) : O("", !0),
696
- C(l.$slots, "default"),
697
- l.$slots.content ? (g(), _("div", lt, [
698
- C(l.$slots, "content")
699
- ])) : O("", !0),
700
- l.$slots.footer ? (g(), _("footer", it, [
701
- C(l.$slots, "footer")
702
- ])) : O("", !0)
703
- ], 16));
779
+ ])) : w("", !0),
780
+ C(n.$slots, "default"),
781
+ n.$slots.content ? (m(), _("div", $o, [
782
+ C(n.$slots, "content")
783
+ ])) : w("", !0),
784
+ n.$slots.footer ? (m(), _("footer", Co, [
785
+ C(n.$slots, "footer")
786
+ ])) : w("", !0)
787
+ ], 2));
704
788
  }
705
- }), ut = {
706
- ...de,
707
- ...ve,
708
- value: null,
709
- modelValue: null,
710
- binary: Boolean,
711
- trueValue: { type: null, default: !0 },
712
- falseValue: { type: null, default: !1 },
713
- switch: Boolean,
789
+ }), Ao = {
790
+ ...se,
791
+ ...ie,
792
+ ...ue,
793
+ id: [String, Number],
794
+ name: { type: String, required: !0 },
795
+ value: [String, Number, Boolean],
796
+ modelValue: [Object, Number, Boolean, String],
714
797
  label: String,
715
798
  disabled: Boolean,
716
- readonly: Boolean
717
- }, ct = [
718
- "click",
719
- "update:modelValue",
720
- "change",
721
- "focus",
722
- "blur"
723
- ];
724
- function dt(e, n) {
725
- const { group: t, isInGroup: r, getGroupOrLocalRef: o } = re(me), { valid: a, error: l, switch: u } = S(e), i = o("modelValue", e, n), d = o("readonly", e), c = o("disabled", e);
799
+ readonly: Boolean,
800
+ trueValue: { type: [String, Number, Boolean], default: void 0 },
801
+ falseValue: { type: [String, Number, Boolean], default: void 0 },
802
+ switch: Boolean,
803
+ tabindex: { type: [String, Number], default: 0 }
804
+ }, Po = ["click", "update:modelValue", "change", "blur"];
805
+ function wo(o, t) {
806
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = we(st), { valid: s, error: r, switch: f } = x(o), v = l("modelValue", o, t), p = l("readonly", o), u = l("disabled", o);
726
807
  return {
727
- group: t,
728
- isInGroup: r,
729
- valid: a,
730
- error: l,
731
- propsSwitch: u,
732
- modelValue: i,
733
- readonly: d,
734
- disabled: c
808
+ valid: s,
809
+ error: r,
810
+ propsSwitch: f,
811
+ group: e,
812
+ isInGroup: n,
813
+ modelValue: v,
814
+ readonly: p,
815
+ disabled: u
735
816
  };
736
817
  }
737
- function vt(e, n) {
738
- const { focused: t } = Ie(e);
739
- return Ae(t, (r) => {
740
- n(r ? "focus" : "blur", e.value);
741
- }), {
742
- focused: t
818
+ function Ce(o) {
819
+ return Array.isArray(o) ? o.filter((t) => qt(t)).join(" ") : o;
820
+ }
821
+ function de(o, t) {
822
+ const {
823
+ error: e,
824
+ valid: n,
825
+ hint: l,
826
+ loading: s
827
+ } = t, {
828
+ hintLabel: r,
829
+ modelValue: f,
830
+ valid: v,
831
+ validLabel: p,
832
+ error: u,
833
+ errorLabel: d,
834
+ ...c
835
+ } = x(o), b = ke(c, "loading"), g = ke(c, "loadingLabel"), y = i(() => u.value ? !!(u.value && e || d != null && d.value && Array.isArray(d.value) && d.value.length > 0 || d != null && d.value && !z(d)) : !1), h = i(
836
+ () => !!(r && r.value || l)
837
+ ), k = i(
838
+ () => !!(p && p.value || n)
839
+ ), P = i(
840
+ () => !!(b != null && b.value && s || b != null && b.value && (g != null && g.value))
841
+ ), I = i(
842
+ () => h.value || k || y.value || P.value
843
+ );
844
+ return {
845
+ hasErrors: y,
846
+ hasHint: h,
847
+ hasValid: k,
848
+ hasLoading: P,
849
+ HintSlot: {
850
+ name: "HintSlot",
851
+ props: {
852
+ params: {
853
+ type: Object,
854
+ default: () => ({})
855
+ }
856
+ },
857
+ setup(A) {
858
+ const R = i(() => {
859
+ const M = Gt({
860
+ hintLabel: r,
861
+ modelValue: f,
862
+ valid: v,
863
+ validLabel: p,
864
+ error: u,
865
+ errorLabel: d,
866
+ loading: b,
867
+ loadingLabel: g,
868
+ ...A.params
869
+ });
870
+ return u != null && u.value ? (e == null ? void 0 : e(M)) || Ce(d == null ? void 0 : d.value) || (r == null ? void 0 : r.value) : v != null && v.value ? (n == null ? void 0 : n(M)) || Ce(p == null ? void 0 : p.value) || (r == null ? void 0 : r.value) : b != null && b.value ? (s == null ? void 0 : s(M)) || Ce(g == null ? void 0 : g.value) || (r == null ? void 0 : r.value) : (l == null ? void 0 : l(M)) || Ce(r == null ? void 0 : r.value) || (r == null ? void 0 : r.value);
871
+ });
872
+ return {
873
+ isVisible: I,
874
+ hasErrors: y,
875
+ hasValid: k,
876
+ hintContent: R
877
+ };
878
+ },
879
+ render() {
880
+ if (this.isVisible)
881
+ return W(
882
+ "small",
883
+ {
884
+ role: this.hasErrors || this.hasValid ? "alert" : void 0
885
+ },
886
+ this.hintContent
887
+ );
888
+ }
889
+ }
743
890
  };
744
891
  }
745
- const ft = {
746
- inheritAttrs: !1
747
- }, pt = /* @__PURE__ */ P({
748
- ...ft,
749
- __name: "VvCheck",
750
- props: ut,
751
- emits: ct,
752
- setup(e, { emit: n }) {
753
- const t = e, r = W(), { disabled: o, readonly: a, valid: l, error: u, propsSwitch: i, modelValue: d } = dt(t, n), c = H(), { focused: s } = vt(c, n), f = y(() => t.binary ? b.equals(d.value, t.trueValue) : Array.isArray(d.value) ? b.contains(t.value, d.value) : b.equals(t.value, d.value)), { bemCssClasses: v } = w("vv-input-checkbox", {
754
- switch: i,
755
- valid: l,
756
- invalid: u
757
- }), { bemCssClasses: h } = w(
758
- "vv-input-check__input",
759
- {
760
- checked: f,
761
- disabled: o,
762
- readonly: a
892
+ const Oo = ["for"], Io = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Eo = {
893
+ name: "VvCheckbox"
894
+ }, To = /* @__PURE__ */ B({
895
+ ...Eo,
896
+ props: Ao,
897
+ emits: Po,
898
+ setup(o, { emit: t }) {
899
+ const e = o, n = oe(), { disabled: l, readonly: s, valid: r, error: f, propsSwitch: v, modelValue: p } = wo(e, t), u = H(), d = i(
900
+ () => e.id !== void 0 ? String(e.id) : void 0
901
+ ), c = i(
902
+ () => e.trueValue !== void 0 && e.falseValue !== void 0
903
+ ), b = i(() => l.value || s.value), g = i(() => b.value ? -1 : e.tabindex), y = i(() => {
904
+ if (e.error === !0)
905
+ return !0;
906
+ if (e.valid === !0)
907
+ return !1;
908
+ }), h = i(() => c.value ? p.value === e.trueValue : Array.isArray(p.value) ? ce(e.value, p.value) : le(e.value, p.value)), k = i(() => {
909
+ if (!c.value)
910
+ return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
911
+ }), P = i({
912
+ get() {
913
+ return h.value;
914
+ },
915
+ set(R) {
916
+ if (c.value) {
917
+ p.value = R ? e.trueValue : e.falseValue;
918
+ return;
919
+ }
920
+ if (Array.isArray(p.value)) {
921
+ p.value = R ? [...p.value, e.value] : He(e.value, p.value);
922
+ return;
923
+ }
924
+ p.value = R ? e.value : null, t("change", R);
763
925
  }
764
- ), m = y(() => ({
765
- [r.class]: !0,
766
- ...v.value
767
- })), V = y(() => ({
768
- ...h.value,
769
- "focus-visible": s.value
770
- })), A = y(() => {
771
- const { id: G, name: F, style: Q } = r, ye = b.pickBy(
772
- r,
773
- (he) => he.startsWith("data-")
774
- );
775
- return {
776
- for: G || F,
777
- style: Q,
778
- ...ye
779
- };
780
- }), I = y(() => {
781
- const { id: G = "", name: F = "" } = r;
782
- return {
783
- type: "checkbox",
784
- id: G || F,
785
- name: F,
786
- value: t.value,
787
- disabled: o.value,
788
- readonly: a.value,
789
- checked: f.value,
790
- ...R.value
791
- };
792
- }), R = y(() => {
793
- const { name: G } = r, F = b.pickBy(
794
- r,
795
- (Q) => Q.startsWith("aria-")
926
+ }), { bemCssClasses: I } = L("vv-checkbox", {
927
+ switch: v,
928
+ valid: r,
929
+ invalid: f,
930
+ disabled: l,
931
+ readonly: s
932
+ });
933
+ Ze(() => {
934
+ c.value && Array.isArray(p.value) && console.warn(
935
+ "[VvCheckbox] The model value is an array but the component is in binary mode."
796
936
  );
797
- return {
798
- "aria-label": G,
799
- "aria-checked": f.value,
800
- ...F
801
- };
802
937
  });
803
- function k() {
804
- if (t.binary) {
805
- d.value = f.value ? t.falseValue : t.trueValue;
806
- return;
807
- }
808
- if (d.value === null) {
809
- d.value = [t.value];
810
- return;
811
- }
812
- if (Array.isArray(d.value)) {
813
- d.value = f.value ? b.removeFromList(t.value, d.value) : [...d.value, t.value];
814
- return;
815
- }
816
- }
817
- function M(G) {
818
- o.value || (n("click", G), n("change", f.value ? t.value : null), s.value = !0);
819
- }
820
- return (G, F) => (g(), _("label", E({ class: p(m) }, p(A), { onClick: M }), [
821
- $("input", E({
938
+ const { HintSlot: A } = de(e, n);
939
+ return (R, M) => (m(), _("label", {
940
+ class: U(a(I)),
941
+ for: a(d)
942
+ }, [
943
+ ne(O("input", {
944
+ id: a(d),
822
945
  ref_key: "input",
823
- ref: c,
824
- class: p(V)
825
- }, p(I), { onInput: k }), null, 16),
826
- C(G.$slots, "default", { value: p(d) }, () => [
827
- j(B(G.label), 1)
828
- ])
829
- ], 16));
946
+ ref: u,
947
+ "onUpdate:modelValue": M[0] || (M[0] = (X) => be(P) ? P.value = X : null),
948
+ type: "checkbox",
949
+ class: "vv-checkbox__input",
950
+ name: R.name,
951
+ disabled: a(b),
952
+ value: a(k),
953
+ tabindex: a(g),
954
+ "aria-invalid": a(y)
955
+ }, null, 8, Io), [
956
+ [Bt, a(P)]
957
+ ]),
958
+ C(R.$slots, "default", { value: a(p) }, () => [
959
+ K(E(R.label), 1)
960
+ ]),
961
+ q(a(A), {
962
+ class: "vv-checkbox__hint",
963
+ params: { value: a(p) }
964
+ }, null, 8, ["params"])
965
+ ], 10, Oo));
830
966
  }
831
- }), mt = {
832
- ...de,
833
- ...ve,
834
- ...Ne,
835
- ...Fe,
967
+ });
968
+ function mt(o) {
969
+ const { options: t, optionLabel: e, optionValue: n } = x(o);
970
+ return {
971
+ options: t,
972
+ getOptionLabel: (r) => typeof r != "object" && r !== null ? r : typeof e.value == "function" ? e.value(r) : r[e.value],
973
+ getOptionValue: (r) => typeof r != "object" && r !== null ? r : typeof n.value == "function" ? n.value(r) : r[n.value]
974
+ };
975
+ }
976
+ const Bo = {
977
+ ...se,
978
+ ...ie,
979
+ ...ue,
980
+ ...dt,
836
981
  modelValue: { type: Array },
837
982
  label: { type: String, default: "" },
838
983
  name: { type: String, default: "", required: !0 },
839
984
  disabled: { type: Boolean, default: !1 },
840
985
  readonly: { type: Boolean, default: !1 },
841
986
  vertical: { type: Boolean, default: !1 }
842
- }, gt = ["update:modelValue", "change"];
843
- function yt(e) {
844
- const { options: n, optionLabel: t, optionValue: r } = S(e);
845
- return {
846
- options: n,
847
- getOptionLabel: (l) => typeof l != "object" && l !== null ? l : typeof t.value == "function" ? t.value(l) : l[t.value],
848
- getOptionValue: (l) => typeof l != "object" && l !== null ? l : typeof r.value == "function" ? r.value(l) : l[r.value]
849
- };
850
- }
851
- function T(e) {
852
- return Array.isArray(e) ? e.filter((n) => b.isString(n)).reduce((n, t) => n.length > 0 ? n + `
853
- ` + t : t, "") : e;
854
- }
855
- function ht(e, n) {
856
- return {
857
- name: "HintSlot",
858
- props: {
859
- params: {
860
- type: Object,
861
- default: () => ({})
862
- }
863
- },
864
- setup(t) {
865
- const r = S(e), {
866
- error: o,
867
- valid: a,
868
- hint: l,
869
- loading: u
870
- } = n, {
871
- hintLabel: i,
872
- modelValue: d,
873
- valid: c,
874
- validLabel: s,
875
- error: f,
876
- errorLabel: v
877
- } = r, h = b.resolveFieldData(r, "loading"), m = b.resolveFieldData(
878
- r,
879
- "loadingLabel"
880
- ), V = y(() => f.value ? !!(f.value && o || (v == null ? void 0 : v.value) && Array.isArray(v.value) && v.value.length > 0 || (v == null ? void 0 : v.value) && b.isNotEmpty(v.value)) : !1), A = y(() => !!(i && i.value || l || a || s && s.value || V.value || (h == null ? void 0 : h.value) && u || (h == null ? void 0 : h.value) && (m == null ? void 0 : m.value))), I = y(() => {
881
- const R = Re({
882
- hintLabel: i,
883
- modelValue: d,
884
- valid: c,
885
- validLabel: s,
886
- error: f,
887
- errorLabel: v,
888
- loading: h,
889
- loadingLabel: m,
890
- ...t.params
891
- });
892
- return f != null && f.value ? (o == null ? void 0 : o(R)) || T(v == null ? void 0 : v.value) || (i == null ? void 0 : i.value) : c != null && c.value ? (a == null ? void 0 : a(R)) || T(s == null ? void 0 : s.value) || (i == null ? void 0 : i.value) : h != null && h.value ? (u == null ? void 0 : u(R)) || T(m == null ? void 0 : m.value) || (i == null ? void 0 : i.value) : (l == null ? void 0 : l(R)) || T(i == null ? void 0 : i.value) || (i == null ? void 0 : i.value);
893
- });
894
- return {
895
- hasHint: A,
896
- hintContent: I
897
- };
898
- },
899
- render() {
900
- if (this.hasHint)
901
- return Oe(
902
- "pre",
903
- { style: { "white-space": "pre" } },
904
- this.hintContent
905
- );
906
- }
907
- };
908
- }
909
- const bt = ["textContent"], _t = { class: "vv-input-checkbox-group__wrapper" }, Ut = /* @__PURE__ */ P({
910
- __name: "VvCheckGroup",
911
- props: mt,
912
- emits: gt,
913
- setup(e, { emit: n }) {
914
- const t = e, r = ie(), o = X(t, "modelValue", n), { disabled: a, readonly: l, error: u, valid: i } = S(t);
915
- se({
916
- key: me,
917
- modelValue: o,
918
- disabled: a,
919
- readonly: l
987
+ }, Ro = ["update:modelValue", "change"], Do = ["textContent"], No = { class: "vv-checkbox-group__wrapper" }, Lo = {
988
+ name: "VvCheckboxGroup"
989
+ }, en = /* @__PURE__ */ B({
990
+ ...Lo,
991
+ props: Bo,
992
+ emits: Ro,
993
+ setup(o, { emit: t }) {
994
+ const e = o, n = oe(), l = Ae(e, "modelValue", t), { disabled: s, readonly: r, error: f, valid: v } = x(e);
995
+ Oe({
996
+ key: st,
997
+ modelValue: l,
998
+ disabled: s,
999
+ readonly: r
920
1000
  });
921
- const { getOptionLabel: c, getOptionValue: s } = yt(t), { bemCssClasses: f } = w(
922
- "vv-input-checkbox-group",
923
- {
924
- horizontal: y(() => !t.vertical),
925
- valid: i,
926
- invalid: u
927
- }
928
- ), v = (m, V) => ({
929
- id: `${t.name}_opt${V}`,
930
- name: t.name,
931
- label: c(m),
932
- value: s(m)
933
- }), h = ht(t, r);
934
- return (m, V) => (g(), _("fieldset", {
935
- class: N(p(f))
1001
+ const { getOptionLabel: u, getOptionValue: d } = mt(e), { bemCssClasses: c } = L("vv-checkbox-group", {
1002
+ horizontal: i(() => !e.vertical),
1003
+ valid: v,
1004
+ invalid: f
1005
+ }), b = (y, h) => ({
1006
+ id: `${e.name}_opt${h}`,
1007
+ name: e.name,
1008
+ label: u(y),
1009
+ value: d(y)
1010
+ }), { HintSlot: g } = de(e, n);
1011
+ return (y, h) => (m(), _("fieldset", {
1012
+ class: U(a(c))
936
1013
  }, [
937
- m.label ? (g(), _("legend", {
1014
+ y.label ? (m(), _("legend", {
938
1015
  key: 0,
939
- textContent: B(m.label)
940
- }, null, 8, bt)) : O("", !0),
941
- $("div", _t, [
942
- m.options.length > 0 ? (g(!0), _(U, { key: 0 }, J(m.options, (A, I) => (g(), D(pt, E({ key: I }, v(A, I)), null, 16))), 128)) : C(m.$slots, "default", { key: 1 })
1016
+ textContent: E(y.label)
1017
+ }, null, 8, Do)) : w("", !0),
1018
+ O("div", No, [
1019
+ y.options.length > 0 ? (m(!0), _(re, { key: 0 }, ge(y.options, (k, P) => (m(), G(To, D({ key: P }, b(k, P)), null, 16))), 128)) : C(y.$slots, "default", { key: 1 })
943
1020
  ]),
944
- ce(p(h), { class: "vv-input-checkbox-group__hint" })
1021
+ q(a(g), { class: "vv-checkbox-group__hint" })
945
1022
  ], 2));
946
1023
  }
947
- }), Z = {
948
- normal: "",
949
- small: "small",
950
- fullscreen: "fullscreen"
951
- }, Vt = ["open", "close", "update:open"], Ct = {
1024
+ }), xo = ["open", "close", "update:modelValue"], Ho = {
952
1025
  id: { type: String, required: !0 },
953
1026
  title: String,
954
- open: Boolean,
1027
+ modelValue: Boolean,
955
1028
  transition: { type: String, default: "fade-block" },
956
- size: {
957
- type: String,
958
- default: Z.normal,
959
- validator: (e) => Object.values(Z).includes(e)
960
- },
1029
+ size: String,
961
1030
  autoClose: { type: Boolean, default: !0 }
962
- }, kt = {
1031
+ }, Go = {
963
1032
  key: 0,
964
1033
  class: "vv-dialog__header"
965
- }, $t = ["onClick"], St = { class: "vv-dialog__content" }, At = {
1034
+ }, jo = ["onClick"], Mo = { class: "vv-dialog__content" }, Uo = {
966
1035
  key: 1,
967
1036
  class: "vv-dialog__footer"
968
- }, zt = /* @__PURE__ */ P({
969
- __name: "VvDialog",
970
- props: Ct,
971
- emits: Vt,
972
- setup(e, { emit: n }) {
973
- const t = e, r = X(t, "open", n), o = H(!0), a = H(null), l = y(() => {
974
- const { id: s } = t;
1037
+ }, qo = {
1038
+ name: "VvDialog"
1039
+ }, tn = /* @__PURE__ */ B({
1040
+ ...qo,
1041
+ props: Ho,
1042
+ emits: xo,
1043
+ setup(o, { emit: t }) {
1044
+ const e = o, n = Ae(e, "modelValue", t), l = H(!0), s = H(null), r = i(() => {
1045
+ const { id: d } = e;
975
1046
  return {
976
- id: s,
977
- open: o.value
1047
+ id: d,
1048
+ open: l.value
978
1049
  };
979
- }), u = y(() => ({
980
- "vv-dialog": !0,
981
- "vv-dialog--small": t.size === Z.small,
982
- "vv-dialog--fullscreen": t.size === Z.fullscreen
983
- })), i = y(() => `vv-dialog--${t.transition}`), d = {
984
- "after-enter": () => {
985
- o.value = !0, n("open");
1050
+ }), f = i(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), v = i(() => `vv-dialog--${e.transition}`), p = {
1051
+ "before-enter": () => {
1052
+ l.value = !0, t("open");
986
1053
  },
987
1054
  "after-leave": () => {
988
- o.value = !1, n("close");
1055
+ l.value = !1, t("close");
989
1056
  }
990
1057
  };
991
- De(a, () => {
992
- t.autoClose && (r.value = !1);
1058
+ at(s, () => {
1059
+ e.autoClose && (n.value = !1);
993
1060
  });
994
- function c() {
995
- r.value = !1;
1061
+ function u() {
1062
+ n.value = !1;
996
1063
  }
997
- return (s, f) => (g(), D(Be, E({ name: p(i) }, we(d)), {
998
- default: ee(() => [
999
- Pe($("dialog", E(p(l), { class: p(u) }), [
1000
- $("article", {
1064
+ return (d, c) => (m(), G(Rt, D({ name: a(v) }, Dt(p)), {
1065
+ default: _e(() => [
1066
+ ne(O("dialog", D(a(r), { class: a(f) }), [
1067
+ O("article", {
1001
1068
  ref_key: "modalWrapper",
1002
- ref: a,
1069
+ ref: s,
1003
1070
  class: "vv-dialog__wrapper"
1004
1071
  }, [
1005
- s.$slots.header || s.title ? (g(), _("header", kt, [
1006
- C(s.$slots, "header", {}, () => [
1007
- j(B(s.title) + " ", 1),
1008
- $("button", {
1072
+ d.$slots.header || d.title ? (m(), _("header", Go, [
1073
+ C(d.$slots, "header", {}, () => [
1074
+ K(E(d.title) + " ", 1),
1075
+ O("button", {
1009
1076
  type: "button",
1010
1077
  "aria-label": "Close",
1011
1078
  class: "vv-dialog__close",
1012
- onClick: Ge(c, ["prevent"])
1079
+ onClick: Xe(u, ["prevent"])
1013
1080
  }, [
1014
- ce(x, { name: "close" })
1015
- ], 8, $t)
1081
+ q(j, { name: "close" })
1082
+ ], 8, jo)
1016
1083
  ])
1017
- ])) : O("", !0),
1018
- $("div", St, [
1019
- C(s.$slots, "default")
1084
+ ])) : w("", !0),
1085
+ O("div", Mo, [
1086
+ C(d.$slots, "default")
1020
1087
  ]),
1021
- s.$slots.footer ? (g(), _("footer", At, [
1022
- C(s.$slots, "footer")
1023
- ])) : O("", !0)
1088
+ d.$slots.footer ? (m(), _("footer", Uo, [
1089
+ C(d.$slots, "footer")
1090
+ ])) : w("", !0)
1024
1091
  ], 512)
1025
1092
  ], 16), [
1026
- [Ee, p(r)]
1093
+ [Qe, a(n)]
1027
1094
  ])
1028
1095
  ]),
1029
1096
  _: 3
1030
1097
  }, 16, ["name"]));
1031
1098
  }
1032
- }), Ot = {
1033
- ...oe,
1034
- ...z,
1035
- modelValue: [String, Array, Object],
1099
+ }), Ko = {
1100
+ ...Se,
1101
+ ...J,
1102
+ modelValue: {
1103
+ type: [String, Number, Boolean, Object, Array],
1104
+ required: !0
1105
+ },
1036
1106
  labelNoResult: { type: String, default: "No results" },
1037
1107
  options: {
1038
1108
  type: Array,
@@ -1043,82 +1113,1193 @@ const bt = ["textContent"], _t = { class: "vv-input-checkbox-group__wrapper" },
1043
1113
  maxValues: [Number, String],
1044
1114
  labelKey: { type: String, default: "label" },
1045
1115
  valueKey: { type: String, default: "value" }
1046
- }, Bt = { key: 0 }, wt = ["for"], Pt = ["id", "type", "value", "checked", "disabled"], Kt = /* @__PURE__ */ P({
1047
- __name: "VvDropdown",
1048
- props: Ot,
1116
+ }, Yo = {
1117
+ key: 0,
1118
+ role: "option"
1119
+ }, Fo = ["aria-selected"], Wo = ["for"], zo = ["id", "type", "value", "checked", "disabled"], Xo = {
1120
+ name: "VvDropdown"
1121
+ }, Zo = /* @__PURE__ */ B({
1122
+ ...Xo,
1123
+ props: Ko,
1049
1124
  emits: ["update:modelValue"],
1050
- setup(e, { emit: n }) {
1051
- const t = e, r = te(), { modifiers: o, disabled: a } = S(t), { bemCssClasses: l } = w("vv-dropdown", {
1052
- modifiers: o,
1053
- disabled: a
1125
+ setup(o, { emit: t }) {
1126
+ const e = o, n = ve(), { modifiers: l, disabled: s } = x(e), { bemCssClasses: r } = L("vv-dropdown", {
1127
+ modifiers: l,
1128
+ disabled: s
1054
1129
  });
1055
- function u(s) {
1056
- return Array.isArray(t.modelValue) ? b.contains(s, t.modelValue) || b.contains(i(s), t.modelValue) : b.equals(s, t.modelValue) || b.equals(i(s), t.modelValue);
1130
+ function f(c) {
1131
+ return Array.isArray(e.modelValue) ? ce(c, e.modelValue) || ce(v(c), e.modelValue) : le(c, e.modelValue) || le(v(c), e.modelValue);
1132
+ }
1133
+ function v(c) {
1134
+ return typeof c == "string" ? c : String(c[e.valueKey]);
1057
1135
  }
1058
- function i(s) {
1059
- return typeof s == "string" ? s : String(s[t.valueKey]);
1136
+ function p(c) {
1137
+ return typeof c == "string" ? c : c[e.labelKey];
1060
1138
  }
1061
- function d(s) {
1062
- return typeof s == "string" ? s : s[t.labelKey];
1139
+ function u(c) {
1140
+ return typeof c == "string" || c.disabled === void 0 ? s.value : c.disabled;
1063
1141
  }
1064
- function c(s) {
1065
- var m, V;
1066
- const f = s.target;
1067
- let v = f.value;
1068
- if (v = (t.useObject ? (m = t.options) == null ? void 0 : m.find(
1069
- (A) => A[t.valueKey] == v
1070
- ) : null) || v, t.multiple) {
1071
- if (typeof t.maxValues < "u" && t.maxValues >= 0 && ((V = t.modelValue) == null ? void 0 : V.length) >= t.maxValues && (Array.isArray(t.modelValue) && !b.contains(v, t.modelValue) || t.maxValues == 0)) {
1072
- f.checked = !1;
1142
+ function d(c) {
1143
+ var h, k;
1144
+ const b = c.target;
1145
+ let g = b.value;
1146
+ if (g = (e.useObject ? (h = e.options) == null ? void 0 : h.find(
1147
+ (P) => P[e.valueKey] == g
1148
+ ) : null) || g, e.multiple) {
1149
+ if (typeof e.maxValues < "u" && e.maxValues >= 0 && Array.isArray(e.modelValue) && ((k = e.modelValue) == null ? void 0 : k.length) >= e.maxValues && (Array.isArray(e.modelValue) && !ce(g, e.modelValue) || e.maxValues == 0)) {
1150
+ b.checked = !1;
1073
1151
  return;
1074
1152
  }
1075
- Array.isArray(t.modelValue) ? v = b.contains(v, t.modelValue) ? b.removeFromList(v, t.modelValue) : [...t.modelValue, v] : v = [v];
1153
+ Array.isArray(e.modelValue) ? g = ce(g, e.modelValue) ? He(g, e.modelValue) : [...e.modelValue, g] : g = [g];
1076
1154
  }
1077
- n("update:modelValue", v);
1155
+ t("update:modelValue", g);
1078
1156
  }
1079
- return (s, f) => {
1080
- var v;
1081
- return g(), _("ul", {
1082
- class: N(p(l)),
1157
+ return (c, b) => {
1158
+ var g;
1159
+ return m(), _("ul", {
1160
+ class: U(a(r)),
1083
1161
  role: "listbox"
1084
1162
  }, [
1085
- (v = s.options) != null && v.length ? O("", !0) : (g(), _("li", Bt, [
1086
- $("label", null, B(s.labelNoResult), 1)
1163
+ (g = c.options) != null && g.length ? w("", !0) : (m(), _("li", Yo, [
1164
+ O("label", null, E(c.labelNoResult), 1)
1087
1165
  ])),
1088
- (g(!0), _(U, null, J(s.options, (h, m) => {
1089
- var V;
1090
- return g(), _("li", { key: m }, [
1091
- $("label", {
1092
- for: `dropdown-${m}-${p(r)}`
1093
- }, [
1094
- $("input", {
1095
- id: `dropdown-${m}-${p(r)}`,
1096
- type: s.multiple ? "checkbox" : "radio",
1097
- value: i(h),
1098
- checked: u(h),
1099
- disabled: typeof h == "object" ? (V = h.disabled) != null ? V : p(a) : p(a),
1100
- onInput: c
1101
- }, null, 40, Pt),
1102
- j(" " + B(d(h)), 1)
1103
- ], 8, wt)
1104
- ]);
1105
- }), 128))
1166
+ (m(!0), _(re, null, ge(c.options, (y, h) => (m(), _("li", {
1167
+ key: h,
1168
+ role: "option",
1169
+ "aria-selected": f(y)
1170
+ }, [
1171
+ O("label", {
1172
+ for: `dropdown-${h}-${a(n)}`
1173
+ }, [
1174
+ O("input", {
1175
+ id: `dropdown-${h}-${a(n)}`,
1176
+ type: c.multiple ? "checkbox" : "radio",
1177
+ value: v(y),
1178
+ checked: f(y),
1179
+ disabled: u(y),
1180
+ tabindex: "-1",
1181
+ "aria-hidden": "true",
1182
+ onInput: d
1183
+ }, null, 40, zo),
1184
+ K(" " + E(p(y)), 1)
1185
+ ], 8, Wo)
1186
+ ], 8, Fo))), 128))
1106
1187
  ], 2);
1107
1188
  };
1108
1189
  }
1109
1190
  });
1191
+ function bt(o, t, e) {
1192
+ const n = i(
1193
+ () => !!(o.value && t.value === "left" || e.iconLeft)
1194
+ ), l = i(
1195
+ () => !!(o.value && t.value === "right" || e.iconRight)
1196
+ ), s = i(
1197
+ () => !!(o.value && t.value === "top" || e.iconTop)
1198
+ ), r = i(
1199
+ () => !!(o.value && t.value === "bottom" || e.iconBottom)
1200
+ );
1201
+ return {
1202
+ hasIconLeft: n,
1203
+ hasIconRight: l,
1204
+ hasIconTop: s,
1205
+ hasIconBottom: r
1206
+ };
1207
+ }
1208
+ function gt(o, t) {
1209
+ const { focused: e } = nt(o);
1210
+ return et(e, (n) => {
1211
+ t(n ? "focus" : "blur", a(o));
1212
+ }), {
1213
+ focused: e
1214
+ };
1215
+ }
1216
+ function yt(o, t, e = 0) {
1217
+ let n;
1218
+ return typeof e == "string" && (e = parseInt(e)), i({
1219
+ get: () => o == null ? void 0 : o.value,
1220
+ set: (l) => {
1221
+ n && clearTimeout(n), n = setTimeout(() => {
1222
+ t("update:modelValue", l);
1223
+ }, e);
1224
+ }
1225
+ });
1226
+ }
1227
+ function ht(o, t) {
1228
+ const e = i(() => {
1229
+ const s = a(o);
1230
+ return Ue(s) ? s.length : 0;
1231
+ }), n = i(() => {
1232
+ const s = a(o) || "";
1233
+ return !Ue(s) || t.mode === !1 ? 0 : t.mode === !0 ? s.length : a(t.upperLimit) - s.length;
1234
+ }), l = i(() => t.mode === !1 ? "" : t.mode === !0 && t.upperLimit && t.upperLimit > 0 ? `${n.value}/${a(t.upperLimit)}` : n.value);
1235
+ return {
1236
+ textLength: e,
1237
+ textLimitLength: n,
1238
+ formattedTextLimitLength: l
1239
+ };
1240
+ }
1241
+ const fe = {
1242
+ TEXT: "text",
1243
+ PASSWORD: "password",
1244
+ DATE: "date",
1245
+ DATETIME_LOCAL: "datetime-local",
1246
+ NUMBER: "number",
1247
+ TIME: "time",
1248
+ EMAIL: "email",
1249
+ TEL: "tel",
1250
+ URL: "url",
1251
+ COLOR: "color",
1252
+ SEARCH: "search",
1253
+ FILE: "file"
1254
+ }, Le = {
1255
+ LEFT: "left",
1256
+ RIGHT: "right"
1257
+ }, me = {
1258
+ PASSWORD_SHOW: "eye-on",
1259
+ PASSWORD_HIDE: "eye-off",
1260
+ DATE: "calendar",
1261
+ TIME: "time",
1262
+ COLOR: "color",
1263
+ SEARCH: "close"
1264
+ }, N = {
1265
+ TYPES: fe,
1266
+ ICON_POSITIONS: Le,
1267
+ TYPES_ICON: me
1268
+ }, Jo = ["update:modelValue", "focus", "blur", "keyup"], Qo = {
1269
+ ...se,
1270
+ ...ie,
1271
+ ...ue,
1272
+ ...Ie,
1273
+ ...J,
1274
+ ...ct,
1275
+ ...vt,
1276
+ modelValue: {
1277
+ type: [String, Number],
1278
+ default: void 0
1279
+ },
1280
+ type: {
1281
+ type: String,
1282
+ default: fe.TEXT,
1283
+ validator: (o) => Object.values(fe).includes(o)
1284
+ },
1285
+ min: [Number, Date],
1286
+ max: [Number, Date],
1287
+ step: { type: Number, default: 1 },
1288
+ labelStepUp: {
1289
+ type: String,
1290
+ default: "Increase value"
1291
+ },
1292
+ labelStepDown: {
1293
+ type: String,
1294
+ default: "Decrease value"
1295
+ },
1296
+ labelShowPassword: {
1297
+ type: String,
1298
+ default: "Show password"
1299
+ },
1300
+ labelHidePassword: {
1301
+ type: String,
1302
+ default: "Hide password"
1303
+ },
1304
+ labelClear: {
1305
+ type: String,
1306
+ default: "Clear"
1307
+ },
1308
+ iconShowPassword: {
1309
+ type: String,
1310
+ default: me.PASSWORD_SHOW
1311
+ },
1312
+ iconHidePassword: {
1313
+ type: String,
1314
+ default: me.PASSWORD_HIDE
1315
+ },
1316
+ iconClear: {
1317
+ type: String,
1318
+ default: me.SEARCH
1319
+ },
1320
+ icon: {
1321
+ type: [String, Object],
1322
+ default: ""
1323
+ },
1324
+ iconPosition: {
1325
+ type: String,
1326
+ validation: (o) => Object.values(Le).includes(o),
1327
+ default: Le.RIGHT
1328
+ },
1329
+ floating: Boolean,
1330
+ debounce: [String, Number],
1331
+ tabindex: { type: [String, Number], default: 0 }
1332
+ }, Ke = B({
1333
+ components: {
1334
+ VvIcon: j
1335
+ },
1336
+ props: {
1337
+ disabled: {
1338
+ type: Boolean,
1339
+ default: !1
1340
+ },
1341
+ labelShow: {
1342
+ type: String,
1343
+ default: "Show password"
1344
+ },
1345
+ labelHide: {
1346
+ type: String,
1347
+ default: "Hide password"
1348
+ },
1349
+ iconShow: {
1350
+ type: String,
1351
+ default: me.PASSWORD_SHOW
1352
+ },
1353
+ iconHide: {
1354
+ type: String,
1355
+ default: me.PASSWORD_HIDE
1356
+ }
1357
+ },
1358
+ emits: ["toggle-password"],
1359
+ setup(o, { emit: t }) {
1360
+ const e = H(!1), n = i(
1361
+ () => e.value ? o.iconHide : o.iconShow
1362
+ );
1363
+ function l(s) {
1364
+ s == null || s.stopPropagation(), o.disabled || (e.value = !e.value, t("toggle-password", e.value));
1365
+ }
1366
+ return {
1367
+ active: e,
1368
+ activeIcon: n,
1369
+ onClick: l
1370
+ };
1371
+ },
1372
+ render() {
1373
+ const o = W(j, {
1374
+ name: this.activeIcon,
1375
+ class: "vv-input-text__action-icon"
1376
+ });
1377
+ return W(
1378
+ "button",
1379
+ {
1380
+ disabled: this.disabled,
1381
+ class: "vv-input-text__action",
1382
+ ariaLabel: this.active ? this.labelHide : this.labelShow,
1383
+ type: "button",
1384
+ onClick: this.onClick
1385
+ },
1386
+ o
1387
+ );
1388
+ }
1389
+ }), Re = B({
1390
+ components: {
1391
+ VvIcon: j
1392
+ },
1393
+ props: {
1394
+ disabled: {
1395
+ type: Boolean,
1396
+ default: !1
1397
+ },
1398
+ label: {
1399
+ type: String
1400
+ },
1401
+ mode: {
1402
+ type: String,
1403
+ validator: (o) => ["up", "down"].includes(o),
1404
+ default: "up"
1405
+ }
1406
+ },
1407
+ emits: ["step-up", "step-down"],
1408
+ setup(o, { emit: t }) {
1409
+ const e = i(() => o.mode === "up");
1410
+ return {
1411
+ isUp: e,
1412
+ onClick: (l) => {
1413
+ l == null || l.stopPropagation(), o.disabled || t(e.value ? "step-up" : "step-down");
1414
+ }
1415
+ };
1416
+ },
1417
+ render() {
1418
+ return W("button", {
1419
+ class: [
1420
+ "vv-input-text__action-chevron",
1421
+ this.isUp && "vv-input-text__action-chevron-up"
1422
+ ],
1423
+ disabled: this.disabled,
1424
+ ariaLabel: this.label,
1425
+ onClick: this.onClick
1426
+ });
1427
+ }
1428
+ }), Ye = B({
1429
+ components: {
1430
+ VvIcon: j
1431
+ },
1432
+ props: {
1433
+ disabled: {
1434
+ type: Boolean,
1435
+ default: !1
1436
+ },
1437
+ label: {
1438
+ type: String,
1439
+ default: "Clear"
1440
+ },
1441
+ icon: {
1442
+ type: String,
1443
+ default: "close"
1444
+ }
1445
+ },
1446
+ emits: ["clear"],
1447
+ setup(o, { emit: t }) {
1448
+ function e(n) {
1449
+ n == null || n.stopPropagation(), o.disabled || t("clear");
1450
+ }
1451
+ return {
1452
+ onClick: e
1453
+ };
1454
+ },
1455
+ render() {
1456
+ const o = W(j, {
1457
+ name: this.icon,
1458
+ class: "vv-input-text__action-icon"
1459
+ });
1460
+ return W(
1461
+ "button",
1462
+ {
1463
+ disabled: this.disabled,
1464
+ class: "vv-input-text__action",
1465
+ ariaLabel: this.label,
1466
+ type: "button",
1467
+ onClick: this.onClick
1468
+ },
1469
+ o
1470
+ );
1471
+ }
1472
+ });
1473
+ function De(o, t) {
1474
+ return {
1475
+ name: "VvInputTextActions",
1476
+ components: {
1477
+ VvIcon: j,
1478
+ VvInputPasswordAction: Ke,
1479
+ VvInputStepAction: Re,
1480
+ VvInputClearAction: Ye
1481
+ },
1482
+ setup() {
1483
+ return {
1484
+ isDisabled: i(() => t.disabled || t.readonly),
1485
+ labelStepUp: t.labelStepUp,
1486
+ labelStepDown: t.labelStepDown,
1487
+ labelShowPassword: t.labelShowPassword,
1488
+ labelHidePassword: t.labelHidePassword,
1489
+ labelClear: t.labelClear,
1490
+ iconShowPassword: t.iconShowPassword,
1491
+ iconHidePassword: t.iconHidePassword
1492
+ };
1493
+ },
1494
+ render() {
1495
+ let e = null;
1496
+ switch (o) {
1497
+ case fe.SEARCH: {
1498
+ const { onClear: n } = this.$attrs;
1499
+ e = [
1500
+ W(Ye, {
1501
+ disabled: this.isDisabled,
1502
+ label: this.labelShowPassword,
1503
+ onClear: n
1504
+ })
1505
+ ];
1506
+ break;
1507
+ }
1508
+ case fe.PASSWORD: {
1509
+ const { onTogglePassword: n } = this.$attrs;
1510
+ e = [
1511
+ W(Ke, {
1512
+ disabled: this.isDisabled,
1513
+ onTogglePassword: n,
1514
+ labelShow: this.labelShowPassword,
1515
+ labelHide: this.labelHidePassword,
1516
+ iconShow: this.iconShowPassword,
1517
+ iconHide: this.iconHidePassword
1518
+ })
1519
+ ];
1520
+ break;
1521
+ }
1522
+ case fe.NUMBER: {
1523
+ const { onStepUp: n, onStepDown: l } = this.$attrs;
1524
+ e = [
1525
+ W(Re, {
1526
+ mode: "up",
1527
+ disabled: this.isDisabled || t.max !== void 0 && t.modelValue === t.max,
1528
+ label: this.labelStepUp,
1529
+ onStepUp: n,
1530
+ onStepDown: l
1531
+ }),
1532
+ W(Re, {
1533
+ mode: "down",
1534
+ disabled: this.isDisabled || t.min !== void 0 && t.modelValue === t.min,
1535
+ label: this.labelStepDown,
1536
+ onStepUp: n,
1537
+ onStepDown: l
1538
+ })
1539
+ ];
1540
+ break;
1541
+ }
1542
+ }
1543
+ return Array.isArray(e) ? W("div", { class: "vv-input-text__actions-group" }, e) : e;
1544
+ }
1545
+ };
1546
+ }
1547
+ const ea = ["for"], ta = { class: "vv-input-text__wrapper" }, oa = ["id", "disabled", "readonly", "required"], aa = {
1548
+ key: 1,
1549
+ class: "vv-input-text__limit"
1550
+ }, na = {
1551
+ name: "VvInputText"
1552
+ }, on = /* @__PURE__ */ B({
1553
+ ...na,
1554
+ props: Qo,
1555
+ emits: Jo,
1556
+ setup(o, { emit: t }) {
1557
+ const e = o, n = oe(), l = H(), { icon: s, iconPosition: r, label: f, modelValue: v, limit: p } = x(e), u = i(() => String(e.id || ve())), d = i(() => `${u.value}-hint`), c = i(
1558
+ () => e.floating && z(e.placeholder) ? " " : e.placeholder
1559
+ ), b = yt(v, t, e.debounce), g = H(!1), y = i(() => e.type === N.TYPES.PASSWORD), h = () => {
1560
+ g.value = !g.value;
1561
+ }, k = i(
1562
+ () => [N.TYPES.TIME, N.TYPES.DATETIME_LOCAL, N.TYPES.DATE].includes(
1563
+ e.type
1564
+ )
1565
+ ), P = i(() => e.type === N.TYPES.NUMBER), I = () => {
1566
+ S.value || (l.value.stepUp(), b.value = a(l).value);
1567
+ }, A = () => {
1568
+ S.value || (l.value.stepDown(), b.value = a(l).value);
1569
+ }, R = i(() => e.type === N.TYPES.SEARCH), M = () => {
1570
+ b.value = null;
1571
+ }, { hasIconLeft: X, hasIconRight: Z } = bt(s, r, {
1572
+ iconLeft: n["icon-left"],
1573
+ iconRight: n["icon-right"]
1574
+ }), ae = i(() => typeof s.value == "string" ? { name: s.value } : s.value), Y = i(() => {
1575
+ switch (e.type) {
1576
+ case N.TYPES.COLOR:
1577
+ return { name: N.TYPES_ICON.COLOR };
1578
+ case N.TYPES.DATE:
1579
+ case N.TYPES.DATETIME_LOCAL:
1580
+ return { name: N.TYPES_ICON.DATE };
1581
+ case N.TYPES.TIME:
1582
+ return { name: N.TYPES_ICON.TIME };
1583
+ default:
1584
+ return "";
1585
+ }
1586
+ }), { formattedTextLimitLength: $ } = ht(b, {
1587
+ mode: e.limit,
1588
+ upperLimit: e.maxlength || 0
1589
+ }), { focused: V } = gt(l, t), S = i(() => e.disabled || e.readonly), T = i(() => S.value ? -1 : e.tabindex), F = i(() => !z(v)), Ee = i(() => {
1590
+ if (e.error === !0)
1591
+ return !0;
1592
+ if (e.valid === !0)
1593
+ return !1;
1594
+ }), { bemCssClasses: Te } = L("vv-input-text", {
1595
+ modifiers: e.modifiers,
1596
+ valid: e.valid,
1597
+ invalid: e.error,
1598
+ loading: e.loading,
1599
+ iconLeft: X,
1600
+ iconRight: Z.value || !z(Y),
1601
+ floating: e.floating && !z(e.label),
1602
+ dirty: F,
1603
+ focus: V
1604
+ }), _t = i(() => {
1605
+ const Q = (() => y.value && g.value || k.value && !F.value && !V.value ? N.TYPES.TEXT : e.type)();
1606
+ return {
1607
+ type: Q,
1608
+ placeholder: c.value,
1609
+ name: e.name,
1610
+ autocomplete: e.autocomplete,
1611
+ minlength: e.minlength,
1612
+ maxlength: e.maxlength,
1613
+ min: e.min,
1614
+ max: e.max,
1615
+ step: Q === N.TYPES.NUMBER ? e.step : void 0,
1616
+ tabindex: T.value,
1617
+ "aria-invalid": Ee.value,
1618
+ "aria-describedby": !je.value && Vt.value ? d.value : void 0,
1619
+ "aria-errormessage": je.value ? d.value : void 0
1620
+ };
1621
+ }), Ge = i(() => ({
1622
+ valid: e.valid,
1623
+ error: e.error,
1624
+ modelValue: e.modelValue
1625
+ })), { HintSlot: St, hasHint: Vt, hasErrors: je } = de(e, n), $t = De(
1626
+ N.TYPES.PASSWORD,
1627
+ e
1628
+ ), Ct = De(N.TYPES.NUMBER, e), kt = De(N.TYPES.SEARCH, e);
1629
+ return tt(() => {
1630
+ e.autofocus && (V.value = !0);
1631
+ }), (Q, Ve) => (m(), _("div", {
1632
+ class: U(a(Te))
1633
+ }, [
1634
+ a(f) ? (m(), _("label", {
1635
+ key: 0,
1636
+ for: a(u),
1637
+ class: "vv-input-text__label"
1638
+ }, E(a(f)), 9, ea)) : w("", !0),
1639
+ O("div", ta, [
1640
+ a(X) ? C(Q.$slots, "icon-left", te(D({ key: 0 }, a(Ge))), () => [
1641
+ q(j, D({ class: "vv-input-text__icon-left" }, a(ae)), null, 16)
1642
+ ]) : w("", !0),
1643
+ ne(O("input", D({
1644
+ id: a(u),
1645
+ ref_key: "input",
1646
+ ref: l,
1647
+ "onUpdate:modelValue": Ve[0] || (Ve[0] = (Be) => be(b) ? b.value = Be : null)
1648
+ }, a(_t), {
1649
+ disabled: Q.disabled,
1650
+ readonly: Q.readonly,
1651
+ required: Q.required,
1652
+ onKeyup: Ve[1] || (Ve[1] = (Be) => t("keyup", Be))
1653
+ }), null, 16, oa), [
1654
+ [Nt, a(b)]
1655
+ ]),
1656
+ C(Q.$slots, "icon-right", te(he(a(Ge))), () => [
1657
+ a(Z) || a(Y) ? (m(), G(j, te(D({ key: 0 }, a(Z) ? a(ae) : a(Y))), null, 16)) : a(y) ? (m(), G(a($t), {
1658
+ key: 1,
1659
+ onTogglePassword: h
1660
+ })) : a(P) ? (m(), G(a(Ct), {
1661
+ key: 2,
1662
+ onStepUp: I,
1663
+ onStepDown: A
1664
+ })) : a(R) ? (m(), G(a(kt), {
1665
+ key: 3,
1666
+ onClear: M
1667
+ })) : w("", !0)
1668
+ ]),
1669
+ a(p) ? (m(), _("span", aa, [
1670
+ C(Q.$slots, "limit", {}, () => [
1671
+ K(E(a($)), 1)
1672
+ ])
1673
+ ])) : w("", !0)
1674
+ ]),
1675
+ q(a(St), {
1676
+ id: a(d),
1677
+ class: "vv-input-text__hint"
1678
+ }, null, 8, ["id"])
1679
+ ], 2));
1680
+ }
1681
+ }), la = {
1682
+ ...se,
1683
+ ...ie,
1684
+ ...ue,
1685
+ ...Ie,
1686
+ ...Se,
1687
+ ...ut,
1688
+ ...J,
1689
+ id: [String, Number],
1690
+ name: { type: String, required: !0 },
1691
+ modelValue: {
1692
+ type: [String, Number, Boolean, Object, Array],
1693
+ default: void 0
1694
+ },
1695
+ label: String,
1696
+ required: Boolean,
1697
+ placeholder: String,
1698
+ options: {
1699
+ type: Array,
1700
+ required: !0
1701
+ },
1702
+ useObject: Boolean,
1703
+ labelKey: { type: String, default: "label" },
1704
+ valueKey: { type: String, default: "value" },
1705
+ iconLeft: String,
1706
+ iconRight: String,
1707
+ modifiers: [String, Array],
1708
+ tabindex: { type: [String, Number], default: 0 }
1709
+ }, ra = ["update:modelValue"], sa = ["for"], ia = { class: "vv-select__wrapper" }, ua = ["id", "disabled", "required"], da = {
1710
+ key: 0,
1711
+ value: void 0,
1712
+ disabled: ""
1713
+ }, ca = ["disabled", "value"], va = {
1714
+ name: "VvNativeSelect"
1715
+ }, pa = /* @__PURE__ */ B({
1716
+ ...va,
1717
+ props: la,
1718
+ emits: ra,
1719
+ setup(o, { emit: t }) {
1720
+ const e = o, n = oe(), { HintSlot: l, hasHint: s, hasErrors: r } = de(e, n), {
1721
+ modifiers: f,
1722
+ disabled: v,
1723
+ readonly: p,
1724
+ loading: u,
1725
+ iconLeft: d,
1726
+ iconRight: c,
1727
+ error: b,
1728
+ valid: g
1729
+ } = x(e), y = i(() => String(e.id || ve())), h = i(() => `${y.value}-hint`), k = i(() => !z(e.modelValue)), P = i(() => e.disabled || e.readonly), I = i(() => P.value ? -1 : e.tabindex), A = i(() => {
1730
+ if (e.error === !0)
1731
+ return !0;
1732
+ if (e.valid === !0)
1733
+ return !1;
1734
+ }), { bemCssClasses: R } = L("vv-select", {
1735
+ modifiers: f,
1736
+ loading: u,
1737
+ readonly: p,
1738
+ iconLeft: d,
1739
+ iconRight: c,
1740
+ valid: g,
1741
+ invalid: b,
1742
+ dirty: k
1743
+ }), M = i(() => ({
1744
+ name: e.name,
1745
+ tabindex: I.value,
1746
+ "aria-invalid": A.value,
1747
+ "aria-describedby": !r.value && s.value ? h.value : void 0,
1748
+ "aria-errormessage": r.value ? h.value : void 0
1749
+ }));
1750
+ function X($) {
1751
+ return typeof $ == "string" ? $ : $[e.valueKey];
1752
+ }
1753
+ function Z($) {
1754
+ return typeof $ == "string" ? $ : $[e.labelKey];
1755
+ }
1756
+ function ae($) {
1757
+ return typeof $ == "string" || $.disabled === void 0 ? v.value : $.disabled;
1758
+ }
1759
+ const Y = i({
1760
+ get: () => {
1761
+ var $;
1762
+ return typeof e.modelValue == "object" ? ($ = e.modelValue) == null ? void 0 : $[e.valueKey] : e.modelValue;
1763
+ },
1764
+ set: ($) => {
1765
+ var S;
1766
+ const V = e.useObject ? (S = e.options) == null ? void 0 : S.find(
1767
+ (T) => T[e.valueKey] === $
1768
+ ) : void 0;
1769
+ t("update:modelValue", V ?? $);
1770
+ }
1771
+ });
1772
+ return ($, V) => (m(), _("div", {
1773
+ class: U(a(R))
1774
+ }, [
1775
+ $.label ? (m(), _("label", {
1776
+ key: 0,
1777
+ for: a(y)
1778
+ }, E($.label), 9, sa)) : w("", !0),
1779
+ O("div", ia, [
1780
+ C($.$slots, "icon-left", {}, () => [
1781
+ a(d) ? (m(), G(j, {
1782
+ key: 0,
1783
+ name: a(d)
1784
+ }, null, 8, ["name"])) : w("", !0)
1785
+ ]),
1786
+ ne(O("select", D({
1787
+ id: a(y),
1788
+ "onUpdate:modelValue": V[0] || (V[0] = (S) => be(Y) ? Y.value = S : null)
1789
+ }, a(M), {
1790
+ disabled: a(P),
1791
+ required: $.required
1792
+ }), [
1793
+ $.placeholder ? (m(), _("option", da, E($.placeholder), 1)) : w("", !0),
1794
+ (m(!0), _(re, null, ge($.options, (S, T) => (m(), _("option", {
1795
+ key: T,
1796
+ disabled: ae(S),
1797
+ value: X(S)
1798
+ }, E(Z(S)), 9, ca))), 128))
1799
+ ], 16, ua), [
1800
+ [Lt, a(Y)]
1801
+ ]),
1802
+ C($.$slots, "icon-right", {}, () => [
1803
+ a(c) ? (m(), G(j, {
1804
+ key: 0,
1805
+ name: a(c)
1806
+ }, null, 8, ["name"])) : w("", !0)
1807
+ ])
1808
+ ]),
1809
+ q(a(l), {
1810
+ id: a(h),
1811
+ class: "vv-select__hint"
1812
+ }, null, 8, ["id"])
1813
+ ], 2));
1814
+ }
1815
+ }), fa = {
1816
+ ...J,
1817
+ value: {
1818
+ type: [Number, String],
1819
+ default: void 0
1820
+ },
1821
+ max: {
1822
+ type: [Number, String]
1823
+ },
1824
+ ariaLabel: {
1825
+ type: String,
1826
+ default: "progress-bar"
1827
+ }
1828
+ }, ma = {
1829
+ name: "VvProgress"
1830
+ }, an = /* @__PURE__ */ B({
1831
+ ...ma,
1832
+ props: fa,
1833
+ setup(o) {
1834
+ const t = o, { value: e, max: n, ariaLabel: l } = x(t), s = i(() => t.value === void 0), { bemCssClasses: r } = L("vv-progress", {
1835
+ modifiers: t.modifiers,
1836
+ indeterminate: s
1837
+ });
1838
+ return (f, v) => (m(), _("progress", D({ role: "progressbar" }, {
1839
+ class: a(r),
1840
+ ariaLabel: a(l),
1841
+ max: a(n),
1842
+ value: a(e)
1843
+ }), null, 16));
1844
+ }
1845
+ }), ba = {
1846
+ ...se,
1847
+ ...ie,
1848
+ ...ue,
1849
+ id: [String, Number],
1850
+ name: { type: String, required: !0 },
1851
+ value: [String, Number, Boolean],
1852
+ modelValue: [Object, Number, Boolean, String],
1853
+ label: String,
1854
+ disabled: Boolean,
1855
+ readonly: Boolean,
1856
+ tabindex: { type: [String, Number], default: 0 }
1857
+ }, ga = ["click", "update:modelValue", "change", "blur"];
1858
+ function ya(o, t) {
1859
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = we(rt), { valid: s, error: r } = x(o), f = l("modelValue", o, t), v = l("readonly", o), p = l("disabled", o);
1860
+ return {
1861
+ valid: s,
1862
+ error: r,
1863
+ group: e,
1864
+ isInGroup: n,
1865
+ modelValue: f,
1866
+ readonly: v,
1867
+ disabled: p
1868
+ };
1869
+ }
1870
+ const ha = ["for"], _a = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Sa = {
1871
+ name: "VvRadio"
1872
+ }, Va = /* @__PURE__ */ B({
1873
+ ...Sa,
1874
+ props: ba,
1875
+ emits: ga,
1876
+ setup(o, { emit: t }) {
1877
+ const e = o, n = oe(), { disabled: l, readonly: s, modelValue: r, valid: f, error: v } = ya(
1878
+ e,
1879
+ t
1880
+ ), p = H(), u = i(
1881
+ () => e.id !== void 0 ? String(e.id) : void 0
1882
+ ), d = i(() => l.value || s.value), c = i(() => d.value ? -1 : e.tabindex), b = i(() => {
1883
+ if (e.error === !0)
1884
+ return !0;
1885
+ if (e.valid === !0)
1886
+ return !1;
1887
+ }), g = i(
1888
+ () => Array.isArray(r.value) ? ce(e.value, r.value) : le(e.value, r.value)
1889
+ ), y = i(
1890
+ () => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
1891
+ ), h = i({
1892
+ get() {
1893
+ return g.value ? y.value : null;
1894
+ },
1895
+ set(I) {
1896
+ if (Array.isArray(r.value)) {
1897
+ r.value = I ? [...r.value, e.value] : He(e.value, r.value);
1898
+ return;
1899
+ }
1900
+ r.value = e.value, t("change", I);
1901
+ }
1902
+ }), { bemCssClasses: k } = L("vv-radio", {
1903
+ valid: f,
1904
+ invalid: v,
1905
+ disabled: l,
1906
+ readonly: s
1907
+ }), { HintSlot: P } = de(e, n);
1908
+ return (I, A) => (m(), _("label", {
1909
+ class: U(a(k)),
1910
+ for: a(u)
1911
+ }, [
1912
+ ne(O("input", {
1913
+ id: a(u),
1914
+ ref_key: "input",
1915
+ ref: p,
1916
+ "onUpdate:modelValue": A[0] || (A[0] = (R) => be(h) ? h.value = R : null),
1917
+ type: "radio",
1918
+ class: "vv-radio__input",
1919
+ name: I.name,
1920
+ disabled: a(d),
1921
+ value: a(y),
1922
+ tabindex: a(c),
1923
+ "aria-invalid": a(b)
1924
+ }, null, 8, _a), [
1925
+ [xt, a(h)]
1926
+ ]),
1927
+ C(I.$slots, "default", { value: a(r) }, () => [
1928
+ K(E(I.label), 1)
1929
+ ]),
1930
+ q(a(P), {
1931
+ class: "vv-radio__hint",
1932
+ params: { value: a(r) }
1933
+ }, null, 8, ["params"])
1934
+ ], 10, ha));
1935
+ }
1936
+ }), $a = ["update:modelValue"], Ca = {
1937
+ ...se,
1938
+ ...ie,
1939
+ ...dt,
1940
+ ...ue,
1941
+ modelValue: null,
1942
+ label: { type: String, default: "" },
1943
+ name: { type: String, default: "", required: !0 },
1944
+ disabled: { type: Boolean, default: !1 },
1945
+ readonly: { type: Boolean, default: !1 },
1946
+ vertical: { type: Boolean, default: !1 }
1947
+ }, ka = ["textContent"], Aa = { class: "vv-radio-group__wrapper" }, Pa = {
1948
+ name: "VvRadioGroup"
1949
+ }, nn = /* @__PURE__ */ B({
1950
+ ...Pa,
1951
+ props: Ca,
1952
+ emits: $a,
1953
+ setup(o, { emit: t }) {
1954
+ const e = o, n = oe(), { HintSlot: l } = de(e, n), s = Ae(e, "modelValue", t), { disabled: r, readonly: f, vertical: v, valid: p, error: u } = x(e);
1955
+ Oe({
1956
+ key: rt,
1957
+ modelValue: s,
1958
+ disabled: r,
1959
+ readonly: f
1960
+ });
1961
+ const { getOptionLabel: c, getOptionValue: b } = mt(e), { bemCssClasses: g } = L("vv-radio-group", {
1962
+ horizontal: i(() => !v.value),
1963
+ valid: p,
1964
+ invalid: u
1965
+ }), y = (h, k) => ({
1966
+ id: `${e.name}_opt${k}`,
1967
+ name: e.name,
1968
+ label: c(h),
1969
+ value: b(h)
1970
+ });
1971
+ return (h, k) => (m(), _("fieldset", {
1972
+ class: U(a(g))
1973
+ }, [
1974
+ h.label ? (m(), _("legend", {
1975
+ key: 0,
1976
+ textContent: E(h.label)
1977
+ }, null, 8, ka)) : w("", !0),
1978
+ O("div", Aa, [
1979
+ h.options.length > 0 ? (m(!0), _(re, { key: 0 }, ge(h.options, (P, I) => (m(), G(Va, D({ key: I }, y(P, I)), null, 16))), 128)) : C(h.$slots, "default", { key: 1 })
1980
+ ]),
1981
+ q(a(l), { class: "vv-radio-group__hint" })
1982
+ ], 2));
1983
+ }
1984
+ }), wa = {
1985
+ ...se,
1986
+ ...ie,
1987
+ ...ue,
1988
+ ...Ie,
1989
+ ...Se,
1990
+ ...ut,
1991
+ ...J,
1992
+ modelValue: {
1993
+ type: [String, Number, Boolean, Object, Array],
1994
+ default: void 0
1995
+ },
1996
+ label: String,
1997
+ labelNoResult: { type: String, default: "No results" },
1998
+ placeholder: String,
1999
+ searchable: Boolean,
2000
+ searchPlaceholder: String,
2001
+ debounceSearch: {
2002
+ type: [Number, String],
2003
+ default: 0
2004
+ },
2005
+ options: {
2006
+ type: Array,
2007
+ required: !0
2008
+ },
2009
+ useObject: Boolean,
2010
+ multiple: Boolean,
2011
+ maxValues: [Number, String],
2012
+ separator: { type: String, default: ", " },
2013
+ labelKey: { type: String, default: "label" },
2014
+ valueKey: { type: String, default: "value" },
2015
+ iconLeft: String,
2016
+ iconRight: String,
2017
+ native: Boolean,
2018
+ tabindex: {
2019
+ type: [Number, String],
2020
+ default: 0
2021
+ }
2022
+ }, Oa = ["id"], Ia = ["id", "for"], Ea = ["tabindex"], Ta = ["id", "placeholder"], Ba = {
2023
+ name: "VvSelect"
2024
+ }, ln = /* @__PURE__ */ B({
2025
+ ...Ba,
2026
+ props: wa,
2027
+ emits: ["update:modelValue", "change:search"],
2028
+ setup(o, { emit: t }) {
2029
+ const e = o, n = oe(), { HintSlot: l } = de(e, n), s = H(), r = H();
2030
+ nt(r, { initialValue: !0 });
2031
+ const f = ve(), v = H(""), p = jt(
2032
+ v,
2033
+ Number(e.debounceSearch)
2034
+ ), u = H(!1), {
2035
+ modifiers: d,
2036
+ disabled: c,
2037
+ readonly: b,
2038
+ loading: g,
2039
+ iconLeft: y,
2040
+ iconRight: h,
2041
+ valid: k,
2042
+ error: P
2043
+ } = x(e);
2044
+ et(
2045
+ p,
2046
+ () => t("change:search", p.value)
2047
+ );
2048
+ const I = i(() => !z(e.modelValue)), A = i(() => c.value || b.value ? -1 : e.tabindex), { bemCssClasses: R } = L("vv-select", {
2049
+ modifiers: d,
2050
+ disabled: c,
2051
+ loading: g,
2052
+ readonly: b,
2053
+ iconLeft: y,
2054
+ iconRight: h,
2055
+ valid: k,
2056
+ invalid: P,
2057
+ dirty: I
2058
+ }), M = i(
2059
+ () => {
2060
+ var V;
2061
+ return (V = e.options) == null ? void 0 : V.every((S) => typeof S == "object");
2062
+ }
2063
+ ), X = i(
2064
+ () => e.searchable ? Z.value : e.options
2065
+ ), Z = i(() => {
2066
+ var V;
2067
+ return (V = e.options) == null ? void 0 : V.filter((S) => typeof S == "string" ? S.toLowerCase().includes(p.value.toLowerCase().trim()) : typeof S[e.labelKey] == "string" ? S[e.labelKey].toLowerCase().includes(p.value.toLowerCase().trim()) : !1);
2068
+ }), ae = i(() => {
2069
+ var S, T;
2070
+ if (e.multiple && Array.isArray(e.modelValue) && ((S = e.modelValue) != null && S.length))
2071
+ return M.value ? Kt(
2072
+ e.options,
2073
+ e.modelValue,
2074
+ e.valueKey
2075
+ ).map((F) => F[e.labelKey]).join(e.separator) : e.modelValue.join(e.separator);
2076
+ const V = e.useObject ? e.modelValue : (T = e.options) == null ? void 0 : T.find(
2077
+ (F) => typeof F == "object" ? F[e.valueKey] == e.modelValue : F == e.modelValue
2078
+ );
2079
+ return typeof V == "object" ? V == null ? void 0 : V[e.labelKey] : V;
2080
+ });
2081
+ at(s, () => {
2082
+ s.value.open = !1;
2083
+ });
2084
+ function Y(V) {
2085
+ const S = V.target;
2086
+ u.value = S.open;
2087
+ }
2088
+ function $(V) {
2089
+ s.value && !e.multiple && (s.value.open = !1), t("update:modelValue", V);
2090
+ }
2091
+ return (V, S) => V.native ? (m(), G(pa, D({ key: 1 }, e, {
2092
+ "onUpdate:modelValue": S[4] || (S[4] = (T) => t("update:modelValue", T))
2093
+ }), null, 16)) : (m(), _("div", {
2094
+ key: 0,
2095
+ id: a(f),
2096
+ class: U(a(R))
2097
+ }, [
2098
+ V.label ? (m(), _("label", {
2099
+ key: 0,
2100
+ id: `${a(f)}-label`,
2101
+ for: V.searchable && u.value ? `${a(f)}-input` : void 0
2102
+ }, E(V.label), 9, Ia)) : w("", !0),
2103
+ O("details", {
2104
+ ref_key: "dropdown",
2105
+ ref: s,
2106
+ class: "vv-select__wrapper",
2107
+ onClick: S[2] || (S[2] = (T) => a(c) || a(b) ? T.preventDefault() : null),
2108
+ onKeyup: S[3] || (S[3] = Me((T) => s.value.open = !1, ["esc"])),
2109
+ onToggle: Y
2110
+ }, [
2111
+ O("summary", {
2112
+ class: "vv-select__input",
2113
+ tabindex: a(A),
2114
+ onKeyup: S[1] || (S[1] = Me((T) => V.searchable ? T.preventDefault() : null, ["space"]))
2115
+ }, [
2116
+ V.searchable && u.value ? ne((m(), _("input", {
2117
+ key: 0,
2118
+ id: `${a(f)}-input`,
2119
+ ref_key: "inputSearch",
2120
+ ref: r,
2121
+ "onUpdate:modelValue": S[0] || (S[0] = (T) => v.value = T),
2122
+ role: "combobox",
2123
+ placeholder: V.searchPlaceholder
2124
+ }, null, 8, Ta)), [
2125
+ [ot, v.value]
2126
+ ]) : (m(), _(re, { key: 1 }, [
2127
+ K(E(a(ae) || V.placeholder), 1)
2128
+ ], 64))
2129
+ ], 40, Ea),
2130
+ q(Zo, D({
2131
+ id: `${a(f)}-dropdown`
2132
+ }, {
2133
+ ...e,
2134
+ options: a(X)
2135
+ }, { "onUpdate:modelValue": $ }), null, 16, ["id"])
2136
+ ], 544),
2137
+ q(a(l), { class: "vv-select__hint" })
2138
+ ], 10, Oa));
2139
+ }
2140
+ }), Fe = {
2141
+ LEFT: "left",
2142
+ RIGHT: "right"
2143
+ }, Ra = {
2144
+ hard: "hard",
2145
+ soft: "soft"
2146
+ }, Da = ["update:modelValue", "focus", "blur"], Na = {
2147
+ ...se,
2148
+ ...ie,
2149
+ ...ue,
2150
+ ...Ie,
2151
+ ...J,
2152
+ ...ct,
2153
+ ...vt,
2154
+ ...ao,
2155
+ id: [String, Number],
2156
+ modelValue: {
2157
+ type: [String],
2158
+ default: void 0
2159
+ },
2160
+ cols: { type: Number, default: 50 },
2161
+ rows: { type: Number, default: 5 },
2162
+ icon: { type: String, default: "" },
2163
+ iconPosition: {
2164
+ type: String,
2165
+ validation: (o) => Object.values(Fe).includes(o),
2166
+ default: Fe.RIGHT
2167
+ },
2168
+ floating: Boolean,
2169
+ wrap: { type: String, default: Ra.soft },
2170
+ autoclear: Boolean,
2171
+ resizable: Boolean
2172
+ }, La = ["for"], xa = { class: "vv-textarea__wrapper" }, Ha = ["id", "disabled", "readonly", "required"], Ga = {
2173
+ key: 2,
2174
+ class: "vv-textarea__limit"
2175
+ }, ja = {
2176
+ name: "VvInputText"
2177
+ }, rn = /* @__PURE__ */ B({
2178
+ ...ja,
2179
+ props: Na,
2180
+ emits: Da,
2181
+ setup(o, { emit: t }) {
2182
+ const e = o, n = oe(), l = H(), { icon: s, iconPosition: r, label: f, modelValue: v, autoclear: p, limit: u } = x(e), d = i(() => String(e.id || ve())), c = i(() => `${d.value}-hint`), b = i(
2183
+ () => e.floating && z(e.placeholder) ? " " : e.placeholder
2184
+ ), g = yt(v, t, e.debounce), { hasIconLeft: y, hasIconRight: h } = bt(s, r, {
2185
+ iconLeft: n["icon-left"],
2186
+ iconRight: n["icon-right"]
2187
+ }), { focused: k } = gt(l, t), { textLength: P, formattedTextLimitLength: I } = ht(g, {
2188
+ mode: e.limit,
2189
+ upperLimit: e.maxlength || 0
2190
+ }), A = i(() => !z(v)), R = i(() => {
2191
+ if (e.error === !0)
2192
+ return !0;
2193
+ if (e.valid === !0)
2194
+ return !1;
2195
+ }), { HintSlot: M, hasHint: X, hasErrors: Z } = de(e, n), { bemCssClasses: ae } = L("vv-textarea", {
2196
+ modifiers: e.modifiers,
2197
+ readonly: e.readonly,
2198
+ valid: e.valid,
2199
+ invalid: e.error,
2200
+ loading: e.loading,
2201
+ iconLeft: y,
2202
+ iconRight: h,
2203
+ floating: e.floating && !z(e.label),
2204
+ dirty: A,
2205
+ resizable: e.resizable
2206
+ }), Y = i(
2207
+ () => ({
2208
+ placeholder: b.value,
2209
+ name: e.name,
2210
+ autocomplete: e.autocomplete,
2211
+ minlength: e.minlength,
2212
+ maxlength: e.maxlength,
2213
+ cols: e.cols,
2214
+ rows: e.rows,
2215
+ "aria-invalid": R.value,
2216
+ "aria-describedby": !Z.value && X.value ? c.value : void 0,
2217
+ "aria-errormessage": Z.value ? c.value : void 0
2218
+ })
2219
+ ), $ = i(() => {
2220
+ const { modelValue: S, valid: T, error: F, maxlength: Ee, hintLabel: Te } = e;
2221
+ return {
2222
+ valid: T,
2223
+ error: F,
2224
+ modelValue: S,
2225
+ hintLabel: Te,
2226
+ maxlength: Ee,
2227
+ textLength: P
2228
+ };
2229
+ });
2230
+ function V() {
2231
+ g.value = "";
2232
+ }
2233
+ return tt(() => {
2234
+ e.autofocus && (k.value = !0);
2235
+ }), (S, T) => (m(), _("div", D(a(Y), { class: a(ae) }), [
2236
+ a(f) ? (m(), _("label", {
2237
+ key: 0,
2238
+ for: a(d),
2239
+ class: "vv-textarea__label"
2240
+ }, E(a(f)), 9, La)) : w("", !0),
2241
+ O("div", xa, [
2242
+ a(y) ? C(S.$slots, "icon-left", te(D({ key: 0 }, a($))), () => [
2243
+ q(j, {
2244
+ class: "vv-textarea__icon-left",
2245
+ name: a(s)
2246
+ }, null, 8, ["name"])
2247
+ ]) : w("", !0),
2248
+ ne(O("textarea", D({
2249
+ id: a(d),
2250
+ ref_key: "input",
2251
+ ref: l,
2252
+ "onUpdate:modelValue": T[0] || (T[0] = (F) => be(g) ? g.value = F : null)
2253
+ }, a(Y), {
2254
+ disabled: S.disabled,
2255
+ readonly: S.readonly,
2256
+ required: S.required
2257
+ }), null, 16, Ha), [
2258
+ [ot, a(g)]
2259
+ ]),
2260
+ ne(O("button", {
2261
+ class: "vv-button vv-button--ghost",
2262
+ onClick: V
2263
+ }, [
2264
+ q(j, { name: "clear-field" })
2265
+ ], 512), [
2266
+ [Qe, a(p) && a(P) > 0]
2267
+ ]),
2268
+ a(h) ? C(S.$slots, "icon-right", te(D({ key: 1 }, a($))), () => [
2269
+ q(j, { name: a(s) }, null, 8, ["name"])
2270
+ ]) : w("", !0),
2271
+ a(u) ? (m(), _("span", Ga, [
2272
+ C(S.$slots, "limit", {}, () => [
2273
+ K(E(a(I)), 1)
2274
+ ])
2275
+ ])) : w("", !0)
2276
+ ]),
2277
+ q(a(M), {
2278
+ id: a(c),
2279
+ class: "vv-textarea__hint"
2280
+ }, null, 8, ["id"])
2281
+ ], 16));
2282
+ }
2283
+ });
1110
2284
  export {
1111
- jt as VolverPlugin,
1112
- xe as VvAccordion,
1113
- Lt as VvAccordionGroup,
1114
- Ft as VvBadge,
1115
- Ht as VvBreadcrumb,
1116
- Nt as VvButton,
1117
- qt as VvButtonGroup,
1118
- Mt as VvCard,
1119
- pt as VvCheck,
1120
- Ut as VvCheckGroup,
1121
- zt as VvDialog,
1122
- Kt as VvDropdown,
1123
- x as VvIcon
2285
+ Fa as VolverPlugin,
2286
+ Qt as VvAccordion,
2287
+ Wa as VvAccordionGroup,
2288
+ za as VvBadge,
2289
+ Xa as VvBreadcrumb,
2290
+ Za as VvButton,
2291
+ Ja as VvButtonGroup,
2292
+ Qa as VvCard,
2293
+ To as VvCheckbox,
2294
+ en as VvCheckboxGroup,
2295
+ tn as VvDialog,
2296
+ Zo as VvDropdown,
2297
+ j as VvIcon,
2298
+ on as VvInputText,
2299
+ pa as VvNativeSelect,
2300
+ an as VvProgress,
2301
+ Va as VvRadio,
2302
+ nn as VvRadioGroup,
2303
+ ln as VvSelect,
2304
+ rn as VvTextarea
1124
2305
  };