@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.21

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 (258) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +98 -3
  3. package/auto-imports.d.ts +6 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +23 -16
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +70 -14
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
  10. package/dist/components/VvAccordion/index.d.ts +4 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +117 -38
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
  14. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  15. package/dist/components/VvAction/VvAction.es.js +58 -13
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
  18. package/dist/components/VvAction/index.d.ts +25 -4
  19. package/dist/components/VvAlert/VvAlert.es.js +195 -152
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
  22. package/dist/components/VvAlert/index.d.ts +9 -5
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +240 -174
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  27. package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
  28. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  29. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
  30. package/dist/components/VvAvatar/index.d.ts +4 -1
  31. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +111 -36
  32. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  33. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
  34. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  35. package/dist/components/VvBadge/VvBadge.es.js +73 -17
  36. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  37. package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
  38. package/dist/components/VvBadge/index.d.ts +4 -1
  39. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +259 -49
  40. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  41. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
  42. package/dist/components/VvBreadcrumb/index.d.ts +6 -10
  43. package/dist/components/VvButton/VvButton.es.js +187 -141
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
  46. package/dist/components/VvButton/index.d.ts +41 -14
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +69 -16
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +84 -25
  52. package/dist/components/VvCard/VvCard.umd.js +1 -1
  53. package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
  54. package/dist/components/VvCard/index.d.ts +4 -1
  55. package/dist/components/VvCheckbox/VvCheckbox.es.js +91 -22
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
  58. package/dist/components/VvCheckbox/index.d.ts +45 -12
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +180 -67
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +758 -531
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +181 -108
  66. package/dist/components/VvCombobox/index.d.ts +53 -22
  67. package/dist/components/VvDialog/VvDialog.es.js +136 -141
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  70. package/dist/components/VvDropdown/VvDropdown.es.js +121 -55
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
  77. package/dist/components/VvDropdown/index.d.ts +16 -11
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +82 -22
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  81. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  83. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
  84. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  85. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  86. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  88. package/dist/components/VvIcon/index.d.ts +33 -48
  89. package/dist/components/VvInputFile/VvInputFile.es.js +1734 -0
  90. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  91. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +313 -0
  92. package/dist/components/VvInputFile/index.d.ts +179 -0
  93. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  94. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  95. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  96. package/dist/components/VvInputText/VvInputText.es.js +331 -293
  97. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  98. package/dist/components/VvInputText/VvInputText.vue.d.ts +162 -55
  99. package/dist/components/VvInputText/index.d.ts +71 -29
  100. package/dist/components/VvNav/VvNav.es.js +151 -73
  101. package/dist/components/VvNav/VvNav.umd.js +1 -1
  102. package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
  103. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  104. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
  105. package/dist/components/VvNav/index.d.ts +5 -13
  106. package/dist/components/VvNavItem/VvNavItem.es.js +436 -0
  107. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  108. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  109. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  110. package/dist/components/VvProgress/VvProgress.es.js +65 -14
  111. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  112. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  113. package/dist/components/VvProgress/index.d.ts +4 -1
  114. package/dist/components/VvRadio/VvRadio.es.js +89 -21
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
  117. package/dist/components/VvRadio/index.d.ts +44 -11
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +180 -66
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +248 -226
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
  125. package/dist/components/VvSelect/index.d.ts +48 -14
  126. package/dist/components/VvTab/VvTab.es.js +256 -110
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
  129. package/dist/components/VvTab/index.d.ts +13 -4
  130. package/dist/components/VvTextarea/VvTextarea.es.js +229 -212
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
  133. package/dist/components/VvTextarea/index.d.ts +68 -19
  134. package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
  137. package/dist/components/VvTooltip/index.d.ts +4 -1
  138. package/dist/components/common/HintSlot.d.ts +1 -1
  139. package/dist/components/index.d.ts +10 -0
  140. package/dist/components/index.es.js +2902 -1329
  141. package/dist/components/index.umd.js +1 -1
  142. package/dist/composables/alert/useAlert.d.ts +37 -4
  143. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  144. package/dist/composables/index.d.ts +1 -0
  145. package/dist/composables/index.es.js +88 -1
  146. package/dist/composables/index.umd.js +1 -1
  147. package/dist/composables/useBlurhash.d.ts +7 -0
  148. package/dist/composables/useComponentIcon.d.ts +9 -8
  149. package/dist/composables/useVolver.d.ts +1 -1
  150. package/dist/directives/index.d.ts +3 -5
  151. package/dist/directives/index.es.js +92 -31
  152. package/dist/directives/index.umd.js +1 -1
  153. package/dist/directives/v-tooltip.es.js +90 -26
  154. package/dist/directives/v-tooltip.umd.js +1 -1
  155. package/dist/icons.es.js +210 -210
  156. package/dist/icons.umd.js +1 -1
  157. package/dist/index.d.ts +3 -1
  158. package/dist/index.es.js +81 -16
  159. package/dist/index.umd.js +1 -1
  160. package/dist/props/index.d.ts +287 -73
  161. package/dist/resolvers/unplugin.d.ts +6 -1
  162. package/dist/resolvers/unplugin.es.js +78 -10
  163. package/dist/resolvers/unplugin.umd.js +1 -1
  164. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
  165. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
  166. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  167. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  168. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  169. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  170. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  171. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  172. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  173. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  174. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  175. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  176. package/dist/types/alert.d.ts +13 -0
  177. package/dist/types/blurhash.d.ts +12 -0
  178. package/dist/types/floating-ui.d.ts +6 -0
  179. package/dist/types/generic.d.ts +4 -0
  180. package/dist/types/group.d.ts +37 -0
  181. package/dist/types/index.d.ts +7 -0
  182. package/dist/types/input-file.d.ts +16 -0
  183. package/dist/types/nav.d.ts +18 -0
  184. package/dist/utils/ObjectUtilities.d.ts +0 -1
  185. package/dist/workers/blurhash.d.ts +1 -0
  186. package/package.json +97 -80
  187. package/src/Volver.ts +31 -20
  188. package/src/assets/icons/detailed.json +1 -1
  189. package/src/assets/icons/normal.json +1 -1
  190. package/src/assets/icons/simple.json +1 -1
  191. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  192. package/src/components/VvAction/VvAction.vue +5 -2
  193. package/src/components/VvAlert/index.ts +1 -3
  194. package/src/components/VvAlertGroup/index.ts +2 -1
  195. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  196. package/src/components/VvBreadcrumb/index.ts +2 -8
  197. package/src/components/VvButton/VvButton.vue +6 -6
  198. package/src/components/VvButton/index.ts +2 -4
  199. package/src/components/VvCombobox/VvCombobox.vue +24 -16
  200. package/src/components/VvCombobox/index.ts +4 -0
  201. package/src/components/VvIcon/VvIcon.vue +2 -2
  202. package/src/components/VvIcon/index.ts +35 -48
  203. package/src/components/VvInputFile/VvInputFile.vue +365 -0
  204. package/src/components/VvInputFile/index.ts +116 -0
  205. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  206. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  207. package/src/components/VvInputText/VvInputText.vue +17 -18
  208. package/src/components/VvInputText/index.ts +7 -15
  209. package/src/components/VvNav/VvNav.vue +30 -50
  210. package/src/components/VvNav/VvNavItem.vue +18 -0
  211. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  212. package/src/components/VvNav/index.ts +2 -15
  213. package/src/components/VvSelect/VvSelect.vue +5 -8
  214. package/src/components/VvTab/VvTab.vue +63 -35
  215. package/src/components/VvTab/index.ts +10 -4
  216. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  217. package/src/components/index.ts +10 -0
  218. package/src/composables/index.ts +1 -0
  219. package/src/composables/useBlurhash.ts +76 -0
  220. package/src/composables/useComponentIcon.ts +15 -14
  221. package/src/composables/useUniqueId.ts +2 -2
  222. package/src/directives/index.ts +3 -6
  223. package/src/directives/v-tooltip.ts +19 -10
  224. package/src/index.ts +3 -1
  225. package/src/props/index.ts +115 -27
  226. package/src/resolvers/unplugin.ts +24 -14
  227. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  228. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  229. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  230. package/src/stories/Icon/Icon.settings.ts +3 -3
  231. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  232. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  233. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  234. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  235. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  236. package/src/stories/Nav/Nav.settings.ts +3 -4
  237. package/src/stories/Nav/Nav.test.ts +4 -15
  238. package/src/stories/Tab/Tab.settings.ts +9 -9
  239. package/src/stories/Tab/Tab.stories.ts +2 -2
  240. package/src/stories/Tab/Tab.test.ts +6 -14
  241. package/src/stories/argTypes.ts +1 -1
  242. package/src/types/blurhash.ts +21 -0
  243. package/src/types/generic.ts +6 -0
  244. package/src/types/index.ts +7 -0
  245. package/src/types/input-file.ts +18 -0
  246. package/src/types/nav.ts +20 -0
  247. package/src/utils/ObjectUtilities.ts +0 -11
  248. package/src/workers/blurhash.ts +9 -0
  249. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  250. package/dist/components/VvNav/VvNavSeparator.d.ts +0 -2
  251. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  252. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  253. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  254. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  255. package/src/types/generic.d.ts +0 -6
  256. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  257. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  258. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@vueuse/core"),require("@iconify/vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","@iconify/vue","uid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputFile=t(e.vue,e.core,e.vue$1,e.uid)}(this,(function(e,t,l,o){"use strict";const a="add",n="edit",r="download",i={prefix:"normal"};var u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),s=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(s||{}),c=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(c||{}),v=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(v||{});const f=Symbol.for("volver"),p=Symbol.for("buttonGroup"),m=Symbol.for("dropdownTrigger"),g=Symbol.for("dropdownAction");function b(){return e.inject(f)}function y(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const h=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},i),setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=b(),{modifiers:i}=e.toRefs(o),u=y("vv-icon",i),d=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==r?void 0:r.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return r&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),k={to:{type:[String,Object]},href:String,target:{type:String,default:void 0,validator:e=>Object.values(v).includes(e)},rel:{type:String,default:"noopener noreferrer"}},S={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},B={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},L={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},V={disabled:{type:Boolean,default:!1}},C={active:{type:Boolean,default:!1}},w={current:{type:Boolean,default:!1}},A={pressed:{type:Boolean,default:!1}},$={label:{type:[String,Number],default:void 0}},O={readonly:{type:Boolean,default:!1}},_={modifiers:{type:[String,Array],default:void 0}},N={hintLabel:{type:String,default:""}},x={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},j={unselectable:{type:Boolean,default:!0}},R={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const E={...R,name:{type:String,required:!0}},P={...V,...$,...A,...C,...w,...k,type:{type:String,default:s.button,validator:e=>Object.values(s).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:c.button}},I=P;const D=e.defineComponent({name:"VvAction",props:I,emits:["click","mouseover","mouseleave"],setup(t,{expose:l,emit:o}){const a=t,n=o,r=b(),i=e.ref(null);l({$el:i});const{reference:u,bus:d,aria:s,expanded:v}=e.inject(m,{});e.watch((()=>i.value),(e=>{u&&(u.value=e)}));const f=e.computed((()=>a.pressed||(null==v?void 0:v.value))),{role:p}=e.inject(g,{}),y=e.computed((()=>{switch(!0){case a.disabled:return c.button;case void 0!==a.to:return(null==r?void 0:r.nuxt)?c.nuxtLink:c.routerLink;case void 0!==a.href:return c.a;default:return a.defaultTag}})),h=e.computed((()=>{const e={...null==s?void 0:s.value,ariaPressed:!!f.value||void 0,ariaLabel:a.ariaLabel,role:null==p?void 0:p.value};switch(y.value){case c.a:return{...e,href:a.href,target:a.target,rel:a.rel};case c.routerLink:case c.nuxtLink:return{...e,to:a.to,target:a.target};case c.button:return{...e,type:a.type,disabled:a.disabled};default:return e}})),k=e=>{a.disabled?e.preventDefault():(null==d||d.emit("click",e),n("click",e))},S=e=>{null==d||d.emit("mouseover",e),n("mouseover",e)},B=e=>{null==d||d.emit("mouseleave",e),n("mouseleave",e)};return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(h),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(f),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.createCommentVNode(" @slot Default slot "),e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});function F(e,t,l){return l?z(e,l)===z(t,l):M(e,t)}function M(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),o=Array.isArray(t);let a,n,r;if(l&&o){if(n=e.length,n!=t.length)return!1;for(a=n;0!=a--;)if(!M(e[a],t[a]))return!1;return!0}if(l!=o)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!=u)return!1;if(i&&u)return e.getTime()==t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!=s)return!1;if(d&&s)return e.toString()==t.toString();const c=Object.keys(e);if(n=c.length,n!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,c[a]))return!1;for(a=n;0!=a--;)if(r=c[a],!M(e[r],t[r]))return!1;return!0}return e!=e&&t!=t}function z(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,a=l.length;t<a;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function U(e,t){if(null!=e&&t&&t.length)for(const l of t)if(F(e,l))return!0;return!1}function T(t){const l=e.inject(t,void 0),o=e.computed((()=>{return t=l,!(null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length);var t,o}));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){if(null==l?void 0:l.value){const o=e.unref(l.value)[t];return e.computed({get:()=>null==o?void 0:o.value,set(e){o.value=e}})}const n=e.toRef(o,t);return e.computed({get:()=>n.value,set(e){a&&a(`update:${t}`,e)}})}}}const q={...P,...R,..._,...j,...L,...x,iconPosition:{type:String,default:u.left,validator:e=>Object.values(u).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};const H=t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid())));function G(t,l){const o=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==l?void 0:l.value)===d.before?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===d.after?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===u.left?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===u.right?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===u.top?o.value:void 0)),c=e.computed((()=>(null==l?void 0:l.value)===u.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:r,hasIconRight:i,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:n}}const J={key:1,class:"vv-button__label"},K={key:1,class:"vv-button__label"},Q=e.defineComponent({name:"VvButton",props:q,emits:["update:modelValue"],setup(t,{expose:l,emit:o}){const a=t,n=e.useAttrs(),r=e.useSlots(),i=o,{id:d,modifiers:s,iconPosition:c,icon:v,label:f,modelValue:m,disabled:g,toggle:b,unselectable:k}=function(t,l){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=T(p),{id:r,iconPosition:i,icon:u,label:d,pressed:s}=e.toRefs(t),c=n("modelValue",t,l),v=n("toggle",t),f=n("unselectable",t),m=e.computed((()=>(null==o?void 0:o.value.multiple.value)??!1)),g=e.computed((()=>{let e=t.modifiers,l=null==o?void 0:o.value.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),l&&(Array.isArray(l)||(l=l.split(" ")),l.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>{var e;return Boolean(t.disabled||(null==(e=null==o?void 0:o.value)?void 0:e.disabled.value))}));return{group:o,isInGroup:a,modelValue:c,toggle:v,unselectable:f,multiple:m,modifiers:g,disabled:b,id:r,pressed:s,iconPosition:i,icon:u,label:d}}(a,i),S=H(d),B=e.computed((()=>(null==n?void 0:n.name)||S.value)),L=e.ref(null);l({$el:e.computed((()=>{var e;return null==(e=L.value)?void 0:e.$el}))});const V=e.computed((()=>b.value?Array.isArray(m.value)?U(B.value,m.value):F(B.value,m.value):a.pressed)),C=y("vv-button",s,e.computed((()=>({reverse:[u.right,u.bottom].includes(c.value),column:[u.top,u.bottom].includes(c.value),"icon-only":Boolean((null==v?void 0:v.value)&&!(null==f?void 0:f.value)&&!r.default)})))),{hasIcon:w}=G(v),A=e.computed((()=>void 0!==a.value?a.value:B.value)),$=()=>{if(b.value){if(Array.isArray(m.value))return U(A.value,m.value)?void(k.value&&(m.value=m.value.filter((e=>e!==A.value)))):void m.value.push(A.value);if(A.value===m.value&&k.value)return void(m.value=a.uncheckedValue);m.value=A.value}};return(t,l)=>(e.openBlock(),e.createBlock(D,e.mergeProps({disabled:e.unref(g),pressed:e.unref(V),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(S),ref_key:"element",ref:L,class:e.unref(C),onClick:$}),{default:e.withCtx((()=>[e.createCommentVNode(" @slot Default slot "),e.renderSlot(t.$slots,"default",{},(()=>[e.createCommentVNode(" #region loading "),t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" @slot Slot for loading content "),e.renderSlot(t.$slots,"loading",{},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(h,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("v-if",!0)]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" #endregion "),e.createCommentVNode(" #region button "),e.createCommentVNode(" @slot Before label and icon "),e.renderSlot(t.$slots,"before"),e.unref(w)?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0},e.unref(w),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",K,[e.createCommentVNode(" @slot Use this slot for button label "),e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" @slot After label and icon "),e.renderSlot(t.$slots,"after")],64)),e.createCommentVNode(" #endregion ")]))])),_:3},16,["id","class"]))}});function W(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const X={...E,..._,...S,...B,...N,...$,...L,...O,...x,modelValue:{type:Object,required:!0},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:a},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:n},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:r},labelRemove:{type:String,default:"Remove file"}};const Y=["for"],Z={class:"vv-input-file__preview"},ee=["src","alt"],te={class:"vv-input-file__wrapper"},le=["id","readonly","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","name"],oe=["value"],ae={class:"vv-input-file__list"},ne=["onClick"],re=["title","onClick"],ie={class:"vv-input-file__item-name"},ue={class:"vv-input-file__item-info"},de=["title","onClick"];return e.defineComponent({name:"VvInputFile",props:X,emits:["update:modelValue"],setup(l,{emit:o}){const a=l,n=o,r=e.useSlots(),i=function(t,l,o){const a=b(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvInputFile",X,a),{modifiers:u,id:d,readonly:s,icon:c,iconPosition:v,iconDownload:f}=e.toRefs(a),p=H(d),m=e.computed((()=>`${p.value}-hint`)),g=e.computed((()=>{if(!a.progress)return!1;const e="string"==typeof a.progress?parseInt(a.progress):a.progress;return e>0&&e<100})),{hasIconBefore:k,hasIconAfter:S}=G(c,v),{hasIcon:B}=G(f),L=y("vv-input-file",u,e.computed((()=>({dragging:j.value,loading:a.loading&&!g.value,valid:!0===a.valid,invalid:!0===a.invalid,"icon-before":!!k.value,"icon-after":!!S.value,"drop-area":N.value})))),{HintSlot:V,hasHintLabelOrSlot:C,hasInvalidLabelOrSlot:w,hintSlotScope:A}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>W(o.value.invalidLabel))),n=e.computed((()=>W(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||i.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,r,i,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(i,r),$=t.useVModel(a,"modelValue",n),O=e.computed((()=>{var e;return $.value&&(Array.isArray($.value)||(null==(e=$.value)?void 0:e.name))?Array.isArray($.value)?$.value:[$.value]:[]})),_=e.computed((()=>"string"==typeof a.max?parseInt(a.max):a.max)),N=e.computed((()=>a.dropArea&&!s.value)),x=e.computed((()=>!!a.multiple&&(!_.value||_.value-O.value.length>1))),j=e.ref(!1),R=e.ref(),E=()=>{j.value=!0},P=()=>{j.value=!1},I=e=>{var t,l;(null==(t=e.dataTransfer)?void 0:t.files)&&(j.value=!1,F(null==(l=e.dataTransfer)?void 0:l.files))},D=()=>{var e;(null==(e=R.value)?void 0:e.files)&&(F(R.value.files),R.value.value="")},F=e=>{if(!a.multiple)return Array.isArray($.value)?void($.value=[...e]):void($.value=e[0]);let t=[];t=!Array.isArray($.value)&&$.value?[$.value]:$.value&&Array.isArray($.value)?[...$.value]:t;for(const l of e){if(_.value&&t.length>=_.value)break;t.push(l)}$.value=t,z.value=t.length-1},M=()=>{R.value&&(s.value||R.value.click())},z=e.ref(0),U=["image/jpeg","image/png"],T=e.computed((()=>{if(0===O.value.length)return;if(O.value[z.value]instanceof File){const e=O.value[z.value];if(!U.includes(e.type))return;return URL.createObjectURL(e)}const e=O.value[z.value];return e.thumbnailUrl?e.thumbnailUrl:U.includes(e.type)?e.url:void 0}));e.watch(T,((e,t)=>{t&&URL.revokeObjectURL(t)})),e.onBeforeUnmount((()=>{T.value&&URL.revokeObjectURL(T.value)}));const q=e=>{if(e)return Math.floor(e/1024)},J=e.computed((()=>0===O.value.length||x.value?a.labelAdd:a.labelReplace)),K=e.computed((()=>0===O.value.length||x.value?a.iconAdd:a.iconReplace));return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(L))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(p)},e.toDisplayString(t.label),9,Y)):e.createCommentVNode("v-if",!0),N.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vv-input-file__drop-area",onDragenter:e.withModifiers(E,["prevent","stop"]),onDragleave:e.withModifiers(P,["prevent","stop"]),onDrop:e.withModifiers(I,["prevent","stop"]),onDragover:l[0]||(l[0]=e.withModifiers((()=>{}),["prevent","stop"])),onClick:e.withModifiers(M,["stop"])},[e.renderSlot(t.$slots,"drop-area",{},(()=>[e.createElementVNode("picture",Z,[T.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:T.value,alt:O.value[z.value].name},null,8,ee)):e.createCommentVNode("v-if",!0)]),e.unref(s)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(Q,{key:0,modifiers:"action",label:T.value?void 0:J.value,title:T.value?J.value:void 0,class:e.normalizeClass({"vv-input-file__drop-area-action":T.value}),icon:K.value,onClick:e.withModifiers(M,["stop"])},null,8,["label","title","class","icon"]))]))],32)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",te,[e.unref(k)?(e.openBlock(),e.createBlock(h,e.normalizeProps(e.mergeProps({key:0},e.unref(k))),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",{id:e.unref(p),ref_key:"inputEl",ref:R,type:"file",readonly:e.unref(s),placeholder:t.placeholder,"aria-describedby":e.unref(C)?m.value:void 0,"aria-invalid":t.invalid,"aria-errormessage":e.unref(w)?m.value:void 0,multiple:x.value,accept:t.accept,name:t.name,onChange:D},null,40,le),g.value?(e.openBlock(),e.createElementBlock("progress",{key:1,class:"vv-input-file__progress",value:t.progress,max:"100"},e.toDisplayString(t.progress)+"% ",9,oe)):e.createCommentVNode("v-if",!0),e.unref(S)?(e.openBlock(),e.createBlock(h,e.normalizeProps(e.mergeProps({key:2},e.unref(S))),null,16)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("ul",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,((l,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["vv-input-file__item",{active:o===z.value&&N.value&&O.value.length>1}]),onClick:e.withModifiers((e=>(e=>{z.value=e})(o)),["stop"])},[e.unref(B)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vv-input-file__item-action",title:t.labelDownload,onClick:e.withModifiers((e=>(e=>{const t=document.createElement("a");e instanceof File?t.href=URL.createObjectURL(e):e.url&&(t.href=e.url),t.setAttribute("download",e.name),document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href)})(l)),["stop"])},[e.createVNode(h,e.normalizeProps(e.guardReactiveProps(e.unref(B))),null,16)],8,re)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ie,e.toDisplayString(l.name),1),e.createElementVNode("small",ue,e.toDisplayString(q(l.size))+" KB ",1),e.unref(s)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:t.labelRemove,onClick:e.withModifiers((e=>(e=>{if(!Array.isArray($.value))return void($.value=void 0);const t=[...$.value];t.splice(e,1),$.value=t})(o)),["stop"])},null,8,de))],10,ne)))),128))]),e.createVNode(e.unref(V),{id:m.value,class:"vv-input-file__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
@@ -0,0 +1,313 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: globalThis.PropType<{
4
+ name: string;
5
+ size: number;
6
+ type: string;
7
+ url: string;
8
+ thumbnailUrl?: string | undefined;
9
+ lastModified?: number | undefined;
10
+ } | File | ({
11
+ name: string;
12
+ size: number;
13
+ type: string;
14
+ url: string;
15
+ thumbnailUrl?: string | undefined;
16
+ lastModified?: number | undefined;
17
+ } | File)[]>;
18
+ required: boolean;
19
+ };
20
+ progress: {
21
+ type: (StringConstructor | NumberConstructor)[];
22
+ default: undefined;
23
+ };
24
+ placeholder: {
25
+ type: StringConstructor;
26
+ default: undefined;
27
+ };
28
+ accept: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ multiple: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ max: {
37
+ type: (StringConstructor | NumberConstructor)[];
38
+ default: undefined;
39
+ };
40
+ dropArea: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ labelAdd: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ iconAdd: {
49
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
50
+ default: "add";
51
+ };
52
+ labelReplace: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ iconReplace: {
57
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
58
+ default: "edit";
59
+ };
60
+ labelDownload: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ iconDownload: {
65
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
66
+ default: "download";
67
+ };
68
+ labelRemove: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ icon: {
73
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
74
+ default: undefined;
75
+ };
76
+ iconPosition: {
77
+ type: globalThis.PropType<"before" | "after">;
78
+ default: import("../../constants").Position;
79
+ validation: (value: import("../../constants").Position) => boolean;
80
+ };
81
+ readonly: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ loading: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
89
+ loadingLabel: {
90
+ type: StringConstructor;
91
+ default: string;
92
+ };
93
+ label: {
94
+ type: (StringConstructor | NumberConstructor)[];
95
+ default: undefined;
96
+ };
97
+ hintLabel: {
98
+ type: StringConstructor;
99
+ default: string;
100
+ };
101
+ invalid: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
105
+ invalidLabel: {
106
+ type: (ArrayConstructor | StringConstructor)[];
107
+ default: undefined;
108
+ };
109
+ valid: {
110
+ type: BooleanConstructor;
111
+ default: boolean;
112
+ };
113
+ validLabel: {
114
+ type: (ArrayConstructor | StringConstructor)[];
115
+ default: undefined;
116
+ };
117
+ modifiers: {
118
+ type: globalThis.PropType<string | string[]>;
119
+ default: undefined;
120
+ };
121
+ name: {
122
+ type: StringConstructor;
123
+ required: boolean;
124
+ };
125
+ id: (StringConstructor | NumberConstructor)[];
126
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
127
+ "update:modelValue": (args_0: File | undefined) => void;
128
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
129
+ modelValue: {
130
+ type: globalThis.PropType<{
131
+ name: string;
132
+ size: number;
133
+ type: string;
134
+ url: string;
135
+ thumbnailUrl?: string | undefined;
136
+ lastModified?: number | undefined;
137
+ } | File | ({
138
+ name: string;
139
+ size: number;
140
+ type: string;
141
+ url: string;
142
+ thumbnailUrl?: string | undefined;
143
+ lastModified?: number | undefined;
144
+ } | File)[]>;
145
+ required: boolean;
146
+ };
147
+ progress: {
148
+ type: (StringConstructor | NumberConstructor)[];
149
+ default: undefined;
150
+ };
151
+ placeholder: {
152
+ type: StringConstructor;
153
+ default: undefined;
154
+ };
155
+ accept: {
156
+ type: StringConstructor;
157
+ default: string;
158
+ };
159
+ multiple: {
160
+ type: BooleanConstructor;
161
+ default: boolean;
162
+ };
163
+ max: {
164
+ type: (StringConstructor | NumberConstructor)[];
165
+ default: undefined;
166
+ };
167
+ dropArea: {
168
+ type: BooleanConstructor;
169
+ default: boolean;
170
+ };
171
+ labelAdd: {
172
+ type: StringConstructor;
173
+ default: string;
174
+ };
175
+ iconAdd: {
176
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
177
+ default: "add";
178
+ };
179
+ labelReplace: {
180
+ type: StringConstructor;
181
+ default: string;
182
+ };
183
+ iconReplace: {
184
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
185
+ default: "edit";
186
+ };
187
+ labelDownload: {
188
+ type: StringConstructor;
189
+ default: string;
190
+ };
191
+ iconDownload: {
192
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
193
+ default: "download";
194
+ };
195
+ labelRemove: {
196
+ type: StringConstructor;
197
+ default: string;
198
+ };
199
+ icon: {
200
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
201
+ default: undefined;
202
+ };
203
+ iconPosition: {
204
+ type: globalThis.PropType<"before" | "after">;
205
+ default: import("../../constants").Position;
206
+ validation: (value: import("../../constants").Position) => boolean;
207
+ };
208
+ readonly: {
209
+ type: BooleanConstructor;
210
+ default: boolean;
211
+ };
212
+ loading: {
213
+ type: BooleanConstructor;
214
+ default: boolean;
215
+ };
216
+ loadingLabel: {
217
+ type: StringConstructor;
218
+ default: string;
219
+ };
220
+ label: {
221
+ type: (StringConstructor | NumberConstructor)[];
222
+ default: undefined;
223
+ };
224
+ hintLabel: {
225
+ type: StringConstructor;
226
+ default: string;
227
+ };
228
+ invalid: {
229
+ type: BooleanConstructor;
230
+ default: boolean;
231
+ };
232
+ invalidLabel: {
233
+ type: (ArrayConstructor | StringConstructor)[];
234
+ default: undefined;
235
+ };
236
+ valid: {
237
+ type: BooleanConstructor;
238
+ default: boolean;
239
+ };
240
+ validLabel: {
241
+ type: (ArrayConstructor | StringConstructor)[];
242
+ default: undefined;
243
+ };
244
+ modifiers: {
245
+ type: globalThis.PropType<string | string[]>;
246
+ default: undefined;
247
+ };
248
+ name: {
249
+ type: StringConstructor;
250
+ required: boolean;
251
+ };
252
+ id: (StringConstructor | NumberConstructor)[];
253
+ }>> & {
254
+ "onUpdate:modelValue"?: ((args_0: File | undefined) => any) | undefined;
255
+ }, {
256
+ readonly: boolean;
257
+ valid: boolean;
258
+ invalid: boolean;
259
+ multiple: boolean;
260
+ modifiers: string | string[];
261
+ label: string | number;
262
+ progress: string | number;
263
+ icon: string | import("../VvIcon").VvIconProps;
264
+ iconPosition: "before" | "after";
265
+ loading: boolean;
266
+ loadingLabel: string;
267
+ hintLabel: string;
268
+ invalidLabel: string | unknown[];
269
+ validLabel: string | unknown[];
270
+ placeholder: string;
271
+ accept: string;
272
+ max: string | number;
273
+ dropArea: boolean;
274
+ labelAdd: string;
275
+ iconAdd: string | import("../VvIcon").VvIconProps;
276
+ labelReplace: string;
277
+ iconReplace: string | import("../VvIcon").VvIconProps;
278
+ labelDownload: string;
279
+ iconDownload: string | import("../VvIcon").VvIconProps;
280
+ labelRemove: string;
281
+ }, {}>, {
282
+ "drop-area"?(_: {}): any;
283
+ hint?(_: {
284
+ modelValue: unknown;
285
+ valid: boolean;
286
+ invalid: boolean;
287
+ loading: boolean;
288
+ }): any;
289
+ loading?(_: {
290
+ modelValue: unknown;
291
+ valid: boolean;
292
+ invalid: boolean;
293
+ loading: boolean;
294
+ }): any;
295
+ valid?(_: {
296
+ modelValue: unknown;
297
+ valid: boolean;
298
+ invalid: boolean;
299
+ loading: boolean;
300
+ }): any;
301
+ invalid?(_: {
302
+ modelValue: unknown;
303
+ valid: boolean;
304
+ invalid: boolean;
305
+ loading: boolean;
306
+ }): any;
307
+ }>;
308
+ export default _default;
309
+ type __VLS_WithTemplateSlots<T, S> = T & {
310
+ new (): {
311
+ $slots: S;
312
+ };
313
+ };
@@ -0,0 +1,179 @@
1
+ import { type VvIconProps } from '../VvIcon';
2
+ export type VvInputFileEvents = {
3
+ 'update:modelValue': [File | undefined];
4
+ };
5
+ export declare const VvInputFileProps: {
6
+ /**
7
+ * Input value
8
+ */
9
+ modelValue: {
10
+ type: globalThis.PropType<{
11
+ name: string;
12
+ size: number;
13
+ type: string;
14
+ url: string;
15
+ thumbnailUrl?: string | undefined;
16
+ lastModified?: number | undefined;
17
+ } | File | ({
18
+ name: string;
19
+ size: number;
20
+ type: string;
21
+ url: string;
22
+ thumbnailUrl?: string | undefined;
23
+ lastModified?: number | undefined;
24
+ } | File)[]>;
25
+ required: boolean;
26
+ };
27
+ /**
28
+ * Whether to show progress bar
29
+ */
30
+ progress: {
31
+ type: (StringConstructor | NumberConstructor)[];
32
+ default: undefined;
33
+ };
34
+ /**
35
+ * Input
36
+ * Text that appears in the form control when it has no value set
37
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
38
+ */
39
+ placeholder: {
40
+ type: StringConstructor;
41
+ default: undefined;
42
+ };
43
+ /**
44
+ * File types to accept
45
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
46
+ */
47
+ accept: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ /**
52
+ * Whether to allow multiple values
53
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
54
+ */
55
+ multiple: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ /**
60
+ * Max number of files
61
+ */
62
+ max: {
63
+ type: (StringConstructor | NumberConstructor)[];
64
+ default: undefined;
65
+ };
66
+ /**
67
+ * Show drop area
68
+ */
69
+ dropArea: {
70
+ type: BooleanConstructor;
71
+ default: boolean;
72
+ };
73
+ /**
74
+ * Label for add button
75
+ */
76
+ labelAdd: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ };
80
+ /**
81
+ * VvIcon name for add button
82
+ * @see VVIcon
83
+ */
84
+ iconAdd: {
85
+ type: globalThis.PropType<string | VvIconProps>;
86
+ default: "add";
87
+ };
88
+ /**
89
+ * Label for replace button
90
+ */
91
+ labelReplace: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ /**
96
+ * VvIcon name for replace button
97
+ * @see VVIcon
98
+ */
99
+ iconReplace: {
100
+ type: globalThis.PropType<string | VvIconProps>;
101
+ default: "edit";
102
+ };
103
+ /**
104
+ * Label for download button
105
+ */
106
+ labelDownload: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ };
110
+ /**
111
+ * VvIcon name for download button
112
+ * @see VVIcon
113
+ */
114
+ iconDownload: {
115
+ type: globalThis.PropType<string | VvIconProps>;
116
+ default: "download";
117
+ };
118
+ /**
119
+ * Label for remove button
120
+ */
121
+ labelRemove: {
122
+ type: StringConstructor;
123
+ default: string;
124
+ };
125
+ icon: {
126
+ type: globalThis.PropType<string | VvIconProps>;
127
+ default: undefined;
128
+ };
129
+ iconPosition: {
130
+ type: globalThis.PropType<"before" | "after">;
131
+ default: import("../../constants").Position;
132
+ validation: (value: import("../../constants").Position) => boolean;
133
+ };
134
+ readonly: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ loading: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
142
+ loadingLabel: {
143
+ type: StringConstructor;
144
+ default: string;
145
+ };
146
+ label: {
147
+ type: (StringConstructor | NumberConstructor)[];
148
+ default: undefined;
149
+ };
150
+ hintLabel: {
151
+ type: StringConstructor;
152
+ default: string;
153
+ };
154
+ invalid: {
155
+ type: BooleanConstructor;
156
+ default: boolean;
157
+ };
158
+ invalidLabel: {
159
+ type: (ArrayConstructor | StringConstructor)[];
160
+ default: undefined;
161
+ };
162
+ valid: {
163
+ type: BooleanConstructor;
164
+ default: boolean;
165
+ };
166
+ validLabel: {
167
+ type: (ArrayConstructor | StringConstructor)[];
168
+ default: undefined;
169
+ };
170
+ modifiers: {
171
+ type: globalThis.PropType<string | string[]>;
172
+ default: undefined;
173
+ };
174
+ name: {
175
+ type: StringConstructor;
176
+ required: boolean;
177
+ };
178
+ id: (StringConstructor | NumberConstructor)[];
179
+ };
@@ -1,3 +1,4 @@
1
+ import type { VvIconProps } from '../VvIcon';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  disabled: {
3
4
  type: BooleanConstructor;
@@ -8,12 +9,13 @@ declare const _default: import("vue").DefineComponent<{
8
9
  default: string;
9
10
  };
10
11
  icon: {
11
- type: StringConstructor;
12
+ type: globalThis.PropType<string | VvIconProps>;
12
13
  default: string;
13
14
  };
14
15
  }, {
16
+ hasIcon: globalThis.ComputedRef<VvIconProps | undefined>;
15
17
  onClick: (e: Event) => void;
16
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clear"[], "clear", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clear"[], "clear", import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
17
19
  disabled: {
18
20
  type: BooleanConstructor;
19
21
  default: boolean;
@@ -23,14 +25,14 @@ declare const _default: import("vue").DefineComponent<{
23
25
  default: string;
24
26
  };
25
27
  icon: {
26
- type: StringConstructor;
28
+ type: globalThis.PropType<string | VvIconProps>;
27
29
  default: string;
28
30
  };
29
31
  }>> & {
30
32
  onClear?: ((...args: any[]) => any) | undefined;
31
33
  }, {
32
- label: string;
33
34
  disabled: boolean;
34
- icon: string;
35
+ label: string;
36
+ icon: string | VvIconProps;
35
37
  }, {}>;
36
38
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { type VvIconProps } from '../VvIcon';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  disabled: {
3
4
  type: BooleanConstructor;
@@ -12,18 +13,19 @@ declare const _default: import("vue").DefineComponent<{
12
13
  default: string;
13
14
  };
14
15
  iconShow: {
15
- type: StringConstructor;
16
+ type: globalThis.PropType<string | VvIconProps>;
16
17
  default: "eye-on";
17
18
  };
18
19
  iconHide: {
19
- type: StringConstructor;
20
+ type: globalThis.PropType<string | VvIconProps>;
20
21
  default: "eye-off";
21
22
  };
22
23
  }, {
23
24
  active: globalThis.Ref<boolean>;
24
- activeIcon: globalThis.ComputedRef<string>;
25
+ activeIcon: globalThis.ComputedRef<string | VvIconProps>;
26
+ hasIcon: globalThis.ComputedRef<VvIconProps | undefined>;
25
27
  onClick: (e: Event) => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle-password"[], "toggle-password", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
28
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle-password"[], "toggle-password", import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
27
29
  disabled: {
28
30
  type: BooleanConstructor;
29
31
  default: boolean;
@@ -37,11 +39,11 @@ declare const _default: import("vue").DefineComponent<{
37
39
  default: string;
38
40
  };
39
41
  iconShow: {
40
- type: StringConstructor;
42
+ type: globalThis.PropType<string | VvIconProps>;
41
43
  default: "eye-on";
42
44
  };
43
45
  iconHide: {
44
- type: StringConstructor;
46
+ type: globalThis.PropType<string | VvIconProps>;
45
47
  default: "eye-off";
46
48
  };
47
49
  }>> & {
@@ -50,7 +52,7 @@ declare const _default: import("vue").DefineComponent<{
50
52
  disabled: boolean;
51
53
  labelShow: string;
52
54
  labelHide: string;
53
- iconShow: string;
54
- iconHide: string;
55
+ iconShow: string | VvIconProps;
56
+ iconHide: string | VvIconProps;
55
57
  }, {}>;
56
58
  export default _default;
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  }, {
15
15
  isUp: globalThis.ComputedRef<boolean>;
16
16
  onClick: (e: Event) => void;
17
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("step-up" | "step-down")[], "step-up" | "step-down", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("step-up" | "step-down")[], "step-up" | "step-down", import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
18
  disabled: {
19
19
  type: BooleanConstructor;
20
20
  default: boolean;