@volverjs/ui-vue 0.0.10-beta.45 → 0.0.10-beta.47

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 (54) hide show
  1. package/dist/components/VvAvatar/VvAvatar.es.js +1 -6
  2. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  3. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +2 -7
  4. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  5. package/dist/components/VvBadge/VvBadge.es.js +1 -6
  6. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  7. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -6
  8. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  9. package/dist/components/VvButton/VvButton.es.js +0 -22
  10. package/dist/components/VvButton/VvButton.umd.js +1 -1
  11. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -6
  12. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  13. package/dist/components/VvCard/VvCard.es.js +1 -6
  14. package/dist/components/VvCard/VvCard.umd.js +1 -1
  15. package/dist/components/VvCheckbox/VvCheckbox.es.js +0 -22
  16. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  17. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +0 -22
  18. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  19. package/dist/components/VvCombobox/VvCombobox.es.js +0 -22
  20. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  21. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +18 -18
  22. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +8 -8
  23. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +0 -5
  24. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  25. package/dist/components/VvIcon/VvIcon.es.js +1 -6
  26. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  27. package/dist/components/VvInputFile/VvInputFile.es.js +10 -26
  28. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  29. package/dist/components/VvInputText/VvInputText.es.js +19 -4
  30. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  31. package/dist/components/VvInputText/VvInputText.vue.d.ts +3 -3
  32. package/dist/components/VvNav/VvNav.es.js +0 -5
  33. package/dist/components/VvNav/VvNav.umd.js +1 -1
  34. package/dist/components/VvRadio/VvRadio.es.js +0 -22
  35. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  36. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +0 -22
  37. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  38. package/dist/components/VvSelect/VvSelect.vue.d.ts +2 -2
  39. package/dist/components/VvTab/VvTab.es.js +0 -5
  40. package/dist/components/VvTab/VvTab.umd.js +1 -1
  41. package/dist/components/index.es.js +29 -30
  42. package/dist/components/index.umd.js +1 -1
  43. package/dist/composables/alert/useAlert.d.ts +46 -46
  44. package/dist/composables/index.es.js +4 -4
  45. package/dist/composables/index.umd.js +1 -1
  46. package/dist/icons.es.js +3 -3
  47. package/dist/icons.umd.js +1 -1
  48. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +20 -20
  49. package/package.json +36 -36
  50. package/src/assets/icons/detailed.json +1 -1
  51. package/src/assets/icons/normal.json +1 -1
  52. package/src/assets/icons/simple.json +1 -1
  53. package/src/components/VvInputFile/VvInputFile.vue +10 -4
  54. package/src/components/VvInputText/VvInputText.vue +21 -7
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue","uid","@vueuse/core","mitt","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCombobox=t(e.vue,e.vue$1,e.vue$2,e.uid,e.core,e.mitt,e.tsDotProp)}(this,(function(e,t,l,o,a,n,r){"use strict";const i={prefix:"normal"};var u=(e=>(e.local="local",e.session="session",e))(u||{}),s=(e=>(e.absolute="absolute",e.fixed="fixed",e))(s||{}),d=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(d||{}),c=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(c||{}),v=(e=>(e.before="before",e.after="after",e))(v||{}),f=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(f||{}),p=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(p||{}),m=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(m||{}),b=(e=>(e.listbox="listbox",e.menu="menu",e))(b||{}),g=(e=>(e.option="option",e.presentation="presentation",e))(g||{});const y=Symbol.for("volver"),h=Symbol.for("buttonGroup"),k=Symbol.for("dropdownTrigger"),S=Symbol.for("dropdownItem"),B=Symbol.for("dropdownAction");function x(){return e.inject(y)}function w(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 V=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(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=x(),{modifiers:i}=e.toRefs(o),u=w("vv-icon",i),s=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),d=e.computed((()=>{const e=o.name??"",l=`@${s.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const o=`@${s.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const l=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==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&o.src&&!t.iconExists(`@${s.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),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),L={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},P={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},$={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},C={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},O={disabled:{type:Boolean,default:!1}},N={selected:{type:Boolean,default:!1}},E={active:{type:Boolean,default:!1}},_={current:{type:Boolean,default:!1}},A={pressed:{type:Boolean,default:!1}},F={label:{type:[String,Number],default:void 0}},D={readonly:{type:Boolean,default:!1}},j={modifiers:{type:[String,Array],default:void 0}},R={hintLabel:{type:String,default:""}},H={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},z={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:v.before,validation:e=>Object.values(v).includes(e)}},I={tabindex:{type:[String,Number],default:0}},T={floating:{type:Boolean,default:!1}},M={unselectable:{type:Boolean,default:!0}},K={id:[String,Number]},q={placement:{type:String,default:d.bottom,validator:e=>Object.values(d).includes(e)||Object.values(c).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(s).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},W={...K,name:{type:String,required:!0}},G={autofocus:{type:Boolean,default:!1}},J={autocomplete:{type:String,default:"off"}},U={...O,...F,...A,...E,..._,...L,type:{type:String,default:f.button,validator:e=>Object.values(f).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:p.button}};u.local;const Q={...K,...q,...j,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:b.menu,validator:e=>Object.values(b).includes(e)}},X={focusOnHover:{type:Boolean,default:!1}},Y={...O,...N,...M,...j,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function Z(t){return e.computed((()=>String((null==t?void 0:t.value)||o.uid())))}const ee=["id","tabindex","role","aria-labelledby"],te=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:Q,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{expose:o,emit:r}){const i=t,u=r,{id:c}=e.toRefs(i),v=Z(c),f=e.useAttrs(),p=e.ref("auto"),m=e.ref("auto"),y=e.ref(null),h=e.ref(),B=e.ref(null),x=e.ref(null),V=e.computed({get:()=>i.reference??y.value,set:e=>{y.value=e}}),L=e.ref(!1);e.onMounted((()=>{a.useMutationObserver(h.value,(()=>{var e;L.value="true"===(null==(e=window.getComputedStyle(h.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const P=e.computed((()=>{const e=[];if(i.autoPlacement?"boolean"==typeof i.autoPlacement?e.push(l.autoPlacement()):e.push(l.autoPlacement(i.autoPlacement)):i.flip&&("boolean"==typeof i.flip?e.push(l.flip({fallbackStrategy:"initialPlacement"})):e.push(l.flip(i.flip))),i.shift&&("boolean"==typeof i.shift?e.push(l.shift()):e.push(l.shift(i.shift))),i.size){const t=({availableWidth:e,availableHeight:t})=>{p.value=`${e}px`,m.value=`${t}px`};"boolean"==typeof i.size?e.push(l.size({apply:t})):e.push(l.size({...i.size,apply:t}))}return i.offset&&(e.push(l.offset(Number(i.offset))),["string","number"].includes(typeof i.offset)?e.push(l.offset(Number(i.offset))):e.push(l.offset(i.offset))),i.arrow&&e.push(l.arrow({element:B})),e})),{x:$,y:C,middlewareData:O,placement:N,strategy:E}=l.useFloating(V,h,{whileElementsMounted:(...e)=>l.autoUpdate(...e,{animationFrame:i.strategy===s.fixed}),placement:e.computed((()=>i.placement)),strategy:e.computed((()=>i.strategy)),middleware:P}),_=e.computed((()=>{var e;if(L.value)return;const t=i.triggerWidth&&V.value?`${null==(e=V.value)?void 0:e.offsetWidth}px`:void 0;return{position:E.value,top:`${C.value??0}px`,left:`${$.value??0}px`,maxWidth:t?void 0:p.value,maxHeight:m.value,width:t}})),A=e.computed((()=>N.value.split("-")[0])),F=e.computed((()=>{var e,t,l,o,a;if(L.value)return;const n={[d.top]:d.bottom,[d.right]:d.left,[d.bottom]:d.top,[d.left]:d.right}[A.value];return{left:void 0!==(null==(e=O.value.arrow)?void 0:e.x)?`${null==(t=O.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(l=O.value.arrow)?void 0:l.y)?`${null==(o=O.value.arrow)?void 0:o.y}px`:void 0,[n]:-((null==(a=B.value)?void 0:a.offsetWidth)??0)/2+"px"}})),D=a.useVModel(i,"modelValue",u),j=e.ref(!1),R=e.computed({get:()=>D.value??j.value,set:e=>{void 0!==D.value?D.value=e:j.value=e}});function H(){R.value=!0}function z(){R.value=!1}function I(){R.value=!R.value}function T(e){V.value=e}o({toggle:I,show:H,hide:z,init:T,customPosition:L}),e.watch(R,(t=>{t&&i.autofocusFirst&&e.nextTick((()=>{const e=X(h.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),a.onClickOutside(h,(()=>{!i.keepOpen&&R.value&&(R.value=!1)}),{ignore:[V]});const M=e.computed((()=>{var e,t;return(null==(t=null==(e=V.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),K=e.computed((()=>({"aria-controls":v.value,"aria-haspopup":!0,"aria-expanded":R.value}))),{component:q,bus:W}=function({reference:t,id:l,expanded:o,aria:a}){const r=n(),i=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(k,{reference:t,id:l,expanded:o,aria:a,bus:r})},render(){var t,l;return e.h(e.Fragment,{},null==(l=(t=this.$slots).default)?void 0:l.call(t))}});return{bus:r,component:i}}({reference:V,id:v,expanded:R,aria:K});W.on("click",I);const{role:G,modifiers:J}=e.toRefs(i),U=w("vv-dropdown",J,e.computed((()=>({arrow:i.arrow})))),{focused:Q}=a.useFocusWithin(h);function X(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}const Y=a.useElementHover(h),{itemRole:te}=function({role:t,...l}){const o=e.computed((()=>t.value===b.listbox?g.option:g.presentation));return e.provide(S,{role:o,...l}),{itemRole:o}}({role:G,expanded:R,focused:Q,hovered:Y});a.onKeyStroke("Escape",(e=>{R.value&&(e.preventDefault(),z())})),a.onKeyStroke("ArrowDown",(t=>{R.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(h.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),a.onKeyStroke("ArrowUp",(t=>{R.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(h.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),a.onKeyStroke([" ","Enter"],(e=>{const t=e.target;R.value&&Q.value&&t&&(null==t||t.click())}));const le={"before-enter":()=>{u(R.value?"beforeExpand":"beforeCollapse"),u("beforeEnter")},"after-leave":()=>{u(R.value?"afterExpand":"afterCollapse"),u("afterLeave")},enter:()=>{u("enter")},"after-enter":()=>{u("afterEnter")},"enter-cancelled":()=>{u("enterCancelled")},"before-leave":()=>{u("beforeLeave")},leave:()=>{u("leave")},"leave-cancelled":()=>{u("leaveCancelled")}};return(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(q),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:T,show:H,hide:z,toggle:I,expanded:e.unref(R),aria:e.unref(K)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(le),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:h,style:e.normalizeStyle(e.unref(_)),class:e.normalizeClass(e.unref(U))},[i.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:B,style:e.normalizeStyle(e.unref(F)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)}))),e.createElementVNode("div",e.mergeProps(e.unref(f),{id:e.unref(v),ref_key:"listEl",ref:x,tabindex:e.unref(R)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(M),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(te)})))],16,ee),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)})))],6),[[e.vShow,e.unref(R)]])])),_:3},16,["name"])],64))}});const le=e.defineComponent({name:"VvDropdownItem",props:X,setup(t){const l=t,{role:o,expanded:n}=e.inject(S,{}),r=e.ref(null);!function({expanded:t}){e.provide(B,{role:e.ref(m.menuitem),expanded:t})}({expanded:n});const i=a.useElementHover(r),{focused:u}=a.useFocus(r),{focused:s}=a.useFocusWithin(r);return e.watch(i,(e=>{e&&l.focusOnHover&&(u.value=!0)})),(t,l)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(o)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}}),oe=["title"],ae=e.defineComponent({name:"VvDropdownOption",props:Y,setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=w("vv-dropdown-option",o,e.computed((()=>({disabled:l.disabled,selected:l.selected,unselectable:l.unselectable&&l.selected})))),n=e.computed((()=>l.selected?l.unselectable?l.deselectHintLabel:l.selectedHintLabel:l.disabled?"":l.selectHintLabel));return(t,l)=>(e.openBlock(),e.createBlock(le,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled,"focus-on-hover":t.focusOnHover},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,oe)])),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}}),ne={class:"vv-dropdown-optgroup",role:"presentation",tabindex:"-1"},re=e.defineComponent({name:"VvDropdownOptgroup",props:{...F},setup(t){const l=t;return(t,o)=>(e.openBlock(),e.createElementBlock("li",ne,e.toDisplayString(l.label),1))}});function ie(e,t,l){return l?se(e,l)===se(t,l):ue(e,t)}function ue(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(!ue(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 s=e instanceof RegExp,d=t instanceof RegExp;if(s!==d)return!1;if(s&&d)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],!ue(e[r],t[r]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function se(e,t){if(e&&Object.keys(e).length&&t){if(t.includes(".")){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 e[t]}return null}function de(e,t){if(null!=e&&t&&t.length)for(const l of t)if(ie(e,l))return!0;return!1}function ce(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function ve(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>ce(o.value.invalidLabel))),n=e.computed((()=>ce(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)))),s=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),d=e.computed((()=>!u.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!u.value&&!s.value&&!d.value&&Boolean(l.hint||i.value))),v=e.computed((()=>s.value||d.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:s,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,r,i,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}const fe={...W,...G,...J,...I,...P,...$,...R,...C,...O,...D,...j,...H,...z,...T,...M,...F,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},autoselectFirst:{type:Boolean,default:!1},placeholder:String};function pe(){return{...fe,options:{...fe.options,type:Array,default:()=>[]}}}function me(t,l,o){const a=x(),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];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("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}),{})}))}function be(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}function ge(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)===v.before?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===v.after?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===d.left?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===d.right?o.value:void 0)),u=e.computed((()=>(null==l?void 0:l.value)===d.top?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===d.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:r,hasIconRight:i,hasIconTop:u,hasIconBottom:s,hasIconBefore:a,hasIconAfter:n}}function ye(t){const{options:l,labelKey:o,valueKey:a,disabledKey:n}=e.toRefs(t);return{options:l,getOptionLabel:e=>"string"==typeof e?e:"function"==typeof o.value?o.value(e):String(o.value?r.get(e,o.value):e),getOptionValue:e=>"string"==typeof e?e:"function"==typeof a.value?a.value(e):a.value?r.get(e,a.value):e,isOptionDisabled:e=>"string"!=typeof e&&("function"==typeof n.value?n.value(e):!!n.value&&r.get(e,n.value)),getOptionGrouped:e=>"string"==typeof e?[]:"object"==typeof e&&e&&"options"in e?e.options:[]}}const he=["for"],ke={class:"vv-select__wrapper"},Se={key:0,class:"vv-select__input-before"},Be={class:"vv-select__inner"},xe=["id"],we=["disabled","hidden"],Ve=["disabled","value"],Le=["disabled","label"],Pe=["disabled","value"],$e={key:1,class:"vv-select__input-after"},Ce=e.defineComponent({name:"VvSelect",props:pe(),emits:["update:modelValue","focus","blur"],setup(t,{emit:l}){const o=t,n=l,r=e.useSlots(),i=me("VvSelect",pe(),o),u=e.ref(),{HintSlot:s,hasHintLabelOrSlot:d,hasInvalidLabelOrSlot:c,hintSlotScope:v}=ve(i,r),{focused:f}=be(u,n);function p(e){var t;return"string"!=typeof e&&(null==(t=e.options)?void 0:t.length)}const{id:m,modifiers:b,disabled:g,readonly:y,loading:h,icon:k,iconPosition:S,invalid:B,valid:x,floating:L,multiple:P}=e.toRefs(o),$=Z(m),C=e.computed((()=>`${$.value}-hint`)),O=e.computed((()=>o.disabled||o.readonly)),N=e.computed((()=>O.value?-1:o.tabindex)),E=e.computed({get:()=>o.modelValue,set:e=>{!Array.isArray(e)||0!==(e=e.filter((e=>void 0!==e))).length||o.unselectable?n("update:modelValue",e):u.value.value=o.modelValue}}),_=e.computed((()=>Array.isArray(E.value)?E.value.length>0:void 0!==E.value&&null!==E.value)),A=a.useElementVisibility(u);e.watch(A,(e=>{e&&o.autofocus&&(f.value=!0)}));const{hasIconBefore:F,hasIconAfter:D}=ge(k,S),j=e.computed((()=>!0===o.invalid||!0!==o.valid&&void 0)),R=w("vv-select",b,e.computed((()=>({valid:x.value,invalid:B.value,loading:h.value,disabled:g.value,readonly:y.value,"icon-before":void 0!==F.value,"icon-after":void 0!==D.value,dirty:_.value,focus:f.value,floating:L.value,multiple:P.value})))),{getOptionLabel:H,getOptionValue:z,isOptionDisabled:I,getOptionGrouped:T}=ye(o);e.watch((()=>o.options),(e=>{if((null==e?void 0:e.length)&&o.autoselectFirst&&!_.value){const t=z(e[0]);E.value=o.multiple?[t]:t}}),{immediate:!0});const M=e.computed((()=>({name:o.name,tabindex:N.value,disabled:O.value,required:o.required,size:o.size,autocomplete:o.autocomplete,multiple:o.multiple,"aria-invalid":j.value,"aria-describedby":d.value?C.value:void 0,"aria-errormessage":c.value?C.value:void 0}))),K=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(R))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref($)},e.toDisplayString(t.label),9,he)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ke,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(K))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Be,[e.unref(F)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(F),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref($),ref_key:"selectEl",ref:u},e.unref(M),{"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(E)?E.value=t:null)}),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!t.unselectable,hidden:!t.unselectable},e.toDisplayString(t.placeholder),9,we)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,((t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p(t)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${l}`,disabled:e.unref(I)(t),label:e.unref(H)(t)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T)(t),((t,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${l}-item-${o}`,disabled:e.unref(I)(t),value:e.unref(z)(t)},e.toDisplayString(e.unref(H)(t)),9,Pe)))),128))],8,Le)):(e.openBlock(),e.createElementBlock("option",{key:l,disabled:e.unref(I)(t),value:e.unref(z)(t)},e.toDisplayString(e.unref(H)(t)),9,Ve))],64)))),256))],16,xe),[[e.vModelSelect,e.unref(E)]]),e.unref(D)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:1},e.unref(D),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(K))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(s),{id:e.unref(C),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"3"}:void 0]),1032,["id"])],2))}}),Oe={...j,value:[String,Number]},Ne=e.defineComponent({name:"VvBadge",props:Oe,setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=w("vv-badge",o);return(t,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a))},[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.value),1)]))],2))}}),Ee=U,_e=e.defineComponent({name:"VvAction",props:Ee,emits:["click","mouseover","mouseleave"],setup(t,{expose:l,emit:o}){const a=t,n=o,r=e.getCurrentInstance(),i=x(),u=e.ref(null);l({$el:u});const{reference:s,bus:d,aria:c,expanded:v}=e.inject(k,{});e.watch((()=>u.value),(e=>{s&&(s.value=e)}));const f=e.computed((()=>a.pressed||(null==v?void 0:v.value))),{role:m}=e.inject(B,{}),b=e.computed((()=>{switch(!0){case a.disabled:return p.button;case void 0!==a.to:return(null==i?void 0:i.nuxt)?p.nuxtLink:p.routerLink;case void 0!==a.href:return p.a;default:return a.defaultTag}})),g=e.computed((()=>{const e={...null==c?void 0:c.value,ariaPressed:!!f.value||void 0,ariaLabel:a.ariaLabel,role:null==m?void 0:m.value};switch(b.value){case p.a:return{...e,href:a.href,target:a.target,rel:a.rel};case p.routerLink:case p.nuxtLink:return{...e,to:a.to,target:a.target};case p.button:return{...e,type:a.type,disabled:a.disabled};default:return e}}));function y(e){var t;a.disabled?e.preventDefault():(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onClick)?n("click",e):null==d||d.emit("click",e)}function h(e){var t;(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onMouseover)?n("mouseover",e):null==d||d.emit("mouseover",e)}function S(e){var t;(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onMouseleave)?n("mouseleave",e):null==d||d.emit("mouseleave",e)}return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b)),e.mergeProps(e.unref(g),{ref_key:"element",ref:u,class:{active:t.active,pressed:e.unref(f),disabled:t.disabled,current:t.current},onClickPassive:y,onMouseoverPassive:h,onMouseleavePassive:S}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const Ae={...U,...K,...j,...M,...C,...z,iconPosition:{type:String,default:d.left,validator:e=>Object.values(d).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}};function Fe(t,l){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>void 0!==l));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const r=e.toRef(o,t);return e.computed({get:()=>r.value,set(e){a&&a(`update:${t}`,e)}})}}}(h),{id:r,iconPosition:i,icon:u,label:s,pressed:d}=e.toRefs(t),c=n("modelValue",t,l),v=n("toggle",t),f=n("unselectable",t),p=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),m=e.computed((()=>{let e=t.modifiers,l=null==o?void 0:o.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((()=>Boolean(t.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:c,toggle:v,unselectable:f,multiple:p,modifiers:m,disabled:b,id:r,pressed:d,iconPosition:i,icon:u,label:s}}const De={key:1,class:"vv-button__label"},je={key:1,class:"vv-button__label"},Re=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:Ae,emits:["update:modelValue"],setup(t,{expose:l,emit:o}){const a=t,n=o,r=e.useAttrs(),i=e.useSlots(),{id:u,modifiers:s,iconPosition:c,icon:v,label:f,modelValue:p,disabled:m,toggle:b,unselectable:g}=Fe(a,n),y=Z(u),h=e.computed((()=>(null==r?void 0:r.name)||y.value)),k=e.ref(null);l({$el:e.computed((()=>{var e;return null==(e=k.value)?void 0:e.$el}))});const S=e.computed((()=>b.value?Array.isArray(p.value)?de(h.value,p.value):ie(h.value,p.value):a.pressed)),B=w("vv-button",s,e.computed((()=>({reverse:[d.right,d.bottom].includes(c.value),column:[d.top,d.bottom].includes(c.value),"icon-only":Boolean((null==v?void 0:v.value)&&!(null==f?void 0:f.value)&&!i.default)})))),{hasIcon:x}=ge(v),L=e.computed((()=>void 0!==a.value?a.value:h.value)),P=e.computed((()=>{if(b.value)return{onClick:$}}));function $(){if(b.value){if(Array.isArray(p.value))return de(L.value,p.value)?void(g.value&&(p.value=p.value.filter((e=>e!==L.value)))):void p.value.push(L.value);if(L.value===p.value&&g.value)return void(p.value=a.uncheckedValue);p.value=L.value}}return(t,l)=>(e.openBlock(),e.createBlock(_e,e.mergeProps({...e.unref(r),...e.unref(P),disabled:e.unref(m),pressed:e.unref(S),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(y),ref_key:"element",ref:k,class:e.unref(B)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(V,{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",De,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(x)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(x),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",je,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}}),He={...W,...I,...P,...$,...R,...C,...O,...D,...j,...H,...z,...T,...q,...F,transitionName:{type:String,default:"vv-dropdown--mobile-fade-block"},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},noResultsLabel:{type:String,default:"No results"},noOptionsLabel:{type:String,default:"No options available"},selectedHintLabel:{type:String,default:"Selected"},deselectActionLabel:{type:String,default:"Deselect"},selectHintLabel:{type:String,default:"Press enter to select"},deselectHintLabel:{type:String,default:"Press enter to remove"},closeLabel:{type:String,default:"Close"},placeholder:String,searchable:Boolean,searchFunction:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search..."},debounceSearch:{type:[Number,String],default:0},multiple:Boolean,minValues:{type:[Number,String],default:0},maxValues:[Number,String],unselectable:{type:Boolean,default:!0},separator:{type:String,default:", "},native:Boolean,badges:Boolean,badgeModifiers:{type:[String,Array],default:"action sm"},triggerWidth:{...q.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array],default:"mobile"},autoOpen:{type:Boolean,default:!1},autoselectFirst:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1}};function ze(){return{...He,options:{...He.options,type:Array},searchFunction:{...He.searchFunction,type:Function}}}const Ie=["id"],Te=["id","for"],Me=["id","aria-controls","placeholder"],Ke={key:0,class:"vv-select__input-before"},qe={class:"vv-select__inner"},We=["aria-controls","aria-expanded","aria-labelledby","aria-describedby","aria-errormessage","tabindex"],Ge={key:0,class:"vv-select__value"},Je=["aria-label","onClick"],Ue={key:1,class:"vv-select__input-after"},Qe={name:"VvCombobox",components:{VvDropdown:te,VvDropdownOption:ae,VvDropdownOptgroup:re,VvButton:Re}};return e.defineComponent({...Qe,props:ze(),emits:["update:modelValue","update:search","change:search","focus","blur"],setup(t,{emit:l}){const o=t,n=l,r=e.useSlots(),i=me("VvCombobox",ze(),o),u=e.ref(null),s=e.ref(null),d=e.ref(null),c=e.ref(null),{HintSlot:v,hasHintLabelOrSlot:f,hasInvalidLabelOrSlot:p,hintSlotScope:m}=ve(i,r),{focused:g}=be(u,n),{focused:y}=a.useFocusWithin(d);e.watch(g,(e=>{o.autoOpen&&(!e||S.value?e||!S.value||y.value||L():x())})),e.watch(y,(e=>{g.value||e||!S.value||L()}));const h=e.ref(""),k=a.refDebounced(h,e.computed((()=>Number(o.debounceSearch))));e.watch(k,(()=>{n("update:search",k.value),n("change:search",k.value)}));const S=e.ref(!1);function B(){q.value||(S.value=!S.value)}function x(){q.value||S.value||(S.value=!0)}function L(){!q.value&&S.value&&(S.value=!1)}function P(){i.value.searchable&&s.value&&s.value.focus({preventScroll:!0})}function $(){i.value.searchable&&(h.value="")}function C(e){var t;return"string"!=typeof e&&(null==(t=e.options)?void 0:t.length)}const{id:O,icon:N,iconPosition:E,modifiers:_,disabled:A,readonly:F,loading:D,valid:j,invalid:R,floating:H}=e.toRefs(o),z=Z(O),I=e.computed((()=>`${z.value}-hint`)),T=e.computed((()=>`${z.value}-dropdown`)),M=e.computed((()=>`${z.value}-search`)),K=e.computed((()=>`${z.value}-label`)),q=e.computed((()=>o.disabled||o.readonly)),W=e.computed((()=>q.value?-1:o.tabindex)),G=e.computed({get:()=>Array.isArray(o.modelValue)?o.modelValue:void 0!==o.modelValue&&null!==o.modelValue?[o.modelValue]:[],set:e=>{n("update:modelValue",o.multiple||Array.isArray(o.modelValue)?e:e.pop())}}),J=e.computed((()=>G.value.length)),U=e.computed((()=>J.value>0)),Q=e.computed((()=>o.multiple?void 0===o.maxValues?1/0:Number(o.maxValues):1)),X=e.computed((()=>!q.value&&(!!o.unselectable&&(0===Number(o.minValues)||J.value>Number(o.minValues))))),Y=e.computed((()=>!q.value&&(!o.multiple||J.value<Q.value))),ee=e.ref(!1),le=e.computed((()=>ee.value||D.value)),{hasIconBefore:oe,hasIconAfter:ne}=ge(N,E),ie=w("vv-select",_,e.computed((()=>({disabled:A.value,loading:le.value,readonly:F.value,"icon-before":void 0!==oe.value,"icon-after":void 0!==ne.value,valid:j.value,invalid:R.value,dirty:U.value,focus:g.value||y.value||S.value,floating:H.value,badges:o.badges})))),{getOptionLabel:ue,getOptionValue:se,getOptionGrouped:de,isOptionDisabled:ce}=ye(o);function fe(e){return ce(e)||!Y.value&&!he(e)}const pe=a.computedAsync((async()=>{var e;if(i.value.searchFunction){ee.value=!0;const e=await Promise.resolve(i.value.searchFunction(k.value,o.options));return ee.value=!1,e}return null==(e=o.options)?void 0:e.filter((e=>ue(e).toLowerCase().includes(k.value.toLowerCase().trim())))}));function he(e){const t=se(e);return"object"==typeof t?G.value.some((e=>"object"==typeof e&&JSON.stringify(e)===JSON.stringify(t))):G.value.includes(t)}const ke=e.computed((()=>o.options.reduce(((e,t)=>C(t)?[...e,...de(t)]:[...e,t]),[]).filter((e=>he(e))))),Se=e.computed((()=>ke.value.map((e=>ue(e))).join(o.separator)));function Be(){o.autoOpen?x():B()}function xe(e){const t=he(e),l=se(e);t&&X.value?G.value=G.value.filter((e=>"object"==typeof l&&"object"==typeof e?JSON.stringify(e)!==JSON.stringify(l):e!==l)):!t&&Y.value&&(o.multiple||(G.value=[]),G.value=[...G.value,l]),o.multiple||o.keepOpen||L()}e.watch((()=>o.options),(e=>{(null==e?void 0:e.length)&&o.autoselectFirst&&!U.value&&xe(e[0])}),{immediate:!0});const we=e.computed((()=>({id:z.value,name:o.name,tabindex:W.value,valid:j.value,validLabel:i.value.validLabel,invalid:R.value,invalidLabel:i.value.invalidLabel,hintLabel:i.value.hintLabel,loading:le.value,loadingLabel:i.value.loadingLabel,disabled:A.value,readonly:F.value,modifiers:i.value.modifiers,options:i.value.options,labelKey:i.value.labelKey,valueKey:i.value.valueKey,icon:i.value.icon,iconPosition:i.value.iconPosition,floating:i.value.floating,unselectable:X.value,autoselectFirst:i.value.autoselectFirst,multiple:i.value.multiple,label:i.value.label,placeholder:i.value.placeholder,modelValue:o.modelValue}))),Ve=e.computed((()=>({id:T.value,reference:d.value,placement:i.value.placement,strategy:i.value.strategy,transitionName:i.value.transitionName,offset:i.value.offset,shift:i.value.shift,flip:i.value.flip,autoPlacement:i.value.autoPlacement,arrow:i.value.arrow,autofocusFirst:!!i.value.searchable||i.value.autofocusFirst,triggerWidth:i.value.triggerWidth,modifiers:i.value.dropdownModifiers}))),Le=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return a.onKeyStroke([" ","Enter"],(e=>{o.autoOpen||!S.value&&g.value&&(e.preventDefault(),e.stopImmediatePropagation(),B())}),{target:u}),(t,l)=>t.native?(e.openBlock(),e.createBlock(Ce,e.mergeProps({key:1},e.unref(we),{"onUpdate:modelValue":l[3]||(l[3]=e=>n("update:modelValue",e))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(z),class:e.normalizeClass(e.unref(ie))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(K),for:e.unref(i).searchable?e.unref(M):void 0},e.toDisplayString(t.label),9,Te)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:d,class:"vv-select__wrapper"},[e.createVNode(te,e.mergeProps({ref_key:"dropdownEl",ref:c,modelValue:e.unref(S),"onUpdate:modelValue":l[2]||(l[2]=t=>e.isRef(S)?S.value=t:null)},e.unref(Ve),{role:e.unref(b).listbox,onAfterExpand:P,onAfterCollapse:$}),e.createSlots({default:e.withCtx((({aria:l})=>[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(Le))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",qe,[e.unref(oe)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(oe),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:u},l,{class:"vv-select__input",role:"combobox","aria-controls":e.unref(T),"aria-expanded":e.unref(S),"aria-labelledby":e.unref(K),"aria-describedby":e.unref(f)?e.unref(I):void 0,"aria-errormessage":e.unref(p)?e.unref(I):void 0,tabindex:e.unref(W),onClickPassive:Be}),[e.renderSlot(t.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(ke),onInput:xe})),(()=>[e.unref(Se)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.badges?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(ke),((l,o)=>(e.openBlock(),e.createBlock(Ne,{key:o,modifiers:t.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(ue)(l))+" ",1),e.unref(X)?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(i).deselectActionLabel,type:"button",onClick:e.withModifiers((e=>xe(l)),["stop"])},[e.createVNode(V,{name:"close"})],8,Je)):e.createCommentVNode("v-if",!0)])),_:2},1032,["modifiers"])))),128)):(e.openBlock(),e.createElementBlock("div",Ge,e.toDisplayString(e.unref(Se)),1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.placeholder),1)],64))]))],16,We),e.unref(ne)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:1},e.unref(ne),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(Le))))])):e.createCommentVNode("v-if",!0)])),items:e.withCtx((()=>{var l;return[!e.unref(A)&&(null==(l=e.unref(pe))?void 0:l.length)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(pe),((l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[C(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(re,{label:e.unref(ue)(l)},null,8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(de)(l),((o,a)=>(e.openBlock(),e.createBlock(ae,e.mergeProps({ref_for:!0},{selected:he(o),disabled:fe(o),unselectable:e.unref(X),deselectHintLabel:e.unref(i).deselectHintLabel,selectHintLabel:e.unref(i).selectHintLabel,selectedHintLabel:e.unref(i).selectedHintLabel},{key:a,class:"vv-dropdown-option","focus-on-hover":"",onClickPassive:e=>xe(o)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},{option:l,selectedOptions:e.unref(ke),selected:he(o),disabled:fe(o)}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ue)(o)),1)]))])),_:2},1040,["onClickPassive"])))),128))],64)):(e.openBlock(),e.createBlock(ae,e.mergeProps({key:1,ref_for:!0},{selected:he(l),disabled:fe(l),unselectable:e.unref(X),deselectHintLabel:e.unref(i).deselectHintLabel,selectHintLabel:e.unref(i).selectHintLabel,selectedHintLabel:e.unref(i).selectedHintLabel},{class:"vv-dropdown-option","focus-on-hover":"",onClickPassive:e=>xe(l)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},{option:l,selectedOptions:e.unref(ke),selected:he(l),disabled:fe(l)}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ue)(l)),1)]))])),_:2},1040,["onClickPassive"]))],64)))),128)):t.options.length?e.unref(A)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(ae,{key:2,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-results",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).noResultsLabel),1)]))])),_:3})):(e.openBlock(),e.createBlock(ae,{key:1,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-options",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).noOptionsLabel),1)]))])),_:3}))]})),after:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::after",{},(()=>{var t;return[(null==(t=e.unref(c))?void 0:t.customPosition)?(e.openBlock(),e.createBlock(Re,{key:0,label:e.unref(i).closeLabel,modifiers:"secondary",onClick:l[1]||(l[1]=t=>e.unref(c).hide())},null,8,["label"])):e.createCommentVNode("v-if",!0)]}))])),_:2},[e.unref(i).searchable||t.$slots["dropdown::before"]?{name:"before",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::before"),e.unref(i).searchable&&!e.unref(A)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(M),ref_key:"inputSearchEl",ref:s,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(h)?h.value=t:null),"aria-autocomplete":"list","aria-controls":e.unref(T),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:e.unref(i).searchPlaceholder},null,8,Me)),[[e.vModelText,e.unref(h)]]):e.createCommentVNode("v-if",!0)])),key:"0"}:void 0]),1040,["modelValue","role"])],512),e.createVNode(e.unref(v),{id:e.unref(I),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"3"}:void 0]),1032,["id"])],10,Ie))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue","uid","@vueuse/core","mitt","ts-dot-prop"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCombobox=t(e.vue,e.vue$1,e.vue$2,e.uid,e.core,e.mitt,e.tsDotProp)}(this,(function(e,t,l,o,a,n,r){"use strict";const i={prefix:"normal"};var u=(e=>(e.local="local",e.session="session",e))(u||{}),s=(e=>(e.absolute="absolute",e.fixed="fixed",e))(s||{}),d=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(d||{}),c=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(c||{}),v=(e=>(e.before="before",e.after="after",e))(v||{}),f=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(f||{}),p=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(p||{}),m=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(m||{}),b=(e=>(e.listbox="listbox",e.menu="menu",e))(b||{}),g=(e=>(e.option="option",e.presentation="presentation",e))(g||{});const y=Symbol.for("volver"),h=Symbol.for("buttonGroup"),k=Symbol.for("dropdownTrigger"),S=Symbol.for("dropdownItem"),B=Symbol.for("dropdownAction");function x(){return e.inject(y)}function w(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 V=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(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=x(),{modifiers:i}=e.toRefs(o),u=w("vv-icon",i),s=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),d=e.computed((()=>{const e=o.name??"",l=`@${s.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const o=`@${s.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const l=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==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&o.src&&!t.iconExists(`@${s.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),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),L={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},P={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},$={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},C={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},O={disabled:{type:Boolean,default:!1}},N={selected:{type:Boolean,default:!1}},E={active:{type:Boolean,default:!1}},_={current:{type:Boolean,default:!1}},A={pressed:{type:Boolean,default:!1}},F={label:{type:[String,Number],default:void 0}},D={readonly:{type:Boolean,default:!1}},R={modifiers:{type:[String,Array],default:void 0}},j={hintLabel:{type:String,default:""}},H={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},z={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:v.before,validation:e=>Object.values(v).includes(e)}},I={tabindex:{type:[String,Number],default:0}},T={floating:{type:Boolean,default:!1}},M={unselectable:{type:Boolean,default:!0}},K={id:[String,Number]},q={placement:{type:String,default:d.bottom,validator:e=>Object.values(d).includes(e)||Object.values(c).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(s).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},W={...K,name:{type:String,required:!0}},G={autofocus:{type:Boolean,default:!1}},J={autocomplete:{type:String,default:"off"}},U={...O,...F,...A,...E,..._,...L,type:{type:String,default:f.button,validator:e=>Object.values(f).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:p.button}};u.local;const Q={...K,...q,...R,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:b.menu,validator:e=>Object.values(b).includes(e)}},X={focusOnHover:{type:Boolean,default:!1}},Y={...O,...N,...M,...R,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function Z(t){return e.computed((()=>String((null==t?void 0:t.value)||o.uid())))}const ee=["id","tabindex","role","aria-labelledby"],te=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:Q,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{expose:o,emit:r}){const i=t,u=r,{id:c}=e.toRefs(i),v=Z(c),f=e.useAttrs(),p=e.ref("auto"),m=e.ref("auto"),y=e.ref(null),h=e.ref(),B=e.ref(null),x=e.ref(null),V=e.computed({get:()=>i.reference??y.value,set:e=>{y.value=e}}),L=e.ref(!1);e.onMounted((()=>{a.useMutationObserver(h.value,(()=>{var e;L.value="true"===(null==(e=window.getComputedStyle(h.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const P=e.computed((()=>{const e=[];if(i.autoPlacement?"boolean"==typeof i.autoPlacement?e.push(l.autoPlacement()):e.push(l.autoPlacement(i.autoPlacement)):i.flip&&("boolean"==typeof i.flip?e.push(l.flip({fallbackStrategy:"initialPlacement"})):e.push(l.flip(i.flip))),i.shift&&("boolean"==typeof i.shift?e.push(l.shift()):e.push(l.shift(i.shift))),i.size){const t=({availableWidth:e,availableHeight:t})=>{p.value=`${e}px`,m.value=`${t}px`};"boolean"==typeof i.size?e.push(l.size({apply:t})):e.push(l.size({...i.size,apply:t}))}return i.offset&&(e.push(l.offset(Number(i.offset))),["string","number"].includes(typeof i.offset)?e.push(l.offset(Number(i.offset))):e.push(l.offset(i.offset))),i.arrow&&e.push(l.arrow({element:B})),e})),{x:$,y:C,middlewareData:O,placement:N,strategy:E}=l.useFloating(V,h,{whileElementsMounted:(...e)=>l.autoUpdate(...e,{animationFrame:i.strategy===s.fixed}),placement:e.computed((()=>i.placement)),strategy:e.computed((()=>i.strategy)),middleware:P}),_=e.computed((()=>{var e;if(L.value)return;const t=i.triggerWidth&&V.value?`${null==(e=V.value)?void 0:e.offsetWidth}px`:void 0;return{position:E.value,top:`${C.value??0}px`,left:`${$.value??0}px`,maxWidth:t?void 0:p.value,maxHeight:m.value,width:t}})),A=e.computed((()=>N.value.split("-")[0])),F=e.computed((()=>{var e,t,l,o,a;if(L.value)return;const n={[d.top]:d.bottom,[d.right]:d.left,[d.bottom]:d.top,[d.left]:d.right}[A.value];return{left:void 0!==(null==(e=O.value.arrow)?void 0:e.x)?`${null==(t=O.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(l=O.value.arrow)?void 0:l.y)?`${null==(o=O.value.arrow)?void 0:o.y}px`:void 0,[n]:-((null==(a=B.value)?void 0:a.offsetWidth)??0)/2+"px"}})),D=a.useVModel(i,"modelValue",u),R=e.ref(!1),j=e.computed({get:()=>D.value??R.value,set:e=>{void 0!==D.value?D.value=e:R.value=e}});function H(){j.value=!0}function z(){j.value=!1}function I(){j.value=!j.value}function T(e){V.value=e}o({toggle:I,show:H,hide:z,init:T,customPosition:L}),e.watch(j,(t=>{t&&i.autofocusFirst&&e.nextTick((()=>{const e=X(h.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),a.onClickOutside(h,(()=>{!i.keepOpen&&j.value&&(j.value=!1)}),{ignore:[V]});const M=e.computed((()=>{var e,t;return(null==(t=null==(e=V.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),K=e.computed((()=>({"aria-controls":v.value,"aria-haspopup":!0,"aria-expanded":j.value}))),{component:q,bus:W}=function({reference:t,id:l,expanded:o,aria:a}){const r=n(),i=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(k,{reference:t,id:l,expanded:o,aria:a,bus:r})},render(){var t,l;return e.h(e.Fragment,{},null==(l=(t=this.$slots).default)?void 0:l.call(t))}});return{bus:r,component:i}}({reference:V,id:v,expanded:j,aria:K});W.on("click",I);const{role:G,modifiers:J}=e.toRefs(i),U=w("vv-dropdown",J,e.computed((()=>({arrow:i.arrow})))),{focused:Q}=a.useFocusWithin(h);function X(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}const Y=a.useElementHover(h),{itemRole:te}=function({role:t,...l}){const o=e.computed((()=>t.value===b.listbox?g.option:g.presentation));return e.provide(S,{role:o,...l}),{itemRole:o}}({role:G,expanded:j,focused:Q,hovered:Y});a.onKeyStroke("Escape",(e=>{j.value&&(e.preventDefault(),z())})),a.onKeyStroke("ArrowDown",(t=>{j.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(h.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),a.onKeyStroke("ArrowUp",(t=>{j.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(h.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),a.onKeyStroke([" ","Enter"],(e=>{const t=e.target;j.value&&Q.value&&t&&(null==t||t.click())}));const le={"before-enter":()=>{u(j.value?"beforeExpand":"beforeCollapse"),u("beforeEnter")},"after-leave":()=>{u(j.value?"afterExpand":"afterCollapse"),u("afterLeave")},enter:()=>{u("enter")},"after-enter":()=>{u("afterEnter")},"enter-cancelled":()=>{u("enterCancelled")},"before-leave":()=>{u("beforeLeave")},leave:()=>{u("leave")},"leave-cancelled":()=>{u("leaveCancelled")}};return(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(q),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:T,show:H,hide:z,toggle:I,expanded:e.unref(j),aria:e.unref(K)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(le),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:h,style:e.normalizeStyle(e.unref(_)),class:e.normalizeClass(e.unref(U))},[i.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:B,style:e.normalizeStyle(e.unref(F)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(j)}))),e.createElementVNode("div",e.mergeProps(e.unref(f),{id:e.unref(v),ref_key:"listEl",ref:x,tabindex:e.unref(j)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(M),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(te)})))],16,ee),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(j)})))],6),[[e.vShow,e.unref(j)]])])),_:3},16,["name"])],64))}});const le=e.defineComponent({name:"VvDropdownItem",props:X,setup(t){const l=t,{role:o,expanded:n}=e.inject(S,{}),r=e.ref(null);!function({expanded:t}){e.provide(B,{role:e.ref(m.menuitem),expanded:t})}({expanded:n});const i=a.useElementHover(r),{focused:u}=a.useFocus(r),{focused:s}=a.useFocusWithin(r);return e.watch(i,(e=>{e&&l.focusOnHover&&(u.value=!0)})),(t,l)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(o)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}}),oe=["title"],ae=e.defineComponent({name:"VvDropdownOption",props:Y,setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=w("vv-dropdown-option",o,e.computed((()=>({disabled:l.disabled,selected:l.selected,unselectable:l.unselectable&&l.selected})))),n=e.computed((()=>l.selected?l.unselectable?l.deselectHintLabel:l.selectedHintLabel:l.disabled?"":l.selectHintLabel));return(t,l)=>(e.openBlock(),e.createBlock(le,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled,"focus-on-hover":t.focusOnHover},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,oe)])),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}}),ne={class:"vv-dropdown-optgroup",role:"presentation",tabindex:"-1"},re=e.defineComponent({name:"VvDropdownOptgroup",props:{...F},setup(t){const l=t;return(t,o)=>(e.openBlock(),e.createElementBlock("li",ne,e.toDisplayString(l.label),1))}});function ie(e,t,l){return ue(e,t)}function ue(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(!ue(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 s=e instanceof RegExp,d=t instanceof RegExp;if(s!==d)return!1;if(s&&d)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],!ue(e[r],t[r]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function se(e,t){if(null!=e&&t&&t.length)for(const l of t)if(ie(e,l))return!0;return!1}function de(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function ce(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>de(o.value.invalidLabel))),n=e.computed((()=>de(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)))),s=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),d=e.computed((()=>!u.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!u.value&&!s.value&&!d.value&&Boolean(l.hint||i.value))),v=e.computed((()=>s.value||d.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:s,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,r,i,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}const ve={...W,...G,...J,...I,...P,...$,...j,...C,...O,...D,...R,...H,...z,...T,...M,...F,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},autoselectFirst:{type:Boolean,default:!1},placeholder:String};function fe(){return{...ve,options:{...ve.options,type:Array,default:()=>[]}}}function pe(t,l,o){const a=x(),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];if(a.length){a[0]===n&&(l[o]=e[o])}}if("function"==typeof t[o]){(0,t[o])()===n&&(l[o]=e[o])}if("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}),{})}))}function me(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}function be(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)===v.before?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===v.after?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===d.left?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===d.right?o.value:void 0)),u=e.computed((()=>(null==l?void 0:l.value)===d.top?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===d.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:r,hasIconRight:i,hasIconTop:u,hasIconBottom:s,hasIconBefore:a,hasIconAfter:n}}function ge(t){const{options:l,labelKey:o,valueKey:a,disabledKey:n}=e.toRefs(t);return{options:l,getOptionLabel:e=>"string"==typeof e?e:"function"==typeof o.value?o.value(e):String(o.value?r.get(e,o.value):e),getOptionValue:e=>"string"==typeof e?e:"function"==typeof a.value?a.value(e):a.value?r.get(e,a.value):e,isOptionDisabled:e=>"string"!=typeof e&&("function"==typeof n.value?n.value(e):!!n.value&&r.get(e,n.value)),getOptionGrouped:e=>"string"==typeof e?[]:"object"==typeof e&&e&&"options"in e?e.options:[]}}const ye=["for"],he={class:"vv-select__wrapper"},ke={key:0,class:"vv-select__input-before"},Se={class:"vv-select__inner"},Be=["id"],xe=["disabled","hidden"],we=["disabled","value"],Ve=["disabled","label"],Le=["disabled","value"],Pe={key:1,class:"vv-select__input-after"},$e=e.defineComponent({name:"VvSelect",props:fe(),emits:["update:modelValue","focus","blur"],setup(t,{emit:l}){const o=t,n=l,r=e.useSlots(),i=pe("VvSelect",fe(),o),u=e.ref(),{HintSlot:s,hasHintLabelOrSlot:d,hasInvalidLabelOrSlot:c,hintSlotScope:v}=ce(i,r),{focused:f}=me(u,n);function p(e){var t;return"string"!=typeof e&&(null==(t=e.options)?void 0:t.length)}const{id:m,modifiers:b,disabled:g,readonly:y,loading:h,icon:k,iconPosition:S,invalid:B,valid:x,floating:L,multiple:P}=e.toRefs(o),$=Z(m),C=e.computed((()=>`${$.value}-hint`)),O=e.computed((()=>o.disabled||o.readonly)),N=e.computed((()=>O.value?-1:o.tabindex)),E=e.computed({get:()=>o.modelValue,set:e=>{!Array.isArray(e)||0!==(e=e.filter((e=>void 0!==e))).length||o.unselectable?n("update:modelValue",e):u.value.value=o.modelValue}}),_=e.computed((()=>Array.isArray(E.value)?E.value.length>0:void 0!==E.value&&null!==E.value)),A=a.useElementVisibility(u);e.watch(A,(e=>{e&&o.autofocus&&(f.value=!0)}));const{hasIconBefore:F,hasIconAfter:D}=be(k,S),R=e.computed((()=>!0===o.invalid||!0!==o.valid&&void 0)),j=w("vv-select",b,e.computed((()=>({valid:x.value,invalid:B.value,loading:h.value,disabled:g.value,readonly:y.value,"icon-before":void 0!==F.value,"icon-after":void 0!==D.value,dirty:_.value,focus:f.value,floating:L.value,multiple:P.value})))),{getOptionLabel:H,getOptionValue:z,isOptionDisabled:I,getOptionGrouped:T}=ge(o);e.watch((()=>o.options),(e=>{if((null==e?void 0:e.length)&&o.autoselectFirst&&!_.value){const t=z(e[0]);E.value=o.multiple?[t]:t}}),{immediate:!0});const M=e.computed((()=>({name:o.name,tabindex:N.value,disabled:O.value,required:o.required,size:o.size,autocomplete:o.autocomplete,multiple:o.multiple,"aria-invalid":R.value,"aria-describedby":d.value?C.value:void 0,"aria-errormessage":c.value?C.value:void 0}))),K=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(j))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref($)},e.toDisplayString(t.label),9,ye)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",he,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(K))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Se,[e.unref(F)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(F),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref($),ref_key:"selectEl",ref:u},e.unref(M),{"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(E)?E.value=t:null)}),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!t.unselectable,hidden:!t.unselectable},e.toDisplayString(t.placeholder),9,xe)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,((t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p(t)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${l}`,disabled:e.unref(I)(t),label:e.unref(H)(t)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T)(t),((t,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${l}-item-${o}`,disabled:e.unref(I)(t),value:e.unref(z)(t)},e.toDisplayString(e.unref(H)(t)),9,Le)))),128))],8,Ve)):(e.openBlock(),e.createElementBlock("option",{key:l,disabled:e.unref(I)(t),value:e.unref(z)(t)},e.toDisplayString(e.unref(H)(t)),9,we))],64)))),256))],16,Be),[[e.vModelSelect,e.unref(E)]]),e.unref(D)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:1},e.unref(D),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(K))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(s),{id:e.unref(C),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(v))))])),key:"3"}:void 0]),1032,["id"])],2))}}),Ce={...R,value:[String,Number]},Oe=e.defineComponent({name:"VvBadge",props:Ce,setup(t){const l=t,{modifiers:o}=e.toRefs(l),a=w("vv-badge",o);return(t,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a))},[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.value),1)]))],2))}}),Ne=U,Ee=e.defineComponent({name:"VvAction",props:Ne,emits:["click","mouseover","mouseleave"],setup(t,{expose:l,emit:o}){const a=t,n=o,r=e.getCurrentInstance(),i=x(),u=e.ref(null);l({$el:u});const{reference:s,bus:d,aria:c,expanded:v}=e.inject(k,{});e.watch((()=>u.value),(e=>{s&&(s.value=e)}));const f=e.computed((()=>a.pressed||(null==v?void 0:v.value))),{role:m}=e.inject(B,{}),b=e.computed((()=>{switch(!0){case a.disabled:return p.button;case void 0!==a.to:return(null==i?void 0:i.nuxt)?p.nuxtLink:p.routerLink;case void 0!==a.href:return p.a;default:return a.defaultTag}})),g=e.computed((()=>{const e={...null==c?void 0:c.value,ariaPressed:!!f.value||void 0,ariaLabel:a.ariaLabel,role:null==m?void 0:m.value};switch(b.value){case p.a:return{...e,href:a.href,target:a.target,rel:a.rel};case p.routerLink:case p.nuxtLink:return{...e,to:a.to,target:a.target};case p.button:return{...e,type:a.type,disabled:a.disabled};default:return e}}));function y(e){var t;a.disabled?e.preventDefault():(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onClick)?n("click",e):null==d||d.emit("click",e)}function h(e){var t;(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onMouseover)?n("mouseover",e):null==d||d.emit("mouseover",e)}function S(e){var t;(null==(t=null==r?void 0:r.vnode.props)?void 0:t.onMouseleave)?n("mouseleave",e):null==d||d.emit("mouseleave",e)}return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b)),e.mergeProps(e.unref(g),{ref_key:"element",ref:u,class:{active:t.active,pressed:e.unref(f),disabled:t.disabled,current:t.current},onClickPassive:y,onMouseoverPassive:h,onMouseleavePassive:S}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const _e={...U,...K,...R,...M,...C,...z,iconPosition:{type:String,default:d.left,validator:e=>Object.values(d).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}};function Ae(t,l){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),o=e.computed((()=>void 0!==l));return{group:l,isInGroup:o,getGroupOrLocalRef:function(t,o,a){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const r=e.toRef(o,t);return e.computed({get:()=>r.value,set(e){a&&a(`update:${t}`,e)}})}}}(h),{id:r,iconPosition:i,icon:u,label:s,pressed:d}=e.toRefs(t),c=n("modelValue",t,l),v=n("toggle",t),f=n("unselectable",t),p=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),m=e.computed((()=>{let e=t.modifiers,l=null==o?void 0:o.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((()=>Boolean(t.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:c,toggle:v,unselectable:f,multiple:p,modifiers:m,disabled:b,id:r,pressed:d,iconPosition:i,icon:u,label:s}}const Fe={key:1,class:"vv-button__label"},De={key:1,class:"vv-button__label"},Re=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:_e,emits:["update:modelValue"],setup(t,{expose:l,emit:o}){const a=t,n=o,r=e.useAttrs(),i=e.useSlots(),{id:u,modifiers:s,iconPosition:c,icon:v,label:f,modelValue:p,disabled:m,toggle:b,unselectable:g}=Ae(a,n),y=Z(u),h=e.computed((()=>(null==r?void 0:r.name)||y.value)),k=e.ref(null);l({$el:e.computed((()=>{var e;return null==(e=k.value)?void 0:e.$el}))});const S=e.computed((()=>b.value?Array.isArray(p.value)?se(h.value,p.value):ie(h.value,p.value):a.pressed)),B=w("vv-button",s,e.computed((()=>({reverse:[d.right,d.bottom].includes(c.value),column:[d.top,d.bottom].includes(c.value),"icon-only":Boolean((null==v?void 0:v.value)&&!(null==f?void 0:f.value)&&!i.default)})))),{hasIcon:x}=be(v),L=e.computed((()=>void 0!==a.value?a.value:h.value)),P=e.computed((()=>{if(b.value)return{onClick:$}}));function $(){if(b.value){if(Array.isArray(p.value))return se(L.value,p.value)?void(g.value&&(p.value=p.value.filter((e=>e!==L.value)))):void p.value.push(L.value);if(L.value===p.value&&g.value)return void(p.value=a.uncheckedValue);p.value=L.value}}return(t,l)=>(e.openBlock(),e.createBlock(Ee,e.mergeProps({...e.unref(r),...e.unref(P),disabled:e.unref(m),pressed:e.unref(S),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(y),ref_key:"element",ref:k,class:e.unref(B)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},(()=>[t.loadingIcon?(e.openBlock(),e.createBlock(V,{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",Fe,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(x)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(x),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",De,[e.renderSlot(t.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"after")],64))]))])),_:3},16,["id","class"]))}}),je={...W,...I,...P,...$,...j,...C,...O,...D,...R,...H,...z,...T,...q,...F,transitionName:{type:String,default:"vv-dropdown--mobile-fade-block"},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},noResultsLabel:{type:String,default:"No results"},noOptionsLabel:{type:String,default:"No options available"},selectedHintLabel:{type:String,default:"Selected"},deselectActionLabel:{type:String,default:"Deselect"},selectHintLabel:{type:String,default:"Press enter to select"},deselectHintLabel:{type:String,default:"Press enter to remove"},closeLabel:{type:String,default:"Close"},placeholder:String,searchable:Boolean,searchFunction:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search..."},debounceSearch:{type:[Number,String],default:0},multiple:Boolean,minValues:{type:[Number,String],default:0},maxValues:[Number,String],unselectable:{type:Boolean,default:!0},separator:{type:String,default:", "},native:Boolean,badges:Boolean,badgeModifiers:{type:[String,Array],default:"action sm"},triggerWidth:{...q.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array],default:"mobile"},autoOpen:{type:Boolean,default:!1},autoselectFirst:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1}};function He(){return{...je,options:{...je.options,type:Array},searchFunction:{...je.searchFunction,type:Function}}}const ze=["id"],Ie=["id","for"],Te=["id","aria-controls","placeholder"],Me={key:0,class:"vv-select__input-before"},Ke={class:"vv-select__inner"},qe=["aria-controls","aria-expanded","aria-labelledby","aria-describedby","aria-errormessage","tabindex"],We={key:0,class:"vv-select__value"},Ge=["aria-label","onClick"],Je={key:1,class:"vv-select__input-after"},Ue={name:"VvCombobox",components:{VvDropdown:te,VvDropdownOption:ae,VvDropdownOptgroup:re,VvButton:Re}};return e.defineComponent({...Ue,props:He(),emits:["update:modelValue","update:search","change:search","focus","blur"],setup(t,{emit:l}){const o=t,n=l,r=e.useSlots(),i=pe("VvCombobox",He(),o),u=e.ref(null),s=e.ref(null),d=e.ref(null),c=e.ref(null),{HintSlot:v,hasHintLabelOrSlot:f,hasInvalidLabelOrSlot:p,hintSlotScope:m}=ce(i,r),{focused:g}=me(u,n),{focused:y}=a.useFocusWithin(d);e.watch(g,(e=>{o.autoOpen&&(!e||S.value?e||!S.value||y.value||L():x())})),e.watch(y,(e=>{g.value||e||!S.value||L()}));const h=e.ref(""),k=a.refDebounced(h,e.computed((()=>Number(o.debounceSearch))));e.watch(k,(()=>{n("update:search",k.value),n("change:search",k.value)}));const S=e.ref(!1);function B(){q.value||(S.value=!S.value)}function x(){q.value||S.value||(S.value=!0)}function L(){!q.value&&S.value&&(S.value=!1)}function P(){i.value.searchable&&s.value&&s.value.focus({preventScroll:!0})}function $(){i.value.searchable&&(h.value="")}function C(e){var t;return"string"!=typeof e&&(null==(t=e.options)?void 0:t.length)}const{id:O,icon:N,iconPosition:E,modifiers:_,disabled:A,readonly:F,loading:D,valid:R,invalid:j,floating:H}=e.toRefs(o),z=Z(O),I=e.computed((()=>`${z.value}-hint`)),T=e.computed((()=>`${z.value}-dropdown`)),M=e.computed((()=>`${z.value}-search`)),K=e.computed((()=>`${z.value}-label`)),q=e.computed((()=>o.disabled||o.readonly)),W=e.computed((()=>q.value?-1:o.tabindex)),G=e.computed({get:()=>Array.isArray(o.modelValue)?o.modelValue:void 0!==o.modelValue&&null!==o.modelValue?[o.modelValue]:[],set:e=>{n("update:modelValue",o.multiple||Array.isArray(o.modelValue)?e:e.pop())}}),J=e.computed((()=>G.value.length)),U=e.computed((()=>J.value>0)),Q=e.computed((()=>o.multiple?void 0===o.maxValues?1/0:Number(o.maxValues):1)),X=e.computed((()=>!q.value&&(!!o.unselectable&&(0===Number(o.minValues)||J.value>Number(o.minValues))))),Y=e.computed((()=>!q.value&&(!o.multiple||J.value<Q.value))),ee=e.ref(!1),le=e.computed((()=>ee.value||D.value)),{hasIconBefore:oe,hasIconAfter:ne}=be(N,E),ie=w("vv-select",_,e.computed((()=>({disabled:A.value,loading:le.value,readonly:F.value,"icon-before":void 0!==oe.value,"icon-after":void 0!==ne.value,valid:R.value,invalid:j.value,dirty:U.value,focus:g.value||y.value||S.value,floating:H.value,badges:o.badges})))),{getOptionLabel:ue,getOptionValue:se,getOptionGrouped:de,isOptionDisabled:ve}=ge(o);function fe(e){return ve(e)||!Y.value&&!he(e)}const ye=a.computedAsync((async()=>{var e;if(i.value.searchFunction){ee.value=!0;const e=await Promise.resolve(i.value.searchFunction(k.value,o.options));return ee.value=!1,e}return null==(e=o.options)?void 0:e.filter((e=>ue(e).toLowerCase().includes(k.value.toLowerCase().trim())))}));function he(e){const t=se(e);return"object"==typeof t?G.value.some((e=>"object"==typeof e&&JSON.stringify(e)===JSON.stringify(t))):G.value.includes(t)}const ke=e.computed((()=>o.options.reduce(((e,t)=>C(t)?[...e,...de(t)]:[...e,t]),[]).filter((e=>he(e))))),Se=e.computed((()=>ke.value.map((e=>ue(e))).join(o.separator)));function Be(){o.autoOpen?x():B()}function xe(e){const t=he(e),l=se(e);t&&X.value?G.value=G.value.filter((e=>"object"==typeof l&&"object"==typeof e?JSON.stringify(e)!==JSON.stringify(l):e!==l)):!t&&Y.value&&(o.multiple||(G.value=[]),G.value=[...G.value,l]),o.multiple||o.keepOpen||L()}e.watch((()=>o.options),(e=>{(null==e?void 0:e.length)&&o.autoselectFirst&&!U.value&&xe(e[0])}),{immediate:!0});const we=e.computed((()=>({id:z.value,name:o.name,tabindex:W.value,valid:R.value,validLabel:i.value.validLabel,invalid:j.value,invalidLabel:i.value.invalidLabel,hintLabel:i.value.hintLabel,loading:le.value,loadingLabel:i.value.loadingLabel,disabled:A.value,readonly:F.value,modifiers:i.value.modifiers,options:i.value.options,labelKey:i.value.labelKey,valueKey:i.value.valueKey,icon:i.value.icon,iconPosition:i.value.iconPosition,floating:i.value.floating,unselectable:X.value,autoselectFirst:i.value.autoselectFirst,multiple:i.value.multiple,label:i.value.label,placeholder:i.value.placeholder,modelValue:o.modelValue}))),Ve=e.computed((()=>({id:T.value,reference:d.value,placement:i.value.placement,strategy:i.value.strategy,transitionName:i.value.transitionName,offset:i.value.offset,shift:i.value.shift,flip:i.value.flip,autoPlacement:i.value.autoPlacement,arrow:i.value.arrow,autofocusFirst:!!i.value.searchable||i.value.autofocusFirst,triggerWidth:i.value.triggerWidth,modifiers:i.value.dropdownModifiers}))),Le=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return a.onKeyStroke([" ","Enter"],(e=>{o.autoOpen||!S.value&&g.value&&(e.preventDefault(),e.stopImmediatePropagation(),B())}),{target:u}),(t,l)=>t.native?(e.openBlock(),e.createBlock($e,e.mergeProps({key:1},e.unref(we),{"onUpdate:modelValue":l[3]||(l[3]=e=>n("update:modelValue",e))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(z),class:e.normalizeClass(e.unref(ie))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(K),for:e.unref(i).searchable?e.unref(M):void 0},e.toDisplayString(t.label),9,Ie)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:d,class:"vv-select__wrapper"},[e.createVNode(te,e.mergeProps({ref_key:"dropdownEl",ref:c,modelValue:e.unref(S),"onUpdate:modelValue":l[2]||(l[2]=t=>e.isRef(S)?S.value=t:null)},e.unref(Ve),{role:e.unref(b).listbox,onAfterExpand:P,onAfterCollapse:$}),e.createSlots({default:e.withCtx((({aria:l})=>[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(Le))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Ke,[e.unref(oe)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(oe),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:u},l,{class:"vv-select__input",role:"combobox","aria-controls":e.unref(T),"aria-expanded":e.unref(S),"aria-labelledby":e.unref(K),"aria-describedby":e.unref(f)?e.unref(I):void 0,"aria-errormessage":e.unref(p)?e.unref(I):void 0,tabindex:e.unref(W),onClickPassive:Be}),[e.renderSlot(t.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(ke),onInput:xe})),(()=>[e.unref(Se)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.badges?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(ke),((l,o)=>(e.openBlock(),e.createBlock(Oe,{key:o,modifiers:t.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(ue)(l))+" ",1),e.unref(X)?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(i).deselectActionLabel,type:"button",onClick:e.withModifiers((e=>xe(l)),["stop"])},[e.createVNode(V,{name:"close"})],8,Ge)):e.createCommentVNode("v-if",!0)])),_:2},1032,["modifiers"])))),128)):(e.openBlock(),e.createElementBlock("div",We,e.toDisplayString(e.unref(Se)),1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.placeholder),1)],64))]))],16,qe),e.unref(ne)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:1},e.unref(ne),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(Le))))])):e.createCommentVNode("v-if",!0)])),items:e.withCtx((()=>{var l;return[!e.unref(A)&&(null==(l=e.unref(ye))?void 0:l.length)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(ye),((l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[C(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(re,{label:e.unref(ue)(l)},null,8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(de)(l),((o,a)=>(e.openBlock(),e.createBlock(ae,e.mergeProps({ref_for:!0},{selected:he(o),disabled:fe(o),unselectable:e.unref(X),deselectHintLabel:e.unref(i).deselectHintLabel,selectHintLabel:e.unref(i).selectHintLabel,selectedHintLabel:e.unref(i).selectedHintLabel},{key:a,class:"vv-dropdown-option","focus-on-hover":"",onClickPassive:e=>xe(o)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},{option:l,selectedOptions:e.unref(ke),selected:he(o),disabled:fe(o)}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ue)(o)),1)]))])),_:2},1040,["onClickPassive"])))),128))],64)):(e.openBlock(),e.createBlock(ae,e.mergeProps({key:1,ref_for:!0},{selected:he(l),disabled:fe(l),unselectable:e.unref(X),deselectHintLabel:e.unref(i).deselectHintLabel,selectHintLabel:e.unref(i).selectHintLabel,selectedHintLabel:e.unref(i).selectedHintLabel},{class:"vv-dropdown-option","focus-on-hover":"",onClickPassive:e=>xe(l)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.mergeProps({ref_for:!0},{option:l,selectedOptions:e.unref(ke),selected:he(l),disabled:fe(l)}),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ue)(l)),1)]))])),_:2},1040,["onClickPassive"]))],64)))),128)):t.options.length?e.unref(A)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(ae,{key:2,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-results",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).noResultsLabel),1)]))])),_:3})):(e.openBlock(),e.createBlock(ae,{key:1,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-options",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).noOptionsLabel),1)]))])),_:3}))]})),after:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::after",{},(()=>{var t;return[(null==(t=e.unref(c))?void 0:t.customPosition)?(e.openBlock(),e.createBlock(Re,{key:0,label:e.unref(i).closeLabel,modifiers:"secondary",onClick:l[1]||(l[1]=t=>e.unref(c).hide())},null,8,["label"])):e.createCommentVNode("v-if",!0)]}))])),_:2},[e.unref(i).searchable||t.$slots["dropdown::before"]?{name:"before",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::before"),e.unref(i).searchable&&!e.unref(A)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(M),ref_key:"inputSearchEl",ref:s,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(h)?h.value=t:null),"aria-autocomplete":"list","aria-controls":e.unref(T),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:e.unref(i).searchPlaceholder},null,8,Te)),[[e.vModelText,e.unref(h)]]):e.createCommentVNode("v-if",!0)])),key:"0"}:void 0]),1040,["modelValue","role"])],512),e.createVNode(e.unref(v),{id:e.unref(I),class:"vv-select__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"3"}:void 0]),1032,["id"])],10,ze))}})}));
@@ -1,5 +1,5 @@
1
1
  import type { Option } from '../../types/generic';
2
- declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
+ declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_Prettify<Pick<Partial<{
4
4
  floating: boolean;
5
5
  size: boolean | {
@@ -7,7 +7,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
7
7
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
8
8
  altBoundary?: boolean | undefined;
9
9
  padding?: import("@floating-ui/utils").Padding | undefined;
10
- boundary?: import("@floating-ui/dom").Boundary;
10
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
11
11
  apply?: ((args: import("@floating-ui/dom").MiddlewareState & {
12
12
  availableWidth: number;
13
13
  availableHeight: number;
@@ -17,7 +17,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
17
17
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
18
18
  altBoundary?: boolean | undefined;
19
19
  padding?: import("@floating-ui/utils").Padding | undefined;
20
- boundary?: import("@floating-ui/dom").Boundary;
20
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
21
21
  apply?: ((args: import("@floating-ui/dom").MiddlewareState & {
22
22
  availableWidth: number;
23
23
  availableHeight: number;
@@ -34,7 +34,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
34
34
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
35
35
  options?: any;
36
36
  } | undefined;
37
- boundary?: import("@floating-ui/dom").Boundary;
37
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
38
38
  } | import("@floating-ui/core").Derivable<{
39
39
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
40
40
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -46,7 +46,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
46
46
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
47
47
  options?: any;
48
48
  } | undefined;
49
- boundary?: import("@floating-ui/dom").Boundary;
49
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
50
50
  }> | undefined;
51
51
  label: string | number;
52
52
  disabled: boolean;
@@ -64,7 +64,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
64
64
  fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
65
65
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
66
66
  flipAlignment?: boolean | undefined;
67
- boundary?: import("@floating-ui/dom").Boundary;
67
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
68
68
  } | import("@floating-ui/core").Derivable<{
69
69
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
70
70
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -76,7 +76,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
76
76
  fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
77
77
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
78
78
  flipAlignment?: boolean | undefined;
79
- boundary?: import("@floating-ui/dom").Boundary;
79
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
80
80
  }> | undefined;
81
81
  icon: string | import("../VvIcon/index.js").VvIconProps;
82
82
  closeLabel: string;
@@ -108,7 +108,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
108
108
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
109
109
  autoAlignment?: boolean | undefined;
110
110
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
111
- boundary?: import("@floating-ui/dom").Boundary;
111
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
112
112
  } | import("@floating-ui/core").Derivable<{
113
113
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
114
114
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -118,7 +118,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
118
118
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
119
119
  autoAlignment?: boolean | undefined;
120
120
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
121
- boundary?: import("@floating-ui/dom").Boundary;
121
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
122
122
  }> | undefined;
123
123
  arrow: boolean;
124
124
  keepOpen: boolean;
@@ -149,7 +149,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
149
149
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
150
150
  altBoundary?: boolean | undefined;
151
151
  padding?: import("@floating-ui/utils").Padding | undefined;
152
- boundary?: import("@floating-ui/dom").Boundary;
152
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
153
153
  apply?: ((args: import("@floating-ui/dom").MiddlewareState & {
154
154
  availableWidth: number;
155
155
  availableHeight: number;
@@ -159,7 +159,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
159
159
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
160
160
  altBoundary?: boolean | undefined;
161
161
  padding?: import("@floating-ui/utils").Padding | undefined;
162
- boundary?: import("@floating-ui/dom").Boundary;
162
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
163
163
  apply?: ((args: import("@floating-ui/dom").MiddlewareState & {
164
164
  availableWidth: number;
165
165
  availableHeight: number;
@@ -176,7 +176,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
176
176
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
177
177
  options?: any;
178
178
  } | undefined;
179
- boundary?: import("@floating-ui/dom").Boundary;
179
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
180
180
  } | import("@floating-ui/core").Derivable<{
181
181
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
182
182
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -188,7 +188,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
188
188
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
189
189
  options?: any;
190
190
  } | undefined;
191
- boundary?: import("@floating-ui/dom").Boundary;
191
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
192
192
  }> | undefined;
193
193
  readonly disabled: boolean;
194
194
  readonly readonly: boolean;
@@ -203,7 +203,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
203
203
  fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
204
204
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
205
205
  flipAlignment?: boolean | undefined;
206
- boundary?: import("@floating-ui/dom").Boundary;
206
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
207
207
  } | import("@floating-ui/core").Derivable<{
208
208
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
209
209
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -215,7 +215,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
215
215
  fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
216
216
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
217
217
  flipAlignment?: boolean | undefined;
218
- boundary?: import("@floating-ui/dom").Boundary;
218
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
219
219
  }> | undefined;
220
220
  readonly closeLabel: string;
221
221
  readonly iconPosition: "before" | "after";
@@ -243,7 +243,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
243
243
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
244
244
  autoAlignment?: boolean | undefined;
245
245
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
246
- boundary?: import("@floating-ui/dom").Boundary;
246
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
247
247
  } | import("@floating-ui/core").Derivable<{
248
248
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
249
249
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -253,7 +253,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
253
253
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
254
254
  autoAlignment?: boolean | undefined;
255
255
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
256
- boundary?: import("@floating-ui/dom").Boundary;
256
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
257
257
  }> | undefined;
258
258
  readonly arrow: boolean;
259
259
  readonly keepOpen: boolean;
@@ -512,7 +512,7 @@ declare const _default: <T extends string | Option>(__VLS_props: Awaited<typeof
512
512
  "onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
513
513
  "onUpdate:search"?: ((args_0: string) => any) | undefined;
514
514
  "onChange:search"?: ((args_0: string) => any) | undefined;
515
- }, "floating" | "size" | "shift" | "label" | "disabled" | "modelValue" | "modifiers" | "readonly" | "flip" | "icon" | "closeLabel" | "iconPosition" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "hintLabel" | "valid" | "validLabel" | "invalid" | "invalidLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "placement" | "strategy" | "transitionName" | "offset" | "autoPlacement" | "arrow" | "keepOpen" | "autofocusFirst" | "triggerWidth" | "deselectHintLabel" | "selectHintLabel" | "selectedHintLabel" | "autoselectFirst" | "searchFunction" | "noResultsLabel" | "noOptionsLabel" | "deselectActionLabel" | "searchable" | "searchPlaceholder" | "debounceSearch" | "minValues" | "separator" | "native" | "badges" | "badgeModifiers" | "dropdownModifiers" | "autoOpen">, "name" | "id" | "onFocus" | "onBlur" | "onUpdate:modelValue" | "placeholder" | "onUpdate:search" | "onChange:search" | "maxValues" | ("floating" | "size" | "shift" | "label" | "disabled" | "modelValue" | "modifiers" | "readonly" | "flip" | "icon" | "closeLabel" | "iconPosition" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "hintLabel" | "valid" | "validLabel" | "invalid" | "invalidLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "placement" | "strategy" | "transitionName" | "offset" | "autoPlacement" | "arrow" | "keepOpen" | "autofocusFirst" | "triggerWidth" | "deselectHintLabel" | "selectHintLabel" | "selectedHintLabel" | "autoselectFirst" | "searchFunction" | "noResultsLabel" | "noOptionsLabel" | "deselectActionLabel" | "searchable" | "searchPlaceholder" | "debounceSearch" | "minValues" | "separator" | "native" | "badges" | "badgeModifiers" | "dropdownModifiers" | "autoOpen")> & {}> & __VLS_BuiltInPublicProps;
515
+ }, "floating" | "size" | "shift" | "label" | "disabled" | "modelValue" | "modifiers" | "readonly" | "flip" | "icon" | "closeLabel" | "iconPosition" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "hintLabel" | "valid" | "validLabel" | "invalid" | "invalidLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "placement" | "strategy" | "transitionName" | "offset" | "autoPlacement" | "arrow" | "keepOpen" | "autofocusFirst" | "triggerWidth" | "deselectHintLabel" | "selectHintLabel" | "selectedHintLabel" | "autoselectFirst" | "searchFunction" | "noResultsLabel" | "noOptionsLabel" | "deselectActionLabel" | "searchable" | "searchPlaceholder" | "debounceSearch" | "minValues" | "separator" | "native" | "badges" | "badgeModifiers" | "dropdownModifiers" | "autoOpen">, "name" | "id" | "onFocus" | "onBlur" | "onUpdate:modelValue" | "placeholder" | "onUpdate:search" | "onChange:search" | "maxValues" | ("floating" | "size" | "shift" | "label" | "disabled" | "modelValue" | "modifiers" | "readonly" | "flip" | "icon" | "closeLabel" | "iconPosition" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "hintLabel" | "valid" | "validLabel" | "invalid" | "invalidLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "placement" | "strategy" | "transitionName" | "offset" | "autoPlacement" | "arrow" | "keepOpen" | "autofocusFirst" | "triggerWidth" | "deselectHintLabel" | "selectHintLabel" | "selectedHintLabel" | "autoselectFirst" | "searchFunction" | "noResultsLabel" | "noOptionsLabel" | "deselectActionLabel" | "searchable" | "searchPlaceholder" | "debounceSearch" | "minValues" | "separator" | "native" | "badges" | "badgeModifiers" | "dropdownModifiers" | "autoOpen")> & {}> & import("vue").PublicProps;
516
516
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
517
517
  attrs: any;
518
518
  slots: ReturnType<() => {
@@ -188,7 +188,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
188
188
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
189
189
  altBoundary?: boolean | undefined;
190
190
  padding?: import("@floating-ui/utils").Padding | undefined;
191
- boundary?: import("@floating-ui/dom").Boundary;
191
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
192
192
  apply?: ((args: import("@floating-ui/dom").MiddlewareState & {
193
193
  availableWidth: number;
194
194
  availableHeight: number;
@@ -198,7 +198,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
198
198
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
199
199
  altBoundary?: boolean | undefined;
200
200
  padding?: import("@floating-ui/utils").Padding | undefined;
201
- boundary?: import("@floating-ui/dom").Boundary;
201
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
202
202
  apply?: ((args: import("@floating-ui/dom").MiddlewareState & {
203
203
  availableWidth: number;
204
204
  availableHeight: number;
@@ -215,7 +215,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
215
215
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
216
216
  options?: any;
217
217
  } | undefined;
218
- boundary?: import("@floating-ui/dom").Boundary;
218
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
219
219
  } | import("@floating-ui/core").Derivable<{
220
220
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
221
221
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -227,7 +227,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
227
227
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/utils").Coords;
228
228
  options?: any;
229
229
  } | undefined;
230
- boundary?: import("@floating-ui/dom").Boundary;
230
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
231
231
  }> | undefined;
232
232
  modelValue: boolean;
233
233
  modifiers: string | string[];
@@ -243,7 +243,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
243
243
  fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
244
244
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
245
245
  flipAlignment?: boolean | undefined;
246
- boundary?: import("@floating-ui/dom").Boundary;
246
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
247
247
  } | import("@floating-ui/core").Derivable<{
248
248
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
249
249
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -255,7 +255,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
255
255
  fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
256
256
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
257
257
  flipAlignment?: boolean | undefined;
258
- boundary?: import("@floating-ui/dom").Boundary;
258
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
259
259
  }> | undefined;
260
260
  placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
261
261
  strategy: "absolute" | "fixed";
@@ -270,7 +270,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
270
270
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
271
271
  autoAlignment?: boolean | undefined;
272
272
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
273
- boundary?: import("@floating-ui/dom").Boundary;
273
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
274
274
  } | import("@floating-ui/core").Derivable<{
275
275
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
276
276
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
@@ -280,7 +280,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
280
280
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
281
281
  autoAlignment?: boolean | undefined;
282
282
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
283
- boundary?: import("@floating-ui/dom").Boundary;
283
+ boundary?: import("@floating-ui/dom").Boundary | undefined;
284
284
  }> | undefined;
285
285
  arrow: boolean;
286
286
  keepOpen: boolean;
@@ -542,11 +542,6 @@ function useModifiers(prefix, modifiers, others) {
542
542
  });
543
543
  }
544
544
  }
545
- if (others) {
546
- Object.keys(others.value).forEach((key) => {
547
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
548
- });
549
- }
550
545
  return toReturn;
551
546
  });
552
547
  }
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var n=(e=>(e.local="local",e.session="session",e))(n||{}),r=(e=>(e.absolute="absolute",e.fixed="fixed",e))(r||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(a||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{}),d=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(d||{}),c=(e=>(e.listbox="listbox",e.menu="menu",e))(c||{});const f=Symbol.for("volver"),p=Symbol.for("dropdownTrigger"),v=Symbol.for("dropdownItem"),m=Symbol.for("dropdownAction"),b={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},g={disabled:{type:Boolean,default:!1}},y={active:{type:Boolean,default:!1}},h={current:{type:Boolean,default:!1}},k={pressed:{type:Boolean,default:!1}},x={label:{type:[String,Number],default:void 0}},S={modifiers:{type:[String,Array],default:void 0}};u.before;l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const B={...g,...x,...k,...y,...h,...b,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:s.button}};n.local;const w=B;const C=e.defineComponent({name:"VvAction",props:w,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=n,a=e.getCurrentInstance(),u=e.inject(f),i=e.ref(null);o({$el:i});const{reference:d,bus:c,aria:v,expanded:b}=e.inject(p,{});e.watch((()=>i.value),(e=>{d&&(d.value=e)}));const g=e.computed((()=>r.pressed||(null==b?void 0:b.value))),{role:y}=e.inject(m,{}),h=e.computed((()=>{switch(!0){case r.disabled:return s.button;case void 0!==r.to:return(null==u?void 0:u.nuxt)?s.nuxtLink:s.routerLink;case void 0!==r.href:return s.a;default:return r.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!g.value||void 0,ariaLabel:r.ariaLabel,role:null==y?void 0:y.value};switch(h.value){case s.a:return{...e,href:r.href,target:r.target,rel:r.rel};case s.routerLink:case s.nuxtLink:return{...e,to:r.to,target:r.target};case s.button:return{...e,type:r.type,disabled:r.disabled};default:return e}}));function x(e){var t;r.disabled?e.preventDefault():(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onClick)?l("click",e):null==c||c.emit("click",e)}function S(e){var t;(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onMouseover)?l("mouseover",e):null==c||c.emit("mouseover",e)}function B(e){var t;(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onMouseleave)?l("mouseleave",e):null==c||c.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),e.mergeProps(e.unref(k),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:x,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});Boolean,c.menu;const L={focusOnHover:{type:Boolean,default:!1}};const _=e.defineComponent({name:"VvDropdownItem",props:L,setup(t){const n=t,{role:r,expanded:l}=e.inject(v,{}),a=e.ref(null);!function({expanded:t}){e.provide(m,{role:e.ref(d.menuitem),expanded:t})}({expanded:l});const u=o.useElementHover(a),{focused:i}=o.useFocus(a),{focused:s}=o.useFocusWithin(a);return e.watch(u,(e=>{e&&n.focusOnHover&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:a,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({__name:"VvDropdownAction",props:{...B,...S},setup(t){const o=t,{modifiers:n}=e.toRefs(o),r=function(t,o,n){return e.computed((()=>{const r={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{r[`${t}--${o}`]=e.unref(n.value[o])})),r}))}("vv-dropdown-action",n);return(t,o)=>(e.openBlock(),e.createBlock(_,null,{default:e.withCtx((()=>[e.createVNode(C,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(r)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var n=(e=>(e.local="local",e.session="session",e))(n||{}),r=(e=>(e.absolute="absolute",e.fixed="fixed",e))(r||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(a||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{}),d=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(d||{}),c=(e=>(e.listbox="listbox",e.menu="menu",e))(c||{});const f=Symbol.for("volver"),p=Symbol.for("dropdownTrigger"),v=Symbol.for("dropdownItem"),m=Symbol.for("dropdownAction"),b={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},g={disabled:{type:Boolean,default:!1}},y={active:{type:Boolean,default:!1}},h={current:{type:Boolean,default:!1}},k={pressed:{type:Boolean,default:!1}},x={label:{type:[String,Number],default:void 0}},S={modifiers:{type:[String,Array],default:void 0}};u.before;l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const B={...g,...x,...k,...y,...h,...b,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:s.button}};n.local;const w=B;const C=e.defineComponent({name:"VvAction",props:w,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=n,a=e.getCurrentInstance(),u=e.inject(f),i=e.ref(null);o({$el:i});const{reference:d,bus:c,aria:v,expanded:b}=e.inject(p,{});e.watch((()=>i.value),(e=>{d&&(d.value=e)}));const g=e.computed((()=>r.pressed||(null==b?void 0:b.value))),{role:y}=e.inject(m,{}),h=e.computed((()=>{switch(!0){case r.disabled:return s.button;case void 0!==r.to:return(null==u?void 0:u.nuxt)?s.nuxtLink:s.routerLink;case void 0!==r.href:return s.a;default:return r.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!g.value||void 0,ariaLabel:r.ariaLabel,role:null==y?void 0:y.value};switch(h.value){case s.a:return{...e,href:r.href,target:r.target,rel:r.rel};case s.routerLink:case s.nuxtLink:return{...e,to:r.to,target:r.target};case s.button:return{...e,type:r.type,disabled:r.disabled};default:return e}}));function x(e){var t;r.disabled?e.preventDefault():(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onClick)?l("click",e):null==c||c.emit("click",e)}function S(e){var t;(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onMouseover)?l("mouseover",e):null==c||c.emit("mouseover",e)}function B(e){var t;(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onMouseleave)?l("mouseleave",e):null==c||c.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),e.mergeProps(e.unref(k),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:x,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});Boolean,c.menu;const L={focusOnHover:{type:Boolean,default:!1}};const _=e.defineComponent({name:"VvDropdownItem",props:L,setup(t){const n=t,{role:r,expanded:l}=e.inject(v,{}),a=e.ref(null);!function({expanded:t}){e.provide(m,{role:e.ref(d.menuitem),expanded:t})}({expanded:l});const u=o.useElementHover(a),{focused:i}=o.useFocus(a),{focused:s}=o.useFocusWithin(a);return e.watch(u,(e=>{e&&n.focusOnHover&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:a,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({__name:"VvDropdownAction",props:{...B,...S},setup(t){const o=t,{modifiers:n}=e.toRefs(o),r=function(t,o){return e.computed((()=>{const e={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((o=>{o&&(e[`${t}--${o}`]=!0)})),e}))}("vv-dropdown-action",n);return(t,o)=>(e.openBlock(),e.createBlock(_,null,{default:e.withCtx((()=>[e.createVNode(C,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(r)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
@@ -1,4 +1,4 @@
1
- import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode } from "vue";
1
+ import { inject, computed, defineComponent, mergeDefaults, ref, toRefs, unref, openBlock, createBlock, mergeProps, createCommentVNode } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  const VvIconPropsDefaults = {
4
4
  prefix: "normal"
@@ -23,11 +23,6 @@ function useModifiers(prefix, modifiers, others) {
23
23
  });
24
24
  }
25
25
  }
26
- if (others) {
27
- Object.keys(others.value).forEach((key) => {
28
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
29
- });
30
- }
31
26
  return toReturn;
32
27
  });
33
28
  }
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return 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:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?Number.parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i),{modifiers:c}=e.toRefs(r),a=function(o,n,i){return e.computed((()=>{const r={[o]:!0},t="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return t&&Array.isArray(t)&&t.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),i&&Object.keys(i.value).forEach((n=>{r[`${o}--${n}`]=e.unref(i.value[n])})),r}))}("vv-icon",c),s=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",n=`@${s.value}:${r.prefix}:${e}`;if(o.iconExists(n))return n;const i=null==u?void 0:u.iconsCollections.find((n=>{const i=`@${s.value}:${n.prefix}:${e}`;return o.iconExists(i)}));return i?`@${s.value}:${i.prefix}:${e}`:e}));function d(e){const n=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==n?void 0:n.innerHTML.trim())||"";n&&i&&o.addIcon(`@${s.value}:${r.prefix}:${r.name}`,{body:i,height:n.viewBox.baseVal.height,width:n.viewBox.baseVal.width})}return u&&r.src&&!o.iconExists(`@${s.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(d(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&d(r.svg),(n,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(a)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:e.unref(t),color:n.color,onLoad:n.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}})}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return 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:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?Number.parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i),{modifiers:c}=e.toRefs(r),a=function(o,n){return e.computed((()=>{const e={[o]:!0},i="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return i&&Array.isArray(i)&&i.forEach((n=>{n&&(e[`${o}--${n}`]=!0)})),e}))}("vv-icon",c),s=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",n=`@${s.value}:${r.prefix}:${e}`;if(o.iconExists(n))return n;const i=null==u?void 0:u.iconsCollections.find((n=>{const i=`@${s.value}:${n.prefix}:${e}`;return o.iconExists(i)}));return i?`@${s.value}:${i.prefix}:${e}`:e}));function d(e){const n=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==n?void 0:n.innerHTML.trim())||"";n&&i&&o.addIcon(`@${s.value}:${r.prefix}:${r.name}`,{body:i,height:n.viewBox.baseVal.height,width:n.viewBox.baseVal.width})}return u&&r.src&&!o.iconExists(`@${s.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(d(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&d(r.svg),(n,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(a)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:e.unref(t),color:n.color,onLoad:n.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}})}));
@@ -788,9 +788,6 @@ function useUniqueId(id) {
788
788
  return computed(() => String((id == null ? void 0 : id.value) || uid()));
789
789
  }
790
790
  function equals(obj1, obj2, field) {
791
- if (field) {
792
- return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
793
- }
794
791
  return deepEquals(obj1, obj2);
795
792
  }
796
793
  function deepEquals(a, b) {
@@ -841,25 +838,6 @@ function deepEquals(a, b) {
841
838
  }
842
839
  return Number.isNaN(a) && Number.isNaN(b);
843
840
  }
844
- function resolveFieldData(data, field) {
845
- if (data && Object.keys(data).length && field) {
846
- if (!field.includes(".")) {
847
- return data[field];
848
- } else {
849
- const fields = field.split(".");
850
- let value = data;
851
- for (let i = 0, len = fields.length; i < len; ++i) {
852
- if (data == null) {
853
- return null;
854
- }
855
- value = value[fields[i]];
856
- }
857
- return value;
858
- }
859
- } else {
860
- return null;
861
- }
862
- }
863
841
  function contains(value, list) {
864
842
  if (value != null && list && list.length) {
865
843
  for (const val of list) {
@@ -1559,11 +1537,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1559
1537
  URL.revokeObjectURL(previewSrc.value);
1560
1538
  }
1561
1539
  });
1562
- function sizeInKiB(size) {
1563
- if (!size) {
1540
+ function formatBytes(bytes, decimals) {
1541
+ if (!bytes) {
1564
1542
  return;
1565
1543
  }
1566
- return Math.floor(size / 1024);
1544
+ if (bytes === 0)
1545
+ return "0 Bytes";
1546
+ const k = 1024;
1547
+ const dm = 2;
1548
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
1549
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
1550
+ return `${Number.parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
1567
1551
  }
1568
1552
  function onClickDownloadFile(file) {
1569
1553
  emit("download", file);
@@ -1729,7 +1713,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1729
1713
  createElementVNode(
1730
1714
  "small",
1731
1715
  _hoisted_10,
1732
- toDisplayString(sizeInKiB(file.size)) + " KB ",
1716
+ toDisplayString(formatBytes(file.size)),
1733
1717
  1
1734
1718
  /* TEXT */
1735
1719
  ),