@volverjs/ui-vue 0.0.1-beta.11 → 0.0.1-beta.16

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