@volverjs/ui-vue 0.0.1-beta.8 → 0.0.2

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 (561) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +108 -56
  3. package/bin/icons.cjs +73 -0
  4. package/bin/icons.js +75 -0
  5. package/dist/{DesignSystem.d.ts → Volver.d.ts} +22 -18
  6. package/dist/components/VvAccordion/VvAccordion.es.js +165 -0
  7. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -0
  8. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +32 -97
  9. package/dist/components/VvAccordion/index.d.ts +46 -0
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -0
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -0
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +77 -151
  13. package/dist/components/VvAccordionGroup/{VvAccordionGroup.d.ts → index.d.ts} +30 -13
  14. package/dist/components/VvBadge/VvBadge.es.js +62 -0
  15. package/dist/components/VvBadge/VvBadge.umd.js +1 -0
  16. package/dist/components/VvBadge/VvBadge.vue.d.ts +13 -54
  17. package/dist/components/VvBadge/{VvBadge.d.ts → index.d.ts} +1 -1
  18. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +93 -0
  19. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -0
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +33 -107
  21. package/dist/components/VvBreadcrumb/{VvBreadcrumb.d.ts → index.d.ts} +2 -3
  22. package/dist/components/VvButton/VvButton.es.js +439 -0
  23. package/dist/components/VvButton/VvButton.umd.js +1 -0
  24. package/dist/components/VvButton/VvButton.vue.d.ts +100 -199
  25. package/dist/components/VvButton/index.d.ts +132 -0
  26. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +107 -0
  27. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -0
  28. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +92 -186
  29. package/dist/components/VvButtonGroup/index.d.ts +54 -0
  30. package/dist/components/VvCard/VvCard.es.js +77 -0
  31. package/dist/components/VvCard/VvCard.umd.js +1 -0
  32. package/dist/components/VvCard/VvCard.vue.d.ts +16 -61
  33. package/dist/components/VvCard/{VvCard.d.ts → index.d.ts} +1 -1
  34. package/dist/components/VvCheckbox/VvCheckbox.es.js +357 -0
  35. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -0
  36. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +74 -0
  37. package/dist/components/VvCheckbox/index.d.ts +54 -0
  38. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +435 -0
  39. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -0
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +82 -0
  41. package/dist/components/VvCheckboxGroup/index.d.ts +32 -0
  42. package/dist/components/VvCombobox/VvCombobox.es.js +775 -0
  43. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -0
  44. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +175 -0
  45. package/dist/components/VvCombobox/index.d.ts +108 -0
  46. package/dist/components/VvDialog/VvDialog.es.js +200 -0
  47. package/dist/components/VvDialog/VvDialog.umd.js +1 -0
  48. package/dist/components/VvDialog/VvDialog.vue.d.ts +28 -132
  49. package/dist/components/VvDialog/{VvDialog.d.ts → index.d.ts} +2 -6
  50. package/dist/components/VvDropdown/VvDropdown.es.js +227 -0
  51. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -0
  52. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +59 -146
  53. package/dist/components/VvDropdown/index.d.ts +49 -0
  54. package/dist/components/VvIcon/VvIcon.es.js +124 -0
  55. package/dist/components/VvIcon/VvIcon.umd.js +1 -0
  56. package/dist/components/VvIcon/VvIcon.vue.d.ts +36 -150
  57. package/dist/components/VvIcon/{VvIcon.d.ts → index.d.ts} +9 -0
  58. package/dist/components/VvInputText/VvInputClearAction.d.ts +36 -0
  59. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +56 -0
  60. package/dist/components/VvInputText/VvInputStepAction.d.ts +37 -0
  61. package/dist/components/VvInputText/VvInputText.es.js +772 -0
  62. package/dist/components/VvInputText/VvInputText.umd.js +1 -0
  63. package/dist/components/VvInputText/VvInputText.vue.d.ts +211 -288
  64. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  65. package/dist/components/VvInputText/index.d.ts +182 -0
  66. package/dist/components/VvProgress/VvProgress.es.js +71 -0
  67. package/dist/components/VvProgress/VvProgress.umd.js +1 -0
  68. package/dist/components/VvProgress/VvProgress.vue.d.ts +20 -107
  69. package/dist/components/VvProgress/index.d.ts +30 -0
  70. package/dist/components/VvRadio/VvRadio.es.js +320 -0
  71. package/dist/components/VvRadio/VvRadio.umd.js +1 -0
  72. package/dist/components/VvRadio/VvRadio.vue.d.ts +55 -125
  73. package/dist/components/VvRadio/index.d.ts +40 -0
  74. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +398 -0
  75. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -0
  76. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +56 -238
  77. package/dist/components/VvRadioGroup/index.d.ts +32 -0
  78. package/dist/components/VvSelect/VvSelect.es.js +434 -0
  79. package/dist/components/VvSelect/VvSelect.umd.js +1 -0
  80. package/dist/components/VvSelect/VvSelect.vue.d.ts +125 -263
  81. package/dist/components/VvSelect/index.d.ts +89 -0
  82. package/dist/components/VvTextarea/VvTextarea.es.js +471 -0
  83. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -0
  84. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -321
  85. package/dist/components/VvTextarea/index.d.ts +102 -0
  86. package/dist/components/common/HintSlot.d.ts +12 -6
  87. package/dist/components/index.d.ts +19 -12
  88. package/dist/components/index.es.js +2379 -0
  89. package/dist/components/index.umd.js +1 -0
  90. package/dist/composables/group/types/IAccordionGroupState.d.ts +3 -4
  91. package/dist/composables/group/types/IButtonGroupState.d.ts +5 -11
  92. package/dist/composables/group/types/IGroupState.d.ts +3 -6
  93. package/dist/composables/group/types/IInputGroup.d.ts +1 -4
  94. package/dist/composables/group/useInjectedGroupState.d.ts +4 -4
  95. package/dist/composables/group/useProvideGroupState.d.ts +2 -2
  96. package/dist/composables/useComponentFocus.d.ts +4 -0
  97. package/dist/composables/{icons/useComponentIcons.d.ts → useComponentIcons.d.ts} +3 -2
  98. package/dist/composables/useDebouncedInput.d.ts +2 -0
  99. package/dist/composables/useOptions.d.ts +6 -0
  100. package/dist/composables/useTextCount.d.ts +10 -0
  101. package/dist/constants.d.ts +4 -4
  102. package/dist/icons.d.ts +1881 -0
  103. package/dist/icons.es.js +12 -14
  104. package/dist/icons.umd.js +1 -1
  105. package/dist/index.d.ts +9 -4
  106. package/dist/index.es.js +2420 -0
  107. package/dist/index.umd.js +1 -0
  108. package/dist/props/index.d.ts +328 -30
  109. package/dist/resolvers/unplugin.d.ts +27 -0
  110. package/dist/resolvers/unplugin.es.js +42 -0
  111. package/dist/resolvers/unplugin.umd.js +1 -0
  112. package/dist/stories/Accordion/Accordion.settings.d.ts +63 -0
  113. package/dist/stories/Accordion/Accordion.test.d.ts +2 -0
  114. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +58 -0
  115. package/dist/stories/AccordionGroup/AccordionGroup.test.d.ts +2 -0
  116. package/dist/stories/Badge/Badge.settings.d.ts +32 -0
  117. package/dist/stories/Badge/Badge.test.d.ts +2 -0
  118. package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +29 -0
  119. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
  120. package/dist/stories/Button/Button.settings.d.ts +198 -0
  121. package/dist/stories/Button/Button.test.d.ts +1 -10
  122. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +47 -0
  123. package/dist/stories/ButtonGroup/ButtonGroup.test.d.ts +2 -0
  124. package/dist/stories/Card/Card.settings.d.ts +70 -0
  125. package/dist/stories/Card/Card.test.d.ts +2 -0
  126. package/dist/stories/Checkbox/Checkbox.settings.d.ts +165 -0
  127. package/dist/stories/Checkbox/Checkbox.test.d.ts +2 -0
  128. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +164 -0
  129. package/dist/stories/CheckboxGroup/CheckboxGroup.test.d.ts +2 -0
  130. package/dist/stories/Combobox/Combobox.settings.d.ts +286 -0
  131. package/dist/stories/Combobox/Combobox.test.d.ts +2 -0
  132. package/dist/stories/Dialog/Dialog.settings.d.ts +55 -0
  133. package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
  134. package/dist/stories/Dropdown/Dropdown.settings.d.ts +85 -0
  135. package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
  136. package/dist/stories/Icon/Icon.settings.d.ts +74 -0
  137. package/dist/stories/InputText/InputText.settings.d.ts +445 -0
  138. package/dist/stories/InputText/InputText.test.d.ts +2 -0
  139. package/dist/stories/Progress/Progress.settings.d.ts +38 -0
  140. package/dist/stories/Progress/Progress.test.d.ts +2 -0
  141. package/dist/stories/Radio/Radio.settings.d.ts +139 -0
  142. package/dist/stories/Radio/Radio.test.d.ts +2 -0
  143. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +164 -0
  144. package/dist/stories/RadioGroup/RadioGroup.test.d.ts +2 -0
  145. package/dist/stories/Select/Select.settings.d.ts +284 -0
  146. package/dist/stories/Select/Select.test.d.ts +2 -0
  147. package/dist/stories/Textarea/Textarea.settings.d.ts +336 -0
  148. package/dist/stories/Textarea/Textarea.test.d.ts +2 -0
  149. package/dist/stories/argTypes.d.ts +842 -0
  150. package/dist/test/expect.d.ts +3 -0
  151. package/dist/test/options.d.ts +1 -0
  152. package/dist/test/sleep.d.ts +1 -0
  153. package/dist/utils/ObjectUtilities.d.ts +82 -95
  154. package/env.d.ts +1 -0
  155. package/package.json +199 -126
  156. package/src/{DesignSystem.ts → Volver.ts} +57 -29
  157. package/src/assets/icons/detailed.json +1 -1
  158. package/src/assets/icons/normal.json +1 -1
  159. package/src/assets/icons/simple.json +1 -1
  160. package/src/components/VvAccordion/VvAccordion.vue +94 -78
  161. package/src/components/VvAccordion/index.ts +72 -0
  162. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +93 -53
  163. package/src/components/VvAccordionGroup/{VvAccordionGroup.ts → index.ts} +18 -14
  164. package/src/components/VvBadge/VvBadge.vue +17 -8
  165. package/src/components/VvBadge/index.ts +6 -0
  166. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +26 -24
  167. package/src/components/VvBreadcrumb/{VvBreadcrumb.ts → index.ts} +1 -2
  168. package/src/components/VvButton/VvButton.vue +174 -153
  169. package/src/components/VvButton/index.ts +189 -0
  170. package/src/components/VvButtonGroup/VvButtonGroup.vue +76 -48
  171. package/src/components/VvButtonGroup/index.ts +16 -0
  172. package/src/components/VvCard/VvCard.vue +20 -22
  173. package/src/components/VvCard/{VvCard.ts → index.ts} +1 -1
  174. package/src/components/VvCheckbox/VvCheckbox.vue +172 -0
  175. package/src/components/VvCheckbox/index.ts +60 -0
  176. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +85 -0
  177. package/src/components/VvCheckboxGroup/index.ts +5 -0
  178. package/src/components/VvCombobox/VvCombobox.vue +261 -0
  179. package/src/components/VvCombobox/index.ts +88 -0
  180. package/src/components/VvDialog/VvDialog.vue +69 -67
  181. package/src/components/VvDialog/index.ts +10 -0
  182. package/src/components/VvDropdown/VvDropdown.vue +115 -114
  183. package/src/components/VvDropdown/index.ts +35 -0
  184. package/src/components/VvIcon/README.md +64 -0
  185. package/src/components/VvIcon/VvIcon.vue +122 -107
  186. package/src/components/VvIcon/{VvIcon.ts → index.ts} +17 -8
  187. package/src/components/VvInputText/VvInputClearAction.ts +53 -0
  188. package/src/components/VvInputText/VvInputPasswordAction.ts +70 -0
  189. package/src/components/VvInputText/VvInputStepAction.ts +49 -0
  190. package/src/components/VvInputText/VvInputText.vue +307 -238
  191. package/src/components/VvInputText/VvInputTextActions.ts +63 -114
  192. package/src/components/VvInputText/index.ts +140 -0
  193. package/src/components/VvProgress/VvProgress.vue +29 -29
  194. package/src/components/VvProgress/index.ts +32 -0
  195. package/src/components/VvRadio/VvRadio.vue +90 -119
  196. package/src/components/VvRadio/index.ts +40 -0
  197. package/src/components/VvRadioGroup/VvRadioGroup.vue +76 -69
  198. package/src/components/VvRadioGroup/index.ts +5 -0
  199. package/src/components/VvSelect/VvSelect.vue +187 -186
  200. package/src/components/VvSelect/index.ts +71 -0
  201. package/src/components/VvTextarea/VvTextarea.vue +188 -174
  202. package/src/components/VvTextarea/index.ts +50 -0
  203. package/src/components/common/HintSlot.ts +167 -137
  204. package/src/components/index.ts +19 -12
  205. package/src/composables/group/types/IAccordionGroupState.ts +3 -4
  206. package/src/composables/group/types/IButtonGroupState.ts +5 -11
  207. package/src/composables/group/types/IGroupState.ts +4 -6
  208. package/src/composables/group/types/IInputGroup.ts +1 -4
  209. package/src/composables/group/useInjectedGroupState.ts +23 -35
  210. package/src/composables/group/useProvideGroupState.ts +5 -7
  211. package/src/composables/useComponentFocus.ts +17 -0
  212. package/src/composables/{icons/useComponentIcons.ts → useComponentIcons.ts} +29 -20
  213. package/src/composables/useDebouncedInput.ts +25 -0
  214. package/src/composables/useModifiers.ts +18 -20
  215. package/src/composables/useOptions.ts +31 -0
  216. package/src/composables/useTextCount.ts +57 -0
  217. package/src/constants.ts +5 -7
  218. package/src/directives/{.README → .gitkeep} +0 -0
  219. package/src/icons.ts +7 -0
  220. package/src/index.ts +12 -5
  221. package/src/props/index.ts +204 -36
  222. package/src/resolvers/unplugin.ts +112 -0
  223. package/src/shims.d.ts +13 -0
  224. package/src/stories/Accordion/Accordion.settings.ts +46 -0
  225. package/src/stories/Accordion/Accordion.stories.mdx +21 -21
  226. package/src/stories/Accordion/Accordion.test.ts +61 -0
  227. package/src/stories/Accordion/AccordionSlots.stories.mdx +46 -70
  228. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +55 -0
  229. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +24 -27
  230. package/src/stories/AccordionGroup/AccordionGroup.test.ts +50 -0
  231. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +56 -0
  232. package/src/stories/Badge/Badge.settings.ts +26 -0
  233. package/src/stories/Badge/Badge.stories.mdx +36 -24
  234. package/src/stories/Badge/Badge.test.ts +12 -0
  235. package/src/stories/Badge/BadgeSlots.stories.mdx +20 -0
  236. package/src/stories/Breadcrumb/Breadcrumb.settings.ts +41 -0
  237. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +32 -29
  238. package/src/stories/Breadcrumb/Breadcrumb.test.ts +50 -0
  239. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +43 -0
  240. package/src/stories/Button/Button.settings.ts +145 -0
  241. package/src/stories/Button/Button.stories.mdx +20 -54
  242. package/src/stories/Button/Button.test.ts +35 -46
  243. package/src/stories/Button/ButtonIcon.stories.mdx +139 -29
  244. package/src/stories/Button/ButtonLink.stories.mdx +58 -111
  245. package/src/stories/Button/ButtonLoading.stories.mdx +89 -62
  246. package/src/stories/Button/ButtonModifiers.stories.mdx +198 -121
  247. package/src/stories/Button/ButtonSlots.stories.mdx +83 -95
  248. package/src/stories/Button/ButtonState.stories.mdx +75 -0
  249. package/src/stories/Button/ButtonToggle.stories.mdx +50 -0
  250. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +33 -0
  251. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +16 -18
  252. package/src/stories/ButtonGroup/ButtonGroup.test.ts +35 -0
  253. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +52 -0
  254. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +37 -0
  255. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +52 -110
  256. package/src/stories/Card/Card.settings.ts +55 -0
  257. package/src/stories/Card/Card.stories.mdx +27 -11
  258. package/src/stories/Card/Card.test.ts +23 -0
  259. package/src/stories/Card/CardSlots.stories.mdx +80 -24
  260. package/src/stories/Checkbox/Checkbox.settings.ts +43 -0
  261. package/src/stories/Checkbox/Checkbox.stories.mdx +163 -0
  262. package/src/stories/Checkbox/Checkbox.test.ts +81 -0
  263. package/src/stories/Checkbox/CheckboxBinary.stories.mdx +68 -0
  264. package/src/stories/Checkbox/CheckboxSlots.stories.mdx +46 -0
  265. package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +15 -0
  266. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +134 -0
  267. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +83 -0
  268. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +100 -0
  269. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +67 -0
  270. package/src/stories/Combobox/Combobox.settings.ts +127 -0
  271. package/src/stories/Combobox/Combobox.stories.mdx +204 -0
  272. package/src/stories/Combobox/Combobox.test.ts +103 -0
  273. package/src/stories/Combobox/ComboboxMultiple.stories.mdx +74 -0
  274. package/src/stories/Combobox/ComboboxOptions.stories.mdx +100 -0
  275. package/src/stories/Combobox/ComboboxSlots.stories.mdx +48 -0
  276. package/src/stories/Dialog/Dialog.settings.ts +45 -0
  277. package/src/stories/Dialog/Dialog.stories.mdx +42 -16
  278. package/src/stories/Dialog/Dialog.test.ts +69 -0
  279. package/src/stories/Dialog/DialogSlots.stories.mdx +63 -0
  280. package/src/stories/Dropdown/Dropdown.settings.ts +51 -0
  281. package/src/stories/Dropdown/Dropdown.stories.mdx +102 -29
  282. package/src/stories/Dropdown/Dropdown.test.ts +43 -0
  283. package/src/stories/Dropdown/DropdownOptions.stories.mdx +87 -67
  284. package/src/stories/Icon/Icon.settings.ts +72 -0
  285. package/src/stories/Icon/Icon.stories.mdx +76 -59
  286. package/src/stories/Icon/IconsCollection.stories.mdx +68 -0
  287. package/src/stories/InputText/InputText.settings.ts +221 -0
  288. package/src/stories/InputText/InputText.stories.mdx +142 -69
  289. package/src/stories/InputText/InputText.test.ts +125 -0
  290. package/src/stories/InputText/InputTextIconPosition.stories.mdx +63 -16
  291. package/src/stories/InputText/InputTextLength.stories.mdx +110 -0
  292. package/src/stories/InputText/InputTextMinMax.stories.mdx +112 -0
  293. package/src/stories/InputText/InputTextSlots.stories.mdx +61 -22
  294. package/src/stories/InputText/InputTextType.stories.mdx +207 -29
  295. package/src/stories/Progress/Progress.settings.ts +33 -0
  296. package/src/stories/Progress/Progress.stories.mdx +12 -14
  297. package/src/stories/Progress/Progress.test.ts +9 -0
  298. package/src/stories/Radio/Radio.settings.ts +15 -0
  299. package/src/stories/Radio/Radio.stories.mdx +102 -42
  300. package/src/stories/Radio/Radio.test.ts +70 -0
  301. package/src/stories/Radio/RadioSlots.stories.mdx +39 -22
  302. package/src/stories/RadioGroup/RadioGroup.settings.ts +15 -0
  303. package/src/stories/RadioGroup/RadioGroup.stories.mdx +115 -54
  304. package/src/stories/RadioGroup/RadioGroup.test.ts +83 -0
  305. package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +83 -41
  306. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +49 -144
  307. package/src/stories/Select/Select.settings.ts +86 -0
  308. package/src/stories/Select/Select.stories.mdx +173 -33
  309. package/src/stories/Select/Select.test.ts +82 -0
  310. package/src/stories/Select/SelectOptions.stories.mdx +91 -69
  311. package/src/stories/Select/SelectSlots.stories.mdx +48 -0
  312. package/src/stories/Textarea/Textarea.settings.ts +96 -0
  313. package/src/stories/Textarea/Textarea.stories.mdx +167 -47
  314. package/src/stories/Textarea/Textarea.test.ts +90 -0
  315. package/src/stories/Textarea/TextareaLength.stories.mdx +110 -0
  316. package/src/stories/Textarea/TextareaSlots.stories.mdx +61 -23
  317. package/src/stories/Textarea/TextareatIconPosition.stories.mdx +78 -0
  318. package/src/stories/argTypes.ts +457 -0
  319. package/src/test/expect.ts +27 -6
  320. package/src/test/options.ts +17 -0
  321. package/src/test/sleep.ts +2 -0
  322. package/src/test/types.d.ts +14 -0
  323. package/src/types/generic.d.ts +5 -0
  324. package/src/utils/ObjectUtilities.ts +253 -244
  325. package/dist/components/VvAccordion/VvAccordion.d.ts +0 -32
  326. package/dist/components/VvAccordion/useAccordionProps.d.ts +0 -16
  327. package/dist/components/VvAccordion/vv-accordion.es.js +0 -262
  328. package/dist/components/VvAccordion/vv-accordion.umd.js +0 -1
  329. package/dist/components/VvAccordionGroup/vv-accordion-group.es.js +0 -315
  330. package/dist/components/VvAccordionGroup/vv-accordion-group.umd.js +0 -1
  331. package/dist/components/VvBadge/vv-badge.es.js +0 -18
  332. package/dist/components/VvBadge/vv-badge.umd.js +0 -1
  333. package/dist/components/VvBreadcrumb/vv-breadcrumb.es.js +0 -206
  334. package/dist/components/VvBreadcrumb/vv-breadcrumb.umd.js +0 -1
  335. package/dist/components/VvButton/VvButton.d.ts +0 -115
  336. package/dist/components/VvButton/useButtonGroupProps.d.ts +0 -23
  337. package/dist/components/VvButton/vv-button.es.js +0 -422
  338. package/dist/components/VvButton/vv-button.umd.js +0 -1
  339. package/dist/components/VvButtonGroup/VvButtonGroup.d.ts +0 -57
  340. package/dist/components/VvButtonGroup/vv-button-group.es.js +0 -210
  341. package/dist/components/VvButtonGroup/vv-button-group.umd.js +0 -1
  342. package/dist/components/VvCard/vv-card.es.js +0 -188
  343. package/dist/components/VvCard/vv-card.umd.js +0 -1
  344. package/dist/components/VvCheck/VvCheck.d.ts +0 -47
  345. package/dist/components/VvCheck/VvCheck.vue.d.ts +0 -165
  346. package/dist/components/VvCheck/useCheckProps.d.ts +0 -16
  347. package/dist/components/VvCheck/vv-check.es.js +0 -321
  348. package/dist/components/VvCheck/vv-check.umd.js +0 -1
  349. package/dist/components/VvCheckGroup/VvCheckGroup.d.ts +0 -65
  350. package/dist/components/VvCheckGroup/VvCheckGroup.vue.d.ts +0 -272
  351. package/dist/components/VvCheckGroup/vv-check-group.es.js +0 -452
  352. package/dist/components/VvCheckGroup/vv-check-group.umd.js +0 -2
  353. package/dist/components/VvDialog/constants.d.ts +0 -5
  354. package/dist/components/VvDialog/vv-dialog.es.js +0 -315
  355. package/dist/components/VvDialog/vv-dialog.umd.js +0 -1
  356. package/dist/components/VvDropdown/VvDropdown.d.ts +0 -52
  357. package/dist/components/VvDropdown/vv-dropdown.es.js +0 -236
  358. package/dist/components/VvDropdown/vv-dropdown.umd.js +0 -1
  359. package/dist/components/VvIcon/vv-icon.es.js +0 -229
  360. package/dist/components/VvIcon/vv-icon.umd.js +0 -1
  361. package/dist/components/VvInputText/VvInputText.d.ts +0 -73
  362. package/dist/components/VvInputText/constants.d.ts +0 -55
  363. package/dist/components/VvInputText/vv-input-text.es.js +0 -725
  364. package/dist/components/VvInputText/vv-input-text.umd.js +0 -2
  365. package/dist/components/VvNativeSelect/VvNativeSelect.d.ts +0 -70
  366. package/dist/components/VvNativeSelect/VvNativeSelect.vue.d.ts +0 -228
  367. package/dist/components/VvNativeSelect/vv-native-select.es.js +0 -414
  368. package/dist/components/VvNativeSelect/vv-native-select.umd.js +0 -2
  369. package/dist/components/VvProgress/VvProgress.d.ts +0 -29
  370. package/dist/components/VvProgress/vv-progress.es.js +0 -185
  371. package/dist/components/VvProgress/vv-progress.umd.js +0 -1
  372. package/dist/components/VvRadio/VvRadio.d.ts +0 -22
  373. package/dist/components/VvRadio/useRadioProps.d.ts +0 -15
  374. package/dist/components/VvRadio/vv-radio.es.js +0 -309
  375. package/dist/components/VvRadio/vv-radio.umd.js +0 -1
  376. package/dist/components/VvRadioGroup/VvRadioGroup.d.ts +0 -54
  377. package/dist/components/VvRadioGroup/vv-radio-group.es.js +0 -441
  378. package/dist/components/VvRadioGroup/vv-radio-group.umd.js +0 -2
  379. package/dist/components/VvSelect/VvSelect.d.ts +0 -99
  380. package/dist/components/VvSelect/vv-select.es.js +0 -445
  381. package/dist/components/VvSelect/vv-select.umd.js +0 -2
  382. package/dist/components/VvTextarea/VvTextarea.d.ts +0 -88
  383. package/dist/components/VvTextarea/constants.d.ts +0 -19
  384. package/dist/components/VvTextarea/vv-textarea.es.js +0 -548
  385. package/dist/components/VvTextarea/vv-textarea.umd.js +0 -2
  386. package/dist/composables/debouncedInput/useDebouncedInput.d.ts +0 -2
  387. package/dist/composables/focus/useComponentFocus.d.ts +0 -7
  388. package/dist/composables/options/useOptions.d.ts +0 -5
  389. package/dist/composables/textLimit/useTextLimit.d.ts +0 -14
  390. package/dist/stories/Icon/IconList.vue.d.ts +0 -44
  391. package/dist/stories/utils.d.ts +0 -5
  392. package/dist/ui-vue.es.js +0 -3001
  393. package/dist/ui-vue.umd.js +0 -2
  394. package/src/assets/icons/index.js +0 -7
  395. package/src/components/VvAccordion/VvAccordion.ts +0 -34
  396. package/src/components/VvAccordion/useAccordionProps.ts +0 -45
  397. package/src/components/VvBadge/VvBadge.ts +0 -4
  398. package/src/components/VvButton/VvButton.ts +0 -117
  399. package/src/components/VvButton/useButtonGroupProps.ts +0 -51
  400. package/src/components/VvButtonGroup/VvButtonGroup.ts +0 -37
  401. package/src/components/VvCheck/VvCheck.ts +0 -48
  402. package/src/components/VvCheck/VvCheck.vue +0 -149
  403. package/src/components/VvCheck/useCheckProps.ts +0 -41
  404. package/src/components/VvCheckGroup/VvCheckGroup.ts +0 -34
  405. package/src/components/VvCheckGroup/VvCheckGroup.vue +0 -84
  406. package/src/components/VvDialog/VvDialog.ts +0 -17
  407. package/src/components/VvDialog/constants.ts +0 -5
  408. package/src/components/VvDropdown/VvDropdown.ts +0 -46
  409. package/src/components/VvInputText/VvInputText.ts +0 -66
  410. package/src/components/VvInputText/constants.ts +0 -34
  411. package/src/components/VvNativeSelect/VvNativeSelect.ts +0 -70
  412. package/src/components/VvNativeSelect/VvNativeSelect.vue +0 -106
  413. package/src/components/VvProgress/VvProgress.ts +0 -28
  414. package/src/components/VvRadio/VvRadio.ts +0 -25
  415. package/src/components/VvRadio/useRadioProps.ts +0 -40
  416. package/src/components/VvRadioGroup/VvRadioGroup.ts +0 -25
  417. package/src/components/VvSelect/VvSelect.ts +0 -91
  418. package/src/components/VvTextarea/VvTextarea.ts +0 -64
  419. package/src/components/VvTextarea/constants.ts +0 -14
  420. package/src/composables/debouncedInput/useDebouncedInput.ts +0 -19
  421. package/src/composables/focus/useComponentFocus.ts +0 -22
  422. package/src/composables/options/useOptions.ts +0 -27
  423. package/src/composables/textLimit/useTextLimit.ts +0 -44
  424. package/src/stories/Accordion/AccordionBordered.stories.mdx +0 -26
  425. package/src/stories/Accordion/AccordionIconRight.stories.mdx +0 -32
  426. package/src/stories/Accordion/accordionTest.js +0 -36
  427. package/src/stories/AccordionGroup/Accordion.stories.mdx +0 -42
  428. package/src/stories/AccordionGroup/AccordionItems.stories.mdx +0 -51
  429. package/src/stories/AccordionGroup/accordionGroupTest.js +0 -51
  430. package/src/stories/Badge/BadgeColor.stories.mdx +0 -54
  431. package/src/stories/Badge/BadgeDot.stories.mdx +0 -20
  432. package/src/stories/Badge/BadgeTest.js +0 -21
  433. package/src/stories/Breadcrumb/BreadcrumbMultiline.stories.mdx +0 -41
  434. package/src/stories/Button/ButtonBadge.stories.mdx +0 -34
  435. package/src/stories/Button/ButtonIconPosition.stories.mdx +0 -106
  436. package/src/stories/Button/ButtonVariant.stories.mdx +0 -205
  437. package/src/stories/Button/test.js +0 -41
  438. package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +0 -83
  439. package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +0 -50
  440. package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +0 -40
  441. package/src/stories/ButtonGroup/ButtonGroupCompact.stories.mdx +0 -38
  442. package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +0 -77
  443. package/src/stories/ButtonGroup/ButtonGroupTest.js +0 -61
  444. package/src/stories/ButtonGroup/ButtonGroupVertical.stories.mdx +0 -38
  445. package/src/stories/Card/CardVariant.stories.mdx +0 -37
  446. package/src/stories/Check/Check.stories.mdx +0 -62
  447. package/src/stories/Check/CheckBinary.stories.mdx +0 -80
  448. package/src/stories/Check/CheckDisabled.stories.mdx +0 -30
  449. package/src/stories/Check/CheckError.stories.mdx +0 -64
  450. package/src/stories/Check/CheckErrorTests.js +0 -72
  451. package/src/stories/Check/CheckHintLabel.stories.mdx +0 -30
  452. package/src/stories/Check/CheckPropertyTest.js +0 -101
  453. package/src/stories/Check/CheckReadonly.stories.mdx +0 -30
  454. package/src/stories/Check/CheckSlots.stories.mdx +0 -51
  455. package/src/stories/Check/CheckSwitch.stories.mdx +0 -30
  456. package/src/stories/CheckGroup/CheckGroup.stories.mdx +0 -69
  457. package/src/stories/CheckGroup/CheckGroupDisabled.stories.mdx +0 -26
  458. package/src/stories/CheckGroup/CheckGroupError.stories.mdx +0 -28
  459. package/src/stories/CheckGroup/CheckGroupHintLabel.stories.mdx +0 -27
  460. package/src/stories/CheckGroup/CheckGroupLabel.stories.mdx +0 -26
  461. package/src/stories/CheckGroup/CheckGroupOptionLabel.stories.mdx +0 -48
  462. package/src/stories/CheckGroup/CheckGroupOptionValue.stories.mdx +0 -48
  463. package/src/stories/CheckGroup/CheckGroupOptions.stories.mdx +0 -40
  464. package/src/stories/CheckGroup/CheckGroupReadonly.stories.mdx +0 -26
  465. package/src/stories/CheckGroup/CheckGroupSlots.stories.mdx +0 -152
  466. package/src/stories/CheckGroup/CheckGroupValid.stories.mdx +0 -28
  467. package/src/stories/CheckGroup/CheckGroupVertical.stories.mdx +0 -26
  468. package/src/stories/Dialog/DialogAutoClose.stories.mdx +0 -18
  469. package/src/stories/Dialog/DialogSize.stories.mdx +0 -36
  470. package/src/stories/Dropdown/DropdownDisabled.stories.mdx +0 -25
  471. package/src/stories/Dropdown/DropdownLabelNoResults.stories.mdx +0 -25
  472. package/src/stories/Dropdown/DropdownMaxValues.stories.mdx +0 -26
  473. package/src/stories/Dropdown/DropdownMultiple.stories.mdx +0 -56
  474. package/src/stories/Dropdown/DropdownUseObject.stories.mdx +0 -58
  475. package/src/stories/Icon/IconList.vue +0 -34
  476. package/src/stories/Icon/IconPrefix.stories.mdx +0 -79
  477. package/src/stories/Icon/IconRemote.stories.mdx +0 -39
  478. package/src/stories/Icon/IconTest.js +0 -27
  479. package/src/stories/Icon/IconsList.stories.mdx +0 -35
  480. package/src/stories/InputText/InputTextAutocomplete.stories.mdx +0 -15
  481. package/src/stories/InputText/InputTextAutofocus.stories.mdx +0 -20
  482. package/src/stories/InputText/InputTextDisabled.stories.mdx +0 -19
  483. package/src/stories/InputText/InputTextError.stories.mdx +0 -19
  484. package/src/stories/InputText/InputTextFloating.stories.mdx +0 -20
  485. package/src/stories/InputText/InputTextHintLabel.stories.mdx +0 -18
  486. package/src/stories/InputText/InputTextIcon.stories.mdx +0 -18
  487. package/src/stories/InputText/InputTextLabel.stories.mdx +0 -15
  488. package/src/stories/InputText/InputTextLoading.stories.mdx +0 -19
  489. package/src/stories/InputText/InputTextMax.stories.mdx +0 -31
  490. package/src/stories/InputText/InputTextMaxLength.stories.mdx +0 -36
  491. package/src/stories/InputText/InputTextMin.stories.mdx +0 -31
  492. package/src/stories/InputText/InputTextMinLength.stories.mdx +0 -15
  493. package/src/stories/InputText/InputTextPlaceholder.stories.mdx +0 -15
  494. package/src/stories/InputText/InputTextReadonly.stories.mdx +0 -19
  495. package/src/stories/InputText/InputTextStep.stories.mdx +0 -31
  496. package/src/stories/InputText/InputTextValid.stories.mdx +0 -19
  497. package/src/stories/NativeSelect/NativeSelect.stories.mdx +0 -53
  498. package/src/stories/NativeSelect/NativeSelectDisabled.stories.mdx +0 -32
  499. package/src/stories/NativeSelect/NativeSelectError.stories.mdx +0 -36
  500. package/src/stories/NativeSelect/NativeSelectHintLabel.stories.mdx +0 -34
  501. package/src/stories/NativeSelect/NativeSelectIconLeftRight.stories.mdx +0 -42
  502. package/src/stories/NativeSelect/NativeSelectLoading.stories.mdx +0 -27
  503. package/src/stories/NativeSelect/NativeSelectOptions.stories.mdx +0 -78
  504. package/src/stories/NativeSelect/NativeSelectReadonly.stories.mdx +0 -34
  505. package/src/stories/NativeSelect/NativeSelectUseObject.stories.mdx +0 -66
  506. package/src/stories/NativeSelect/NativeSelectValid.stories.mdx +0 -36
  507. package/src/stories/NativeSelect/NativeSelectValueKey.stories.mdx +0 -66
  508. package/src/stories/Progress/ProgressDeterminate.stories.mdx +0 -19
  509. package/src/stories/Radio/RadioDisabled.stories.mdx +0 -30
  510. package/src/stories/Radio/RadioError.stories.mdx +0 -64
  511. package/src/stories/Radio/RadioHintLabel.stories.mdx +0 -30
  512. package/src/stories/Radio/RadioTest.js +0 -89
  513. package/src/stories/RadioGroup/RadioGroupDisabled.stories.mdx +0 -29
  514. package/src/stories/RadioGroup/RadioGroupError.stories.mdx +0 -31
  515. package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +0 -28
  516. package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +0 -29
  517. package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +0 -65
  518. package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +0 -65
  519. package/src/stories/RadioGroup/RadioGroupReadonly.stories.mdx +0 -29
  520. package/src/stories/RadioGroup/RadioGroupValid.stories.mdx +0 -31
  521. package/src/stories/RadioGroup/RadioGroupVertical.stories.mdx +0 -29
  522. package/src/stories/RadioGroup/RadioOptionsTest.js +0 -78
  523. package/src/stories/RadioGroup/RadioPropertyTest.js +0 -131
  524. package/src/stories/RadioGroup/RadioSlotsTest.js +0 -20
  525. package/src/stories/Select/SelectDisabled.stories.mdx +0 -32
  526. package/src/stories/Select/SelectMaxValues.stories.mdx +0 -33
  527. package/src/stories/Select/SelectMultiple.stories.mdx +0 -64
  528. package/src/stories/Select/SelectSearchable.stories.mdx +0 -80
  529. package/src/stories/Select/SelectSeparator.stories.mdx +0 -64
  530. package/src/stories/Select/SelectUseObject.stories.mdx +0 -66
  531. package/src/stories/Textarea/TextareaAutoclear.stories.mdx +0 -23
  532. package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +0 -23
  533. package/src/stories/Textarea/TextareaAutofocus.stories.mdx +0 -24
  534. package/src/stories/Textarea/TextareaDebounce.stories.mdx +0 -23
  535. package/src/stories/Textarea/TextareaDisabled.stories.mdx +0 -23
  536. package/src/stories/Textarea/TextareaError.stories.mdx +0 -22
  537. package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +0 -37
  538. package/src/stories/Textarea/TextareaFloating.stories.mdx +0 -25
  539. package/src/stories/Textarea/TextareaHintLabel.stories.mdx +0 -22
  540. package/src/stories/Textarea/TextareaIcon.stories.mdx +0 -22
  541. package/src/stories/Textarea/TextareaIconPosition.stories.mdx +0 -39
  542. package/src/stories/Textarea/TextareaId.stories.mdx +0 -19
  543. package/src/stories/Textarea/TextareaLabel.stories.mdx +0 -19
  544. package/src/stories/Textarea/TextareaLimit.stories.mdx +0 -50
  545. package/src/stories/Textarea/TextareaLoading.stories.mdx +0 -22
  546. package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +0 -23
  547. package/src/stories/Textarea/TextareaMaxLength.stories.mdx +0 -19
  548. package/src/stories/Textarea/TextareaMinLength.stories.mdx +0 -19
  549. package/src/stories/Textarea/TextareaModifiers.stories.mdx +0 -24
  550. package/src/stories/Textarea/TextareaName.stories.mdx +0 -23
  551. package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +0 -19
  552. package/src/stories/Textarea/TextareaReadonly.stories.mdx +0 -23
  553. package/src/stories/Textarea/TextareaRequired.stories.mdx +0 -22
  554. package/src/stories/Textarea/TextareaResizable.stories.mdx +0 -22
  555. package/src/stories/Textarea/TextareaRowsCols.stories.mdx +0 -39
  556. package/src/stories/Textarea/TextareaValid.stories.mdx +0 -22
  557. package/src/stories/Textarea/TextareaValidLabel.stories.mdx +0 -35
  558. package/src/stories/stories.scss +0 -35
  559. package/src/stories/utils.ts +0 -12
  560. package/src/stories/volver-ui-vue.stories.mdx +0 -77
  561. package/src/types/.README +0 -0
@@ -1,315 +0,0 @@
1
- import { computed as p, unref as u, defineComponent as D, ref as C, toRefs as E, inject as B, openBlock as h, createBlock as O, mergeProps as w, createCommentVNode as A, Transition as j, toHandlers as I, withCtx as q, withDirectives as x, createElementVNode as m, createElementBlock as $, renderSlot as S, createTextVNode as F, toDisplayString as N, withModifiers as V, createVNode as P, vShow as M } from "vue";
2
- import { useVModel as T, onClickOutside as L } from "@vueuse/core";
3
- import { iconExists as _, Icon as z, addIcon as Z } from "@iconify/vue";
4
- const y = {
5
- normal: "",
6
- small: "small",
7
- fullscreen: "fullscreen"
8
- }, R = ["open", "close", "update:open"], H = {
9
- id: { type: String, required: !0 },
10
- title: String,
11
- open: Boolean,
12
- transition: { type: String, default: "fade-block" },
13
- size: {
14
- type: String,
15
- default: y.normal,
16
- validator: (e) => Object.values(y).includes(e)
17
- },
18
- autoClose: { type: Boolean, default: !0 }
19
- }, W = {
20
- color: String,
21
- width: {
22
- type: [String, Number]
23
- },
24
- height: {
25
- type: [String, Number]
26
- },
27
- name: {
28
- type: String,
29
- required: !0
30
- },
31
- provider: {
32
- type: String
33
- },
34
- prefix: {
35
- type: String,
36
- default: "normal"
37
- },
38
- src: String,
39
- horizontalFlip: Boolean,
40
- verticalFlip: Boolean,
41
- flip: String,
42
- mode: String,
43
- inline: Boolean,
44
- rotate: [Number, String],
45
- onLoad: Function,
46
- svg: String,
47
- modifiers: {
48
- type: [String, Array]
49
- }
50
- }, k = {
51
- equals(e, t, r) {
52
- return r ? this.resolveFieldData(e, r) === this.resolveFieldData(t, r) : this.deepEquals(e, t);
53
- },
54
- deepEquals(e, t) {
55
- if (e === t)
56
- return !0;
57
- if (e && t && typeof e == "object" && typeof t == "object") {
58
- const r = Array.isArray(e), o = Array.isArray(t);
59
- let n, l, a;
60
- if (r && o) {
61
- if (l = e.length, l != t.length)
62
- return !1;
63
- for (n = l; n-- !== 0; )
64
- if (!this.deepEquals(e[n], t[n]))
65
- return !1;
66
- return !0;
67
- }
68
- if (r != o)
69
- return !1;
70
- const c = e instanceof Date, d = t instanceof Date;
71
- if (c != d)
72
- return !1;
73
- if (c && d)
74
- return e.getTime() == t.getTime();
75
- const f = e instanceof RegExp, i = t instanceof RegExp;
76
- if (f != i)
77
- return !1;
78
- if (f && i)
79
- return e.toString() == t.toString();
80
- const s = Object.keys(e);
81
- if (l = s.length, l !== Object.keys(t).length)
82
- return !1;
83
- for (n = l; n-- !== 0; )
84
- if (!Object.prototype.hasOwnProperty.call(t, s[n]))
85
- return !1;
86
- for (n = l; n-- !== 0; )
87
- if (a = s[n], !this.deepEquals(e[a], t[a]))
88
- return !1;
89
- return !0;
90
- }
91
- return e !== e && t !== t;
92
- },
93
- resolveFieldData(e, t) {
94
- if (e && Object.keys(e).length && t) {
95
- if (t.indexOf(".") === -1)
96
- return e[t];
97
- {
98
- const r = t.split(".");
99
- let o = e;
100
- for (let n = 0, l = r.length; n < l; ++n) {
101
- if (e == null)
102
- return null;
103
- o = o[r[n]];
104
- }
105
- return o;
106
- }
107
- } else
108
- return null;
109
- },
110
- isFunction(e) {
111
- return !!(e && e.constructor && e.call && e.apply);
112
- },
113
- findIndexInList(e, t) {
114
- let r = -1;
115
- if (t) {
116
- for (let o = 0; o < t.length; o++)
117
- if (this.equals(t[o], e)) {
118
- r = o;
119
- break;
120
- }
121
- }
122
- return r;
123
- },
124
- contains(e, t) {
125
- if (e != null && t && t.length) {
126
- for (const r of t)
127
- if (this.equals(e, r))
128
- return !0;
129
- }
130
- return !1;
131
- },
132
- isEmpty(e) {
133
- return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
134
- },
135
- isNotEmpty(e) {
136
- return !this.isEmpty(e);
137
- },
138
- pickBy(e, t) {
139
- return Object.fromEntries(
140
- Object.entries(e).filter(([r]) => t(r))
141
- );
142
- },
143
- removeFromList(e, t) {
144
- const r = this.findIndexInList(e, t);
145
- return r > -1 ? t.filter((o, n) => n !== r) : t;
146
- },
147
- isString(e) {
148
- return typeof e == "string" || e instanceof String;
149
- },
150
- propsToObject(e) {
151
- return Object.keys(e).reduce((t, r) => {
152
- var o, n, l, a, c;
153
- return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (o = e[r]) != null && o.type && (Array.isArray(e[r].type) ? t[r] = ((n = e[r]) == null ? void 0 : n.default) || ((l = e[r]) == null ? void 0 : l.type[0]()) : t[r] = ((a = e[r]) == null ? void 0 : a.default) || ((c = e[r]) == null ? void 0 : c.type())), t;
154
- }, {});
155
- },
156
- filterArray(e, t, r) {
157
- return e.filter((o) => t.some((n) => typeof n == "string" ? o[r] == n : this.equals(
158
- o[r],
159
- n[r]
160
- )));
161
- },
162
- kebabCase(e) {
163
- var t, r;
164
- if (e)
165
- return (r = (t = e.match(
166
- /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
167
- )) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
168
- }
169
- };
170
- function G(e, t) {
171
- const r = { [`${e}`]: !0 };
172
- return {
173
- bemCssClasses: p(() => Object.keys(t).reduce((n, l) => {
174
- const a = u(t[l]) || !1;
175
- if (!a)
176
- return n;
177
- if (l === "modifiers") {
178
- const c = Array.isArray(a) ? a : [a];
179
- return {
180
- ...n,
181
- ...c.reduce(
182
- (d, f) => ({
183
- ...d,
184
- [`${e}--${k.kebabCase(
185
- f
186
- )}`]: !0
187
- }),
188
- {}
189
- )
190
- };
191
- } else
192
- return {
193
- ...n,
194
- [`${e}--${k.kebabCase(l)}`]: a
195
- };
196
- }, r) || {})
197
- };
198
- }
199
- const J = /* @__PURE__ */ D({
200
- __name: "VvIcon",
201
- props: W,
202
- setup(e) {
203
- const t = e, r = C(!0), { modifiers: o } = E(t), n = B("ds"), { bemCssClasses: l } = G("vv-icon", {
204
- modifiers: o
205
- }), a = p(() => t.provider || (n == null ? void 0 : n.provider)), c = p(() => {
206
- const i = t.name || "", s = `@${a.value}:${t.prefix}:${t.name}`;
207
- return _(i) ? i : _(s) ? s : (n == null ? void 0 : n.iconsCollections.find((g) => {
208
- const v = `@${a.value}:${g.prefix}:${i}`;
209
- if (_(v))
210
- return v;
211
- })) || i;
212
- });
213
- function d(i) {
214
- let s = null;
215
- if (typeof window > "u") {
216
- const { JSDOM: b } = require("jsdom");
217
- s = new b().window;
218
- }
219
- return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(i, "text/html").querySelector("svg");
220
- }
221
- function f(i) {
222
- const s = d(i), g = (s == null ? void 0 : s.innerHTML.trim()) || "";
223
- s && g && Z(`@${a.value}:${t.prefix}:${t.name}`, {
224
- body: g,
225
- height: s.viewBox.baseVal.height,
226
- width: s.viewBox.baseVal.width
227
- });
228
- }
229
- return n && (t.src ? (r.value = !1, n.fetchIcon(t.src).then((i) => {
230
- i && (f(i), r.value = !0);
231
- }).catch((i) => {
232
- throw new Error(`During fetch icon: ${i == null ? void 0 : i.message}`);
233
- })) : t.svg && f(t.svg)), (i, s) => r.value ? (h(), O(u(z), w({
234
- key: 0,
235
- class: u(l)
236
- }, {
237
- ...i.$props,
238
- provider: u(a),
239
- icon: u(c)
240
- }), null, 16, ["class"])) : A("", !0);
241
- }
242
- }), U = {
243
- key: 0,
244
- class: "vv-dialog__header"
245
- }, K = ["onClick"], Q = { class: "vv-dialog__content" }, X = {
246
- key: 1,
247
- class: "vv-dialog__footer"
248
- }, ne = /* @__PURE__ */ D({
249
- __name: "VvDialog",
250
- props: H,
251
- emits: R,
252
- setup(e, { emit: t }) {
253
- const r = e, o = T(r, "open", t), n = C(!0), l = C(null), a = p(() => {
254
- const { id: s } = r;
255
- return {
256
- id: s,
257
- open: n.value
258
- };
259
- }), c = p(() => ({
260
- "vv-dialog": !0,
261
- "vv-dialog--small": r.size === y.small,
262
- "vv-dialog--fullscreen": r.size === y.fullscreen
263
- })), d = p(() => `vv-dialog--${r.transition}`), f = {
264
- "after-enter": () => {
265
- n.value = !0, t("open");
266
- },
267
- "after-leave": () => {
268
- n.value = !1, t("close");
269
- }
270
- };
271
- L(l, () => {
272
- r.autoClose && (o.value = !1);
273
- });
274
- function i() {
275
- o.value = !1;
276
- }
277
- return (s, g) => (h(), O(j, w({ name: u(d) }, I(f)), {
278
- default: q(() => [
279
- x(m("dialog", w(u(a), { class: u(c) }), [
280
- m("article", {
281
- ref_key: "modalWrapper",
282
- ref: l,
283
- class: "vv-dialog__wrapper"
284
- }, [
285
- s.$slots.header || s.title ? (h(), $("header", U, [
286
- S(s.$slots, "header", {}, () => [
287
- F(N(s.title) + " ", 1),
288
- m("button", {
289
- type: "button",
290
- "aria-label": "Close",
291
- class: "vv-dialog__close",
292
- onClick: V(i, ["prevent"])
293
- }, [
294
- P(J, { name: "close" })
295
- ], 8, K)
296
- ])
297
- ])) : A("", !0),
298
- m("div", Q, [
299
- S(s.$slots, "default")
300
- ]),
301
- s.$slots.footer ? (h(), $("footer", X, [
302
- S(s.$slots, "footer")
303
- ])) : A("", !0)
304
- ], 512)
305
- ], 16), [
306
- [M, u(o)]
307
- ])
308
- ]),
309
- _: 3
310
- }, 16, ["name"]));
311
- }
312
- });
313
- export {
314
- ne as default
315
- };
@@ -1 +0,0 @@
1
- (function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("vue"),require("@vueuse/core"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core","@iconify/vue"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.VvDialog=m(r.vue,r.core,r.vue$1))})(this,function(r,m,g){"use strict";const h={normal:"",small:"small",fullscreen:"fullscreen"},_=["open","close","update:open"],C={id:{type:String,required:!0},title:String,open:Boolean,transition:{type:String,default:"fade-block"},size:{type:String,default:h.normal,validator:e=>Object.values(h).includes(e)},autoClose:{type:Boolean,default:!0}},k={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}},S={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const n=Array.isArray(e),i=Array.isArray(t);let o,c,a;if(n&&i){if(c=e.length,c!=t.length)return!1;for(o=c;o--!==0;)if(!this.deepEquals(e[o],t[o]))return!1;return!0}if(n!=i)return!1;const f=e instanceof Date,u=t instanceof Date;if(f!=u)return!1;if(f&&u)return e.getTime()==t.getTime();const d=e instanceof RegExp,l=t instanceof RegExp;if(d!=l)return!1;if(d&&l)return e.toString()==t.toString();const s=Object.keys(e);if(c=s.length,c!==Object.keys(t).length)return!1;for(o=c;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=c;o--!==0;)if(a=s[o],!this.deepEquals(e[a],t[a]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const n=t.split(".");let i=e;for(let o=0,c=n.length;o<c;++o){if(e==null)return null;i=i[n[o]]}return i}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let n=-1;if(t){for(let i=0;i<t.length;i++)if(this.equals(t[i],e)){n=i;break}}return n},contains(e,t){if(e!=null&&t&&t.length){for(const n of t)if(this.equals(e,n))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t(n)))},removeFromList(e,t){const n=this.findIndexInList(e,t);return n>-1?t.filter((i,o)=>o!==n):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,n)=>{var i,o,c,a,f;return this.isFunction(e[n])?t[n]=e[n]():Array.isArray(e[n])?t[n]=e[n][0]():(i=e[n])!=null&&i.type&&(Array.isArray(e[n].type)?t[n]=((o=e[n])==null?void 0:o.default)||((c=e[n])==null?void 0:c.type[0]()):t[n]=((a=e[n])==null?void 0:a.default)||((f=e[n])==null?void 0:f.type())),t},{})},filterArray(e,t,n){return e.filter(i=>t.some(o=>typeof o=="string"?i[n]==o:this.equals(i[n],o[n])))},kebabCase(e){var t,n;if(e)return(n=(t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:t.join("-"))==null?void 0:n.toLowerCase()}};function w(e,t){const n={[`${e}`]:!0};return{bemCssClasses:r.computed(()=>Object.keys(t).reduce((o,c)=>{const a=r.unref(t[c])||!1;if(!a)return o;if(c==="modifiers"){const f=Array.isArray(a)?a:[a];return{...o,...f.reduce((u,d)=>({...u,[`${e}--${S.kebabCase(d)}`]:!0}),{})}}else return{...o,[`${e}--${S.kebabCase(c)}`]:a}},n)||{})}}const A=r.defineComponent({__name:"VvIcon",props:k,setup(e){const t=e,n=r.ref(!0),{modifiers:i}=r.toRefs(t),o=r.inject("ds"),{bemCssClasses:c}=w("vv-icon",{modifiers:i}),a=r.computed(()=>t.provider||(o==null?void 0:o.provider)),f=r.computed(()=>{const l=t.name||"",s=`@${a.value}:${t.prefix}:${t.name}`;return g.iconExists(l)?l:g.iconExists(s)?s:(o==null?void 0:o.iconsCollections.find(p=>{const y=`@${a.value}:${p.prefix}:${l}`;if(g.iconExists(y))return y}))||l});function u(l){let s=null;if(typeof window>"u"){const{JSDOM:$}=require("jsdom");s=new $().window}return(s?new s.DOMParser:new window.DOMParser).parseFromString(l,"text/html").querySelector("svg")}function d(l){const s=u(l),p=(s==null?void 0:s.innerHTML.trim())||"";s&&p&&g.addIcon(`@${a.value}:${t.prefix}:${t.name}`,{body:p,height:s.viewBox.baseVal.height,width:s.viewBox.baseVal.width})}return o&&(t.src?(n.value=!1,o.fetchIcon(t.src).then(l=>{l&&(d(l),n.value=!0)}).catch(l=>{throw new Error(`During fetch icon: ${l==null?void 0:l.message}`)})):t.svg&&d(t.svg)),(l,s)=>n.value?(r.openBlock(),r.createBlock(r.unref(g.Icon),r.mergeProps({key:0,class:r.unref(c)},{...l.$props,provider:r.unref(a),icon:r.unref(f)}),null,16,["class"])):r.createCommentVNode("",!0)}}),E={key:0,class:"vv-dialog__header"},D=["onClick"],B={class:"vv-dialog__content"},O={key:1,class:"vv-dialog__footer"};return r.defineComponent({__name:"VvDialog",props:C,emits:_,setup(e,{emit:t}){const n=e,i=m.useVModel(n,"open",t),o=r.ref(!0),c=r.ref(null),a=r.computed(()=>{const{id:s}=n;return{id:s,open:o.value}}),f=r.computed(()=>({"vv-dialog":!0,"vv-dialog--small":n.size===h.small,"vv-dialog--fullscreen":n.size===h.fullscreen})),u=r.computed(()=>`vv-dialog--${n.transition}`),d={"after-enter":()=>{o.value=!0,t("open")},"after-leave":()=>{o.value=!1,t("close")}};m.onClickOutside(c,()=>{n.autoClose&&(i.value=!1)});function l(){i.value=!1}return(s,p)=>(r.openBlock(),r.createBlock(r.Transition,r.mergeProps({name:r.unref(u)},r.toHandlers(d)),{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("dialog",r.mergeProps(r.unref(a),{class:r.unref(f)}),[r.createElementVNode("article",{ref_key:"modalWrapper",ref:c,class:"vv-dialog__wrapper"},[s.$slots.header||s.title?(r.openBlock(),r.createElementBlock("header",E,[r.renderSlot(s.$slots,"header",{},()=>[r.createTextVNode(r.toDisplayString(s.title)+" ",1),r.createElementVNode("button",{type:"button","aria-label":"Close",class:"vv-dialog__close",onClick:r.withModifiers(l,["prevent"])},[r.createVNode(A,{name:"close"})],8,D)])])):r.createCommentVNode("",!0),r.createElementVNode("div",B,[r.renderSlot(s.$slots,"default")]),s.$slots.footer?(r.openBlock(),r.createElementBlock("footer",O,[r.renderSlot(s.$slots,"footer")])):r.createCommentVNode("",!0)],512)],16),[[r.vShow,r.unref(i)]])]),_:3},16,["name"]))}})});
@@ -1,52 +0,0 @@
1
- import type { PropType } from 'vue';
2
- export interface Option {
3
- [key: string]: any;
4
- }
5
- export declare const VvDropdownProps: {
6
- /**
7
- * modelValue can be an Object, a String or an Array of Object/String
8
- */
9
- modelValue: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
10
- /**
11
- * Label of "no results" options
12
- */
13
- labelNoResult: {
14
- type: StringConstructor;
15
- default: string;
16
- };
17
- /**
18
- * Select options, can be string[] or object[]
19
- */
20
- options: {
21
- type: PropType<(string | Option)[]>;
22
- required: boolean;
23
- };
24
- /**
25
- * Use objects as modelValue (object or object[])
26
- */
27
- useObject: BooleanConstructor;
28
- /**
29
- * Manage modelValue as string[] or object[]
30
- */
31
- multiple: BooleanConstructor;
32
- /**
33
- * The max number of selected values
34
- */
35
- maxValues: (StringConstructor | NumberConstructor)[];
36
- /**
37
- * Used when options are objects: key to use for option label
38
- */
39
- labelKey: {
40
- type: StringConstructor;
41
- default: string;
42
- };
43
- /**
44
- * Used when options are objects: key to use for option label
45
- */
46
- valueKey: {
47
- type: StringConstructor;
48
- default: string;
49
- };
50
- modifiers: (StringConstructor | ArrayConstructor)[];
51
- disabled: BooleanConstructor;
52
- };
@@ -1,236 +0,0 @@
1
- import { computed as C, unref as g, defineComponent as E, toRefs as S, openBlock as b, createElementBlock as A, normalizeClass as q, createElementVNode as O, toDisplayString as k, createCommentVNode as x, Fragment as B, renderList as D, createTextVNode as _ } from "vue";
2
- import { v4 as $ } from "uuid";
3
- const f = {
4
- equals(e, r, t) {
5
- return t ? this.resolveFieldData(e, t) === this.resolveFieldData(r, t) : this.deepEquals(e, r);
6
- },
7
- deepEquals(e, r) {
8
- if (e === r)
9
- return !0;
10
- if (e && r && typeof e == "object" && typeof r == "object") {
11
- const t = Array.isArray(e), l = Array.isArray(r);
12
- let n, i, o;
13
- if (t && l) {
14
- if (i = e.length, i != r.length)
15
- return !1;
16
- for (n = i; n-- !== 0; )
17
- if (!this.deepEquals(e[n], r[n]))
18
- return !1;
19
- return !0;
20
- }
21
- if (t != l)
22
- return !1;
23
- const a = e instanceof Date, c = r instanceof Date;
24
- if (a != c)
25
- return !1;
26
- if (a && c)
27
- return e.getTime() == r.getTime();
28
- const d = e instanceof RegExp, h = r instanceof RegExp;
29
- if (d != h)
30
- return !1;
31
- if (d && h)
32
- return e.toString() == r.toString();
33
- const s = Object.keys(e);
34
- if (i = s.length, i !== Object.keys(r).length)
35
- return !1;
36
- for (n = i; n-- !== 0; )
37
- if (!Object.prototype.hasOwnProperty.call(r, s[n]))
38
- return !1;
39
- for (n = i; n-- !== 0; )
40
- if (o = s[n], !this.deepEquals(e[o], r[o]))
41
- return !1;
42
- return !0;
43
- }
44
- return e !== e && r !== r;
45
- },
46
- resolveFieldData(e, r) {
47
- if (e && Object.keys(e).length && r) {
48
- if (r.indexOf(".") === -1)
49
- return e[r];
50
- {
51
- const t = r.split(".");
52
- let l = e;
53
- for (let n = 0, i = t.length; n < i; ++n) {
54
- if (e == null)
55
- return null;
56
- l = l[t[n]];
57
- }
58
- return l;
59
- }
60
- } else
61
- return null;
62
- },
63
- isFunction(e) {
64
- return !!(e && e.constructor && e.call && e.apply);
65
- },
66
- findIndexInList(e, r) {
67
- let t = -1;
68
- if (r) {
69
- for (let l = 0; l < r.length; l++)
70
- if (this.equals(r[l], e)) {
71
- t = l;
72
- break;
73
- }
74
- }
75
- return t;
76
- },
77
- contains(e, r) {
78
- if (e != null && r && r.length) {
79
- for (const t of r)
80
- if (this.equals(e, t))
81
- return !0;
82
- }
83
- return !1;
84
- },
85
- isEmpty(e) {
86
- return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
87
- },
88
- isNotEmpty(e) {
89
- return !this.isEmpty(e);
90
- },
91
- pickBy(e, r) {
92
- return Object.fromEntries(
93
- Object.entries(e).filter(([t]) => r(t))
94
- );
95
- },
96
- removeFromList(e, r) {
97
- const t = this.findIndexInList(e, r);
98
- return t > -1 ? r.filter((l, n) => n !== t) : r;
99
- },
100
- isString(e) {
101
- return typeof e == "string" || e instanceof String;
102
- },
103
- propsToObject(e) {
104
- return Object.keys(e).reduce((r, t) => {
105
- var l, n, i, o, a;
106
- return this.isFunction(e[t]) ? r[t] = e[t]() : Array.isArray(e[t]) ? r[t] = e[t][0]() : (l = e[t]) != null && l.type && (Array.isArray(e[t].type) ? r[t] = ((n = e[t]) == null ? void 0 : n.default) || ((i = e[t]) == null ? void 0 : i.type[0]()) : r[t] = ((o = e[t]) == null ? void 0 : o.default) || ((a = e[t]) == null ? void 0 : a.type())), r;
107
- }, {});
108
- },
109
- filterArray(e, r, t) {
110
- return e.filter((l) => r.some((n) => typeof n == "string" ? l[t] == n : this.equals(
111
- l[t],
112
- n[t]
113
- )));
114
- },
115
- kebabCase(e) {
116
- var r, t;
117
- if (e)
118
- return (t = (r = e.match(
119
- /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
120
- )) == null ? void 0 : r.join("-")) == null ? void 0 : t.toLowerCase();
121
- }
122
- };
123
- function w(e, r) {
124
- const t = { [`${e}`]: !0 };
125
- return {
126
- bemCssClasses: C(() => Object.keys(r).reduce((n, i) => {
127
- const o = g(r[i]) || !1;
128
- if (!o)
129
- return n;
130
- if (i === "modifiers") {
131
- const a = Array.isArray(o) ? o : [o];
132
- return {
133
- ...n,
134
- ...a.reduce(
135
- (c, d) => ({
136
- ...c,
137
- [`${e}--${f.kebabCase(
138
- d
139
- )}`]: !0
140
- }),
141
- {}
142
- )
143
- };
144
- } else
145
- return {
146
- ...n,
147
- [`${e}--${f.kebabCase(i)}`]: o
148
- };
149
- }, t) || {})
150
- };
151
- }
152
- const F = {
153
- disabled: Boolean
154
- }, N = {
155
- modifiers: [String, Array]
156
- }, L = {
157
- ...F,
158
- ...N,
159
- modelValue: [String, Array, Object],
160
- labelNoResult: { type: String, default: "No results" },
161
- options: {
162
- type: Array,
163
- required: !0
164
- },
165
- useObject: Boolean,
166
- multiple: Boolean,
167
- maxValues: [Number, String],
168
- labelKey: { type: String, default: "label" },
169
- valueKey: { type: String, default: "value" }
170
- }, R = { key: 0 }, I = ["for"], K = ["id", "type", "value", "checked", "disabled"], Z = /* @__PURE__ */ E({
171
- __name: "VvDropdown",
172
- props: L,
173
- emits: ["update:modelValue"],
174
- setup(e, { emit: r }) {
175
- const t = e, l = $(), { modifiers: n, disabled: i } = S(t), { bemCssClasses: o } = w("vv-dropdown", {
176
- modifiers: n,
177
- disabled: i
178
- });
179
- function a(s) {
180
- return Array.isArray(t.modelValue) ? f.contains(s, t.modelValue) || f.contains(c(s), t.modelValue) : f.equals(s, t.modelValue) || f.equals(c(s), t.modelValue);
181
- }
182
- function c(s) {
183
- return typeof s == "string" ? s : String(s[t.valueKey]);
184
- }
185
- function d(s) {
186
- return typeof s == "string" ? s : s[t.labelKey];
187
- }
188
- function h(s) {
189
- var m, p;
190
- const V = s.target;
191
- let u = V.value;
192
- if (u = (t.useObject ? (m = t.options) == null ? void 0 : m.find(
193
- (j) => j[t.valueKey] == u
194
- ) : null) || u, t.multiple) {
195
- if (typeof t.maxValues < "u" && t.maxValues >= 0 && ((p = t.modelValue) == null ? void 0 : p.length) >= t.maxValues && (Array.isArray(t.modelValue) && !f.contains(u, t.modelValue) || t.maxValues == 0)) {
196
- V.checked = !1;
197
- return;
198
- }
199
- Array.isArray(t.modelValue) ? u = f.contains(u, t.modelValue) ? f.removeFromList(u, t.modelValue) : [...t.modelValue, u] : u = [u];
200
- }
201
- r("update:modelValue", u);
202
- }
203
- return (s, V) => {
204
- var u;
205
- return b(), A("ul", {
206
- class: q(g(o)),
207
- role: "listbox"
208
- }, [
209
- (u = s.options) != null && u.length ? x("", !0) : (b(), A("li", R, [
210
- O("label", null, k(s.labelNoResult), 1)
211
- ])),
212
- (b(!0), A(B, null, D(s.options, (y, m) => {
213
- var p;
214
- return b(), A("li", { key: m }, [
215
- O("label", {
216
- for: `dropdown-${m}-${g(l)}`
217
- }, [
218
- O("input", {
219
- id: `dropdown-${m}-${g(l)}`,
220
- type: s.multiple ? "checkbox" : "radio",
221
- value: c(y),
222
- checked: a(y),
223
- disabled: typeof y == "object" ? (p = y.disabled) != null ? p : g(i) : g(i),
224
- onInput: h
225
- }, null, 40, K),
226
- _(" " + k(d(y)), 1)
227
- ], 8, I)
228
- ]);
229
- }), 128))
230
- ], 2);
231
- };
232
- }
233
- });
234
- export {
235
- Z as default
236
- };
@@ -1 +0,0 @@
1
- (function(n,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("vue"),require("uuid")):typeof define=="function"&&define.amd?define(["vue","uuid"],g):(n=typeof globalThis<"u"?globalThis:n||self,n.VvDropdown=g(n.vue,n.uuid))})(this,function(n,g){"use strict";const f={equals(e,r,t){return t?this.resolveFieldData(e,t)===this.resolveFieldData(r,t):this.deepEquals(e,r)},deepEquals(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){const t=Array.isArray(e),i=Array.isArray(r);let s,o,a;if(t&&i){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!this.deepEquals(e[s],r[s]))return!1;return!0}if(t!=i)return!1;const c=e instanceof Date,d=r instanceof Date;if(c!=d)return!1;if(c&&d)return e.getTime()==r.getTime();const y=e instanceof RegExp,b=r instanceof RegExp;if(y!=b)return!1;if(y&&b)return e.toString()==r.toString();const l=Object.keys(e);if(o=l.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,l[s]))return!1;for(s=o;s--!==0;)if(a=l[s],!this.deepEquals(e[a],r[a]))return!1;return!0}return e!==e&&r!==r},resolveFieldData(e,r){if(e&&Object.keys(e).length&&r){if(r.indexOf(".")===-1)return e[r];{const t=r.split(".");let i=e;for(let s=0,o=t.length;s<o;++s){if(e==null)return null;i=i[t[s]]}return i}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,r){let t=-1;if(r){for(let i=0;i<r.length;i++)if(this.equals(r[i],e)){t=i;break}}return t},contains(e,r){if(e!=null&&r&&r.length){for(const t of r)if(this.equals(e,t))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,r){return Object.fromEntries(Object.entries(e).filter(([t])=>r(t)))},removeFromList(e,r){const t=this.findIndexInList(e,r);return t>-1?r.filter((i,s)=>s!==t):r},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((r,t)=>{var i,s,o,a,c;return this.isFunction(e[t])?r[t]=e[t]():Array.isArray(e[t])?r[t]=e[t][0]():(i=e[t])!=null&&i.type&&(Array.isArray(e[t].type)?r[t]=((s=e[t])==null?void 0:s.default)||((o=e[t])==null?void 0:o.type[0]()):r[t]=((a=e[t])==null?void 0:a.default)||((c=e[t])==null?void 0:c.type())),r},{})},filterArray(e,r,t){return e.filter(i=>r.some(s=>typeof s=="string"?i[t]==s:this.equals(i[t],s[t])))},kebabCase(e){var r,t;if(e)return(t=(r=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:r.join("-"))==null?void 0:t.toLowerCase()}};function V(e,r){const t={[`${e}`]:!0};return{bemCssClasses:n.computed(()=>Object.keys(r).reduce((s,o)=>{const a=n.unref(r[o])||!1;if(!a)return s;if(o==="modifiers"){const c=Array.isArray(a)?a:[a];return{...s,...c.reduce((d,y)=>({...d,[`${e}--${f.kebabCase(y)}`]:!0}),{})}}else return{...s,[`${e}--${f.kebabCase(o)}`]:a}},t)||{})}}const k={...{disabled:Boolean},...{modifiers:[String,Array]},modelValue:[String,Array,Object],labelNoResult:{type:String,default:"No results"},options:{type:Array,required:!0},useObject:Boolean,multiple:Boolean,maxValues:[Number,String],labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},E={key:0},O=["for"],j=["id","type","value","checked","disabled"];return n.defineComponent({__name:"VvDropdown",props:k,emits:["update:modelValue"],setup(e,{emit:r}){const t=e,i=g.v4(),{modifiers:s,disabled:o}=n.toRefs(t),{bemCssClasses:a}=V("vv-dropdown",{modifiers:s,disabled:o});function c(l){return Array.isArray(t.modelValue)?f.contains(l,t.modelValue)||f.contains(d(l),t.modelValue):f.equals(l,t.modelValue)||f.equals(d(l),t.modelValue)}function d(l){return typeof l=="string"?l:String(l[t.valueKey])}function y(l){return typeof l=="string"?l:l[t.labelKey]}function b(l){var p,h;const A=l.target;let u=A.value;if(u=(t.useObject?(p=t.options)==null?void 0:p.find(B=>B[t.valueKey]==u):null)||u,t.multiple){if(typeof t.maxValues<"u"&&t.maxValues>=0&&((h=t.modelValue)==null?void 0:h.length)>=t.maxValues&&(Array.isArray(t.modelValue)&&!f.contains(u,t.modelValue)||t.maxValues==0)){A.checked=!1;return}Array.isArray(t.modelValue)?u=f.contains(u,t.modelValue)?f.removeFromList(u,t.modelValue):[...t.modelValue,u]:u=[u]}r("update:modelValue",u)}return(l,A)=>{var u;return n.openBlock(),n.createElementBlock("ul",{class:n.normalizeClass(n.unref(a)),role:"listbox"},[(u=l.options)!=null&&u.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("li",E,[n.createElementVNode("label",null,n.toDisplayString(l.labelNoResult),1)])),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.options,(m,p)=>{var h;return n.openBlock(),n.createElementBlock("li",{key:p},[n.createElementVNode("label",{for:`dropdown-${p}-${n.unref(i)}`},[n.createElementVNode("input",{id:`dropdown-${p}-${n.unref(i)}`,type:l.multiple?"checkbox":"radio",value:d(m),checked:c(m),disabled:typeof m=="object"&&(h=m.disabled)!=null?h:n.unref(o),onInput:b},null,40,j),n.createTextVNode(" "+n.toDisplayString(y(m)),1)],8,O)])}),128))],2)}}})});