@volverjs/ui-vue 0.0.3 → 0.0.4

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 (145) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +52 -13
  3. package/dist/Volver.d.ts +5 -1
  4. package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  8. package/dist/components/VvAction/VvAction.es.js +170 -0
  9. package/dist/components/VvAction/VvAction.umd.js +1 -0
  10. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  11. package/dist/components/VvAction/index.d.ts +24 -0
  12. package/dist/components/VvBadge/VvBadge.es.js +86 -16
  13. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  14. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
  15. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  16. package/dist/components/VvButton/VvButton.es.js +434 -251
  17. package/dist/components/VvButton/VvButton.umd.js +1 -1
  18. package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
  19. package/dist/components/VvButton/index.d.ts +22 -67
  20. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
  21. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  22. package/dist/components/VvCard/VvCard.es.js +38 -25
  23. package/dist/components/VvCard/VvCard.umd.js +1 -1
  24. package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
  25. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  26. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
  27. package/dist/components/VvCheckbox/index.d.ts +1 -1
  28. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
  31. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  32. package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
  33. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  34. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
  35. package/dist/components/VvCombobox/index.d.ts +18 -13
  36. package/dist/components/VvDialog/VvDialog.es.js +139 -64
  37. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
  39. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  40. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
  41. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  42. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  43. package/dist/components/VvDropdown/index.d.ts +6 -9
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
  45. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  46. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
  47. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
  49. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  50. package/dist/components/VvIcon/VvIcon.es.js +48 -32
  51. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  52. package/dist/components/VvInputText/VvInputText.es.js +508 -344
  53. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  54. package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
  55. package/dist/components/VvInputText/index.d.ts +13 -2
  56. package/dist/components/VvProgress/VvProgress.es.js +90 -20
  57. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  58. package/dist/components/VvRadio/VvRadio.es.js +305 -125
  59. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  60. package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
  61. package/dist/components/VvRadio/index.d.ts +1 -1
  62. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
  63. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  64. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
  65. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  66. package/dist/components/VvSelect/VvSelect.es.js +371 -216
  67. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  68. package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
  69. package/dist/components/VvSelect/index.d.ts +5 -5
  70. package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
  71. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  72. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
  73. package/dist/components/VvTextarea/index.d.ts +5 -5
  74. package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
  75. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  76. package/dist/components/index.es.js +1913 -1521
  77. package/dist/components/index.umd.js +1 -1
  78. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  79. package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
  80. package/dist/constants.d.ts +30 -0
  81. package/dist/directives/index.es.js +128 -0
  82. package/dist/directives/index.umd.js +1 -0
  83. package/dist/directives/v-tooltip.es.js +126 -0
  84. package/dist/directives/v-tooltip.umd.js +1 -0
  85. package/dist/icons.es.js +3 -3
  86. package/dist/icons.umd.js +1 -1
  87. package/dist/index.es.js +2102 -1761
  88. package/dist/index.umd.js +1 -1
  89. package/dist/props/index.d.ts +179 -11
  90. package/dist/resolvers/unplugin.d.ts +8 -8
  91. package/dist/resolvers/unplugin.es.js +51 -30
  92. package/dist/resolvers/unplugin.umd.js +1 -1
  93. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  94. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  95. package/package.json +60 -34
  96. package/src/Volver.ts +12 -5
  97. package/src/assets/icons/detailed.json +1 -1
  98. package/src/assets/icons/normal.json +1 -1
  99. package/src/assets/icons/simple.json +1 -1
  100. package/src/components/VvAction/VvAction.vue +144 -0
  101. package/src/components/VvAction/index.ts +5 -0
  102. package/src/components/VvButton/VvButton.vue +31 -114
  103. package/src/components/VvButton/index.ts +6 -79
  104. package/src/components/VvCombobox/VvCombobox.vue +54 -42
  105. package/src/components/VvCombobox/index.ts +11 -9
  106. package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
  107. package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
  108. package/src/components/VvDropdown/index.ts +4 -9
  109. package/src/components/VvSelect/index.ts +2 -4
  110. package/src/composables/dropdown/useInjectDropdown.ts +1 -1
  111. package/src/composables/dropdown/useProvideDropdown.ts +7 -9
  112. package/src/composables/useModifiers.ts +4 -7
  113. package/src/constants.ts +36 -0
  114. package/src/props/index.ts +106 -14
  115. package/src/resolvers/unplugin.ts +81 -48
  116. package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
  117. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
  118. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  119. package/src/stories/Button/Button.stories.mdx +4 -2
  120. package/src/stories/Button/Button.test.ts +3 -1
  121. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  122. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  123. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  124. package/src/stories/Card/Card.stories.mdx +2 -1
  125. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  126. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  127. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  128. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  129. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  130. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  131. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  132. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  133. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  134. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  135. package/src/stories/Icon/Icon.stories.mdx +2 -1
  136. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  137. package/src/stories/InputText/InputText.stories.mdx +2 -1
  138. package/src/stories/Progress/Progress.stories.mdx +2 -1
  139. package/src/stories/Radio/Radio.stories.mdx +2 -1
  140. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  141. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  142. package/src/stories/Select/Select.stories.mdx +2 -1
  143. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  144. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  145. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
@@ -1 +1 @@
1
- (function(e,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("vue"),require("@iconify/vue"),require("@floating-ui/vue")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue"],$):(e=typeof globalThis<"u"?globalThis:e||self,e.VvCombobox=$(e.vue,e.vue$1,e.vue$2))})(this,function(e,$,w){"use strict";var le=(r=>(r.left="left",r.right="right",r.top="top",r.bottom="bottom",r))(le||{}),se=(r=>(r.topStart="top-start",r.topEnd="top-end",r.bottomStart="bottom-start",r.bottomEnd="bottom-end",r.leftStart="left-start",r.leftEnd="left-end",r.rightStart="right-start",r.rightEnd="right-end",r))(se||{}),ne=(r=>(r.before="before",r.after="after",r))(ne||{});const ie={valid:Boolean,validLabel:[String,Array]},ce={invalid:Boolean,invalidLabel:[String,Array]},de={loading:Boolean,loadingLabel:String},ue={disabled:Boolean},fe={readonly:Boolean},te={modifiers:[String,Array]},pe={hintLabel:{type:String,default:""}},me={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},be={icon:{type:[String,Object]},iconPosition:{type:String,default:ne.before,validation:r=>Object.values(ne).includes(r)}},he={tabindex:{type:[String,Number],default:0}},ge={floating:Boolean},ye={unselectable:{type:Boolean,default:!0}},ke={id:[String,Number]},re={placement:{type:String,default:le.bottom,validator:r=>Object.values(le).includes(r)||Object.values(se).includes(r)},transitionName:{type:String},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},autoClose:{type:Boolean,default:!0},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}},Ve={...ke,name:{type:String,required:!0}},ve={autofocus:Boolean},Ce={autocomplete:{type:String,default:"off"}},Ne=["update:modelValue","change:search","focus","blur"],De={...Ve,...he,...ie,...ce,...pe,...de,...ue,...fe,...te,...me,...be,...ge,...ye,...re,modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},label:String,noResultsLabel:{type:String,default:"No results"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Deselect"},pressToSelectLabel:{type:String,default:"Press enter to select"},pressToDeselectLabel:{type:String,default:"Press enter to remove"},placeholder:String,searchable:Boolean,searchPlaceholder:{type:String,default:"Search..."},debounceSearch:{type:[Number,String],default:0},multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},native:Boolean,badges:Boolean,badgeModifiers:{type:[String,Array],default:"action sm"},triggerWidth:{...re.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array]},autoOpen:Boolean,autoClose:Boolean},xe={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}},$e={name:"VvIcon"},Z=e.defineComponent({...$e,props:xe,setup(r){const c=r,t=ref(!0),d=useVolver(),{modifiers:g}=toRefs(c),V=useBemModifiers("vv-icon",g),s=computed(()=>c.provider||(d==null?void 0:d.provider)),S=computed(()=>{const n=c.name??"",a=`@${s.value}:${c.prefix}:${c.name}`;return $.iconExists(n)?n:$.iconExists(a)?a:(d==null?void 0:d.iconsCollections.find(i=>{const y=`@${s.value}:${i.prefix}:${n}`;if($.iconExists(y))return y}))||n});function B(n){let a=null;if(typeof window>"u"){const{JSDOM:E}=require("jsdom");a=new E().window}return(a?new a.DOMParser:new window.DOMParser).parseFromString(n,"text/html").querySelector("svg")}function m(n){const a=B(n),i=(a==null?void 0:a.innerHTML.trim())||"";a&&i&&$.addIcon(`@${s.value}:${c.prefix}:${c.name}`,{body:i,height:a.viewBox.baseVal.height,width:a.viewBox.baseVal.width})}return d&&(c.src&&!$.iconExists(`@${s.value}:${c.prefix}:${c.name}`)?(t.value=!1,d.fetchIcon(c.src).then(n=>{n&&(m(n),t.value=!0)}).catch(n=>{throw new Error(`During fetch icon: ${n==null?void 0:n.message}`)})):c.svg&&m(c.svg)),(n,a)=>e.unref(t)?(e.openBlock(),e.createBlock(e.unref($.Icon),e.mergeProps({key:0,class:e.unref(V)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:n.rotate,color:n.color,onLoad:n.onLoad,icon:e.unref(S)}),null,16,["class"])):e.createCommentVNode("",!0)}}),Se=["listbox","menu"],Ie={...ke,...te,...re,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:Se[1],validator:r=>Se.includes(r)}},Oe=["id","tabindex","role","aria-labelledby"],Fe={name:"VvDropdown",inheritAttrs:!1},Be=e.defineComponent({...Fe,props:Ie,emits:["update:modelValue"],setup(r,{emit:c}){const t=r,{id:d}=toRefs(t),g=useUniqueId(d),V=useAttrs(),s=ref("auto"),S=ref("auto"),B=ref(null),m=ref(null),n=ref(null),a=ref(null),i=computed({get:()=>t.reference??B.value,set:o=>{B.value=o}}),y=computed(()=>{const o=[];if(t.autoPlacement?typeof t.autoPlacement=="boolean"?o.push(w.autoPlacement()):o.push(w.autoPlacement(t.autoPlacement)):t.flip&&(typeof t.flip=="boolean"?o.push(w.flip()):o.push(w.flip(t.flip))),t.shift&&(typeof t.shift=="boolean"?o.push(w.shift()):o.push(w.shift(t.shift))),t.size){const f=({availableWidth:O,availableHeight:J})=>{s.value=`${O}px`,S.value=`${J}px`};typeof t.size=="boolean"?o.push(w.size({apply:f})):o.push(w.size({...t.size,apply:f}))}return t.offset&&(o.push(w.offset(Number(t.offset))),["string","number"].includes(typeof t.offset)?o.push(w.offset(Number(t.offset))):o.push(w.offset(t.offset))),t.arrow&&o.push(w.arrow({element:n})),o}),{x:_,y:E,strategy:R,middlewareData:I,placement:T}=w.useFloating(i,m,{whileElementsMounted:w.autoUpdate,placement:t.placement,middleware:y}),F=computed(()=>({position:R.value,top:`${E.value??0}px`,left:`${_.value??0}px`,maxWidth:s.value,maxHeight:S.value,width:t.triggerWidth&&i.value?`${i.value.offsetWidth}px`:void 0})),C=computed(()=>T.value.split("-")[0]),v=computed(()=>({top:"bottom",right:"left",bottom:"top",left:"right"})[C.value]??"bottom"),x=computed(()=>{var o,f,O,J;return["bottom","top"].includes(v.value)?{right:`${((o=I.value.arrow)==null?void 0:o.x)??0}px`,[v.value]:`${-(((f=n.value)==null?void 0:f.offsetWidth)??0)/2}px`}:{top:`${((O=I.value.arrow)==null?void 0:O.y)??0}px`,[v.value]:`${-(((J=n.value)==null?void 0:J.offsetWidth)??0)/2}px`}}),A=useVModel(t,"modelValue",c),L=ref(!1),p=computed({get:()=>A.value??L.value,set:o=>{if(A.value===void 0){L.value=o;return}A.value=o}}),z=()=>{p.value=!0},N=()=>{p.value=!1},q=()=>{p.value=!p.value},Q=o=>{i.value=o};watch(p,o=>{o&&t.autofocusFirst&&nextTick(()=>{const f=P(m.value);f.length>0&&f[0].focus()})}),onClickOutside(m,()=>{t.autoClose&&(p.value=!1)},{ignore:[i]});const X=computed(()=>{var o;return((o=i.value)==null?void 0:o.getAttribute("id"))??void 0}),M=computed(()=>({"aria-controls":g.value,"aria-haspopup":!0,"aria-expanded":p.value})),{component:H,bus:Y}=useProvideDropdownTrigger({reference:i,id:g,expanded:p,aria:M});Y.on("click",q);const{role:K,modifiers:ee}=toRefs(t),{itemRole:j}=useProvideDropdownItem({role:K,expanded:p}),b=useBemModifiers("vv-dropdown",ee,computed(()=>({arrow:t.arrow}))),{focused:D}=useFocusWithin(m);function P(o){return o?[...o.querySelectorAll('a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])')].filter(f=>!f.hasAttribute("disabled")&&!f.getAttribute("aria-hidden")):[]}const W=()=>{nextTick(()=>{if(D.value){const o=P(m.value);if(o.length===0||!document.activeElement)return;const f=o.indexOf(document.activeElement);f<o.length-1?o[f+1].focus():o[0].focus()}})},U=()=>{nextTick(()=>{if(D.value){const o=P(m.value);if(o.length===0||!document.activeElement)return;const f=o.indexOf(document.activeElement);f>0?o[f-1].focus():o[o.length-1].focus()}})};return onKeyStroke("Escape",o=>{p.value&&(o.preventDefault(),N())}),onKeyStroke("ArrowDown",o=>{p.value&&D.value&&(o.preventDefault(),W())}),onKeyStroke("ArrowUp",o=>{p.value&&D.value&&(o.preventDefault(),U())}),onKeyStroke([" ","Enter"],o=>{p.value&&D.value&&(o.preventDefault(),document.activeElement.click())}),(o,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(H),null,{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:Q,show:z,hide:N,toggle:q,expanded:e.unref(p),aria:e.unref(M)})))]),_:3}),e.createVNode(e.Transition,{name:o.transitionName},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:m,style:e.normalizeStyle(e.unref(F)),class:e.normalizeClass(e.unref(b))},[t.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:n,style:e.normalizeStyle(e.unref(x)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(p)}))),e.createElementVNode("ul",e.mergeProps(e.unref(V),{id:e.unref(g),ref_key:"listEl",ref:a,tabindex:e.unref(p)?void 0:-1,role:e.unref(K),"aria-labelledby":e.unref(X),class:"vv-dropdown__list"}),[e.renderSlot(o.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(j)})))],16,Oe),e.renderSlot(o.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(p)})))],6),[[e.vShow,e.unref(p)]])]),_:3},8,["name"])],64))}}),Ae={name:"VvDropdownItem"},_e=e.defineComponent({...Ae,setup(r){const{role:c,expanded:t}=useInjectedDropdownItem(),d=ref(null);useProvideDropdownAction({expanded:t});const g=useElementHover(d),{focused:V}=useFocus(d),{focused:s}=useFocusWithin(d);return watch(g,S=>{S&&(V.value=!0)}),(S,B)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({role:e.unref(c)},{ref_key:"element",ref:d,class:["vv-dropdown__item",{"focus-visible":e.unref(V)||e.unref(s)}]}),[e.renderSlot(S.$slots,"default")],16))}});function oe(r){return Array.isArray(r)?r.filter(c=>isString(c)).join(" "):r}function we(r,c){const{invalid:t,valid:d,hint:g,loading:V}=c,{hintLabel:s,modelValue:S,valid:B,validLabel:m,invalid:n,invalidLabel:a,...i}=toRefs(r),y=resolveFieldData(i,"loading"),_=resolveFieldData(i,"loadingLabel"),E=computed(()=>n.value?!!(n.value&&t||a!=null&&a.value&&Array.isArray(a.value)&&a.value.length>0||a!=null&&a.value&&!isEmpty(a)):!1),R=computed(()=>!!(s&&s.value||g)),I=computed(()=>!!(m&&m.value||d)),T=computed(()=>!!(y!=null&&y.value&&V||y!=null&&y.value&&(_!=null&&_.value))),F=computed(()=>R.value||I.value||E.value||T.value);return{hasInvalid:E,hasHint:R,hasValid:I,hasLoading:T,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(C){const v=computed(()=>{const x=toReactive({hintLabel:s,modelValue:S,valid:B,validLabel:m,invalid:n,invalidLabel:a,loading:y,loadingLabel:_,...C.params});return n!=null&&n.value?(t==null?void 0:t(x))||oe(a==null?void 0:a.value)||(s==null?void 0:s.value):B!=null&&B.value?(d==null?void 0:d(x))||oe(m==null?void 0:m.value)||(s==null?void 0:s.value):y!=null&&y.value?(V==null?void 0:V(x))||oe(_==null?void 0:_.value)||(s==null?void 0:s.value):(g==null?void 0:g(x))||oe(s==null?void 0:s.value)||(s==null?void 0:s.value)});return{isVisible:F,hasInvalid:E,hasValid:I,hintContent:v}},render(){if(this.isVisible)return h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}const ze={...Ve,...ve,...Ce,...he,...ie,...ce,...pe,...de,...ue,...fe,...te,...me,...be,...ge,...ye,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},label:String,placeholder:String},Re=["update:modelValue","focus","blur"],Te=["for"],Le={class:"vv-select__wrapper"},Me={key:0,class:"vv-select__input-before"},je={class:"vv-select__inner"},We=["id"],qe=["disabled","hidden"],He=["disabled","value"],Ke={key:1,class:"vv-select__input-after"},Ue={name:"VvSelect"},Je=e.defineComponent({...Ue,props:ze,emits:Re,setup(r,{emit:c}){const t=r,d=useSlots(),g=ref(),{HintSlot:V,hasHint:s,hasInvalid:S}=we(t,d),{id:B,modifiers:m,disabled:n,readonly:a,loading:i,icon:y,iconPosition:_,invalid:E,valid:R,floating:I,multiple:T}=toRefs(t),F=useUniqueId(B),C=computed(()=>`${F.value}-hint`),{focused:v}=useComponentFocus(g,c),x=useElementVisibility(g);watch(x,b=>{b&&t.autofocus&&(v.value=!0)});const{hasIcon:A,hasIconBefore:L,hasIconAfter:p}=useComponentIcon(y,_),z=computed(()=>!isEmpty(t.modelValue)),N=computed(()=>t.disabled||t.readonly),q=computed(()=>N.value?-1:t.tabindex),Q=computed(()=>{if(t.invalid===!0)return!0;if(t.valid===!0)return!1}),X=useBemModifiers("vv-select",m,computed(()=>({valid:R.value,invalid:E.value,loading:i.value,disabled:n.value,readonly:a.value,"icon-before":L.value,"icon-after":p.value,dirty:z.value,focus:v.value,floating:I.value,multiple:T.value}))),M=computed(()=>({name:t.name,tabindex:q.value,disabled:N.value,required:t.required,size:t.size,autocomplete:t.autocomplete,multiple:t.multiple,"aria-invalid":Q.value,"aria-describedby":!S.value&&s.value?C.value:void 0,"aria-errormessage":S.value?C.value:void 0})),H=computed(()=>({valid:t.valid,invalid:t.invalid,modelValue:t.modelValue})),{getOptionLabel:Y,getOptionValue:K,getOptionDisabled:ee}=useOptions(t),j=computed({get:()=>t.modelValue,set:b=>{Array.isArray(b)&&(b=b.filter(D=>D!==void 0)),c("update:modelValue",b)}});return(b,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(X))},[b.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(F)},e.toDisplayString(b.label),9,Te)):e.createCommentVNode("",!0),e.createElementVNode("div",Le,[b.$slots.before?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(b.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(H))))])):e.createCommentVNode("",!0),e.createElementVNode("div",je,[e.unref(L)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(A)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(F),ref_key:"select",ref:g,"onUpdate:modelValue":D[0]||(D[0]=P=>e.isRef(j)?j.value=P:null)},e.unref(M)),[b.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!b.unselectable,hidden:!b.unselectable},e.toDisplayString(b.placeholder),9,qe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.options,(P,W)=>(e.openBlock(),e.createElementBlock("option",{key:W,disabled:e.unref(ee)(P),value:e.unref(K)(P)},e.toDisplayString(e.unref(Y)(P)),9,He))),128))],16,We),[[e.vModelSelect,e.unref(j)]]),e.unref(p)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(A)),null,16)):e.createCommentVNode("",!0)]),b.$slots.after?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(b.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(H))))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(V),{id:e.unref(C),class:"vv-select__hint"},null,8,["id"])],2))}}),Ge={...te,value:[String,Number]},Qe={name:"VvBadge"},Xe=e.defineComponent({...Qe,props:Ge,setup(r){const c=r,{modifiers:t}=toRefs(c),d=useBemModifiers("vv-badge",t);return(g,V)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(d)),role:"status"},[e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(g.value),1)])],2))}}),Ye=["id"],Ze=["id","for"],et=["id","aria-controls","aria-labelledby","aria-describedby","placeholder"],tt={key:0,class:"vv-select__input-before"},ot={class:"vv-select__inner"},lt=["aria-labelledby","tabindex"],nt=["aria-label","onClick"],rt={key:1,class:"vv-select__input-after"},at={class:"vv-dropdown-action__hint"},st={name:"VvCombobox",components:{VvDropdown:Be,VvDropdownItem:_e}};return e.defineComponent({...st,props:De,emits:Ne,setup(r,{emit:c}){const t=r,d=useSlots(),{HintSlot:g}=we(t,d),V=ref(null),s=ref(null),S=ref(null),{focused:B}=useComponentFocus(V,c),{focused:m}=useFocusWithin(S);watch(B,l=>{if(t.autoOpen){if(l&&!i.value){_();return}!l&&i.value&&!m.value&&E()}}),watch(m,l=>{!B.value&&!l&&i.value&&E()});const n=ref(""),a=refDebounced(n,Number(t.debounceSearch));watch(a,()=>c("change:search",a.value));const i=ref(!1),y=()=>{t.disabled||t.readonly||(i.value=!i.value)},_=()=>{t.disabled||t.readonly||i.value||(i.value=!0)},E=()=>{t.disabled||t.readonly||!i.value||(i.value=!1)};watch(i,l=>{z.value&&nextTick(()=>{if(l){s.value&&s.value.focus();return}n.value=""})});const{id:R,icon:I,iconPosition:T,modifiers:F,disabled:C,readonly:v,loading:x,valid:A,invalid:L,floating:p,searchable:z}=toRefs(t),N=useUniqueId(R),q=computed(()=>`${N.value}-hint`),Q=computed(()=>`${N.value}-dropdown`),X=computed(()=>`${N.value}-search`),M=computed(()=>`${N.value}-label`),{hasIcon:H,hasIconBefore:Y,hasIconAfter:K}=useComponentIcon(I,T),ee=computed(()=>!isEmpty(t.modelValue)),j=computed(()=>C.value||v.value?-1:t.tabindex),b=useBemModifiers("vv-select",F,computed(()=>({disabled:C.value,loading:x.value,readonly:v.value,"icon-before":Boolean(Y.value),"icon-after":Boolean(K.value),valid:A.value,invalid:L.value,dirty:ee.value,focus:B.value,floating:p.value}))),D=computed(()=>t.searchable?o.value:t.options),{getOptionLabel:P,getOptionValue:W,getOptionDisabled:U}=useOptions(t),o=computed(()=>{var l;return(l=t.options)==null?void 0:l.filter(k=>P(k).toLowerCase().includes(a.value.toLowerCase().trim()))});function f(l){return Array.isArray(t.modelValue)?contains(l,t.modelValue)||contains(W(l),t.modelValue):equals(l,t.modelValue)||equals(W(l),t.modelValue)}const O=computed(()=>{let l=[];return Array.isArray(t.modelValue)?l=t.modelValue:t.modelValue&&(l=[t.modelValue]),t.options.filter(k=>l.includes(W(k)))}),J=computed(()=>O.value.map(l=>P(l)).join(t.separator));watch(O,()=>{!t.multiple&&t.autoClose&&E()});const it=()=>{t.autoOpen?_():y()},ae=l=>{var G;if(t.disabled||t.readonly)return;const k=W(l);let u=k;if(t.multiple)if(Array.isArray(t.modelValue)){if(t.maxValues!==void 0&&t.maxValues>=0&&((G=t.modelValue)==null?void 0:G.length)>=t.maxValues&&!contains(k,t.modelValue))return;u=contains(k,t.modelValue)?removeFromList(k,t.modelValue):[...t.modelValue,k]}else u=[k];else t.unselectable&&k===t.modelValue&&(u=void 0);c("update:modelValue",u)},ct=computed(()=>({id:N.value,name:t.name,tabindex:j.value,valid:A.value,validLabel:t.validLabel,invalid:L.value,invalidLabel:t.invalidLabel,hintLabel:t.hintLabel,loading:x.value,loadingLabel:t.loadingLabel,disabled:C.value,readonly:v.value,modifiers:t.modifiers,options:D.value,labelKey:t.labelKey,valueKey:t.valueKey,icon:t.icon,iconPosition:t.iconPosition,floating:t.floating,unselectable:t.unselectable,multiple:t.multiple,label:t.label,placeholder:t.placeholder,modelValue:t.modelValue})),dt=computed(()=>({id:Q.value,reference:S.value,placement:t.placement,transitionName:t.transitionName,offset:t.offset,shift:t.shift,flip:t.flip,autoPlacement:t.autoPlacement,arrow:t.arrow,autoClose:t.autoClose,autofocusFirst:z.value?!1:t.autofocusFirst,triggerWidth:t.triggerWidth,modifiers:t.dropdownModifiers})),Pe=computed(()=>({valid:t.valid,invalid:t.invalid,modelValue:t.modelValue}));return onKeyStroke([" ","Enter"],l=>{t.autoOpen||!i.value&&B.value&&(l.preventDefault(),l.stopImmediatePropagation(),y())}),(l,k)=>l.native?(e.openBlock(),e.createBlock(Je,e.mergeProps({key:1},e.unref(ct),{"onUpdate:modelValue":k[2]||(k[2]=u=>c("update:modelValue",u))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(N),class:e.normalizeClass(e.unref(b))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(M),for:e.unref(z)?e.unref(X):void 0},e.toDisplayString(l.label),9,Ze)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:S,class:"vv-select__wrapper"},[e.createVNode(Be,e.mergeProps({modelValue:e.unref(i),"onUpdate:modelValue":k[1]||(k[1]=u=>e.isRef(i)?i.value=u:null)},e.unref(dt),{role:"listbox"}),e.createSlots({default:e.withCtx(({aria:u})=>[l.$slots.before?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(Pe))))])):e.createCommentVNode("",!0),e.createElementVNode("div",ot,[e.unref(Y)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(H)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:V},u,{"aria-labelledby":e.unref(M),class:"vv-select__input",role:"combobox",tabindex:e.unref(j),onClickPassive:it}),[e.renderSlot(l.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(O),onInput:ae})),()=>[e.unref(J)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.badges?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(O),(G,Ee)=>(e.openBlock(),e.createBlock(Xe,{key:Ee,modifiers:l.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(P)(G))+" ",1),l.unselectable&&!e.unref(v)&&!e.unref(C)?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":l.deselectLabel,onClick:e.withModifiers(ft=>ae(G),["stop"])},[e.createVNode(Z,{name:"close"})],8,nt)):e.createCommentVNode("",!0)]),_:2},1032,["modifiers"]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(J)),1)],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.placeholder),1)],64))])],16,lt),e.unref(K)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(H)),null,16)):e.createCommentVNode("",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",rt,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(Pe))))])):e.createCommentVNode("",!0)]),items:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(u,G)=>(e.openBlock(),e.createBlock(_e,{key:G,class:e.normalizeClass(["vv-dropdown-action",{disabled:e.unref(U)(u),selected:f(u),"vv-dropdown-action--unselectable":l.unselectable&&f(u)}]),tabindex:e.unref(U)(u)?-1:0,"aria-selected":f(u),"aria-disabled":e.unref(U)(u),onClickPassive:Ee=>ae(u)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:u,selectedOptions:e.unref(O),selected:f(u),disabled:e.unref(U)(u)})),()=>[e.createTextVNode(e.toDisplayString(e.unref(P)(u))+" ",1),e.createElementVNode("span",at,[f(u)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(l.unselectable?l.pressToDeselectLabel:l.selectedLabel),1)],64)):e.unref(U)(u)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.pressToSelectLabel),1)],64))])])]),_:2},1032,["tabindex","class","aria-selected","aria-disabled","onClickPassive"]))),128))]),_:2},[e.unref(z)?{name:"before",fn:e.withCtx(()=>[e.unref(z)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(X),ref_key:"inputSearchEl",ref:s,"onUpdate:modelValue":k[0]||(k[0]=u=>e.isRef(n)?n.value=u:null),"aria-autocomplete":"list","aria-controls":e.unref(Q),"aria-labelledby":e.unref(M),"aria-describedby":e.unref(q),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:l.searchPlaceholder},null,8,et)),[[e.vShow,e.unref(i)],[e.vModelText,e.unref(n)]]):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1040,["modelValue"])],512),e.createVNode(e.unref(g),{id:e.unref(q),class:"vv-select__hint"},null,8,["id"])],10,Ye))}})});
1
+ (function(e,I){typeof exports=="object"&&typeof module<"u"?module.exports=I(require("vue"),require("@iconify/vue"),require("@floating-ui/vue"),require("nanoid"),require("@vueuse/core"),require("mitt")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue","nanoid","@vueuse/core","mitt"],I):(e=typeof globalThis<"u"?globalThis:e||self,e.VvCombobox=I(e.vue,e.vue$1,e.vue$2,e.nanoid,e.core,e.mitt))})(this,function(e,I,E,We,V,Me){"use strict";var M=(o=>(o.left="left",o.right="right",o.top="top",o.bottom="bottom",o))(M||{}),Be=(o=>(o.topStart="top-start",o.topEnd="top-end",o.bottomStart="bottom-start",o.bottomEnd="bottom-end",o.leftStart="left-start",o.leftEnd="left-end",o.rightStart="right-start",o.rightEnd="right-end",o))(Be||{}),ee=(o=>(o.before="before",o.after="after",o))(ee||{}),ue=(o=>(o.button="button",o.submit="submit",o.reset="reset",o))(ue||{}),Ve=(o=>(o.button="button",o.link="link",o.menuitem="menuitem",o))(Ve||{}),te=(o=>(o.listbox="listbox",o.menu="menu",o))(te||{}),pe=(o=>(o.option="option",o.presentation="presentation",o))(pe||{}),we=(o=>(o._blank="_blank",o._self="_self",o._parent="_parent",o._top="_top",o))(we||{});const qe=Symbol.for("volver"),Ue=Symbol.for("dropdownTrigger"),Ee=Symbol.for("dropdownItem"),Je=Symbol.for("dropdownAction"),ve={to:{type:[String,Object]},href:String,target:{type:String,validator:o=>Object.values(we).includes(o)},rel:{type:String,default:"noopener noreferrer"}},_e={valid:Boolean,validLabel:[String,Array]},Pe={invalid:Boolean,invalidLabel:[String,Array]},Ce={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},le={disabled:Boolean},Ye={selected:Boolean},Ge={active:Boolean},Qe={pressed:Boolean},me={label:[String,Number]},Ne={readonly:Boolean},oe={modifiers:[String,Array]},Oe={hintLabel:{type:String,default:""}},$e={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},De={icon:{type:[String,Object]},iconPosition:{type:String,default:ee.before,validation:o=>Object.values(ee).includes(o)}},Ie={tabindex:{type:[String,Number],default:0}},Ae={floating:Boolean},be={unselectable:{type:Boolean,default:!0}},xe={id:[String,Number]},ge={placement:{type:String,default:M.bottom,validator:o=>Object.values(M).includes(o)||Object.values(Be).includes(o)},transitionName:{type:String},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},autoClose:{type:Boolean,default:!0},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}},Le={...xe,name:{type:String,required:!0}},Xe={autofocus:Boolean},Ze={autocomplete:{type:String,default:"off"}};({...le,...me,...Qe,...Ge,...ve,type:ue.button});const et=["update:modelValue","change:search","focus","blur"],tt={...Le,...Ie,..._e,...Pe,...Oe,...Ce,...le,...Ne,...oe,...$e,...De,...Ae,...be,...ge,...me,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"},placeholder:String,searchable:Boolean,searchPlaceholder:{type:String,default:"Search..."},debounceSearch:{type:[Number,String],default:0},multiple:Boolean,maxValues:[Number,String],separator:{type:String,default:", "},native:Boolean,badges:Boolean,badgeModifiers:{type:[String,Array],default:"action sm"},triggerWidth:{...ge.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array]},autoOpen:Boolean,autoClose:Boolean},ot={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};function nt(){return e.inject(qe)}function G(o,n,t){return e.computed(()=>{const a={[o]:!0},r=typeof(n==null?void 0:n.value)=="string"?n.value.split(" "):n==null?void 0:n.value;return r&&Array.isArray(r)&&r.forEach(f=>{a[`${o}--${f}`]=!0}),t&&Object.keys(t.value).forEach(f=>{a[`${o}--${f}`]=e.unref(t.value[f])}),a})}const rt={name:"VvIcon"},ne=e.defineComponent({...rt,props:ot,setup(o){const n=o,t=e.ref(!0),a=nt(),{modifiers:r}=e.toRefs(n),f=G("vv-icon",r),c=e.computed(()=>n.provider||(a==null?void 0:a.provider)),m=e.computed(()=>{const i=n.name??"",d=`@${c.value}:${n.prefix}:${n.name}`;return I.iconExists(i)?i:I.iconExists(d)?d:(a==null?void 0:a.iconsCollections.find(p=>{const k=`@${c.value}:${p.prefix}:${i}`;if(I.iconExists(k))return k}))||i});function u(i){let d=null;if(typeof window>"u"){const{JSDOM:P}=require("jsdom");d=new P().window}return(d?new d.DOMParser:new window.DOMParser).parseFromString(i,"text/html").querySelector("svg")}function b(i){const d=u(i),p=(d==null?void 0:d.innerHTML.trim())||"";d&&p&&I.addIcon(`@${c.value}:${n.prefix}:${n.name}`,{body:p,height:d.viewBox.baseVal.height,width:d.viewBox.baseVal.width})}return a&&(n.src&&!I.iconExists(`@${c.value}:${n.prefix}:${n.name}`)?(t.value=!1,a.fetchIcon(n.src).then(i=>{i&&(b(i),t.value=!0)}).catch(i=>{throw new Error(`During fetch icon: ${i==null?void 0:i.message}`)})):n.svg&&b(n.svg)),(i,d)=>e.unref(t)?(e.openBlock(),e.createBlock(e.unref(I.Icon),e.mergeProps({key:0,class:e.unref(f)},{inline:i.inline,width:i.width,height:i.height,horizontalFlip:i.horizontalFlip,verticalFlip:i.verticalFlip,flip:i.flip,rotate:i.rotate,color:i.color,onLoad:i.onLoad,icon:e.unref(m)}),null,16,["class"])):e.createCommentVNode("",!0)}}),lt={...xe,...oe,...ge,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:te.menu,validator:o=>Object.values(te).includes(o)}},he=o=>e.computed(()=>String((o==null?void 0:o.value)||We.nanoid()));function at({reference:o,id:n,expanded:t,aria:a}){const r=Me(),f=e.defineComponent({name:"VvDropdownTriggerProvider",provide(){return{[Ue]:{reference:o,id:n,expanded:t,aria:a,bus:r}}},setup(){return{}},render(){var c,m;return e.h(e.Fragment,{},(m=(c=this.$slots).default)==null?void 0:m.call(c))}});return{bus:r,component:f}}function st({role:o,expanded:n}){const t=e.computed(()=>o.value===te.listbox?pe.option:pe.presentation);return e.provide(Ee,{role:t,expanded:n}),{itemRole:t}}function it({expanded:o}){e.provide(Je,{role:Ve.menuitem,expanded:o})}const ct=["id","tabindex","role","aria-labelledby"],dt={name:"VvDropdown",inheritAttrs:!1},Fe=e.defineComponent({...dt,props:lt,emits:["update:modelValue"],setup(o,{emit:n}){const t=o,{id:a}=e.toRefs(t),r=he(a),f=e.useAttrs(),c=e.ref("auto"),m=e.ref("auto"),u=e.ref(null),b=e.ref(null),i=e.ref(null),d=e.ref(null),p=e.computed({get:()=>t.reference??u.value,set:l=>{u.value=l}}),k=e.computed(()=>{const l=[];if(t.autoPlacement?typeof t.autoPlacement=="boolean"?l.push(E.autoPlacement()):l.push(E.autoPlacement(t.autoPlacement)):t.flip&&(typeof t.flip=="boolean"?l.push(E.flip()):l.push(E.flip(t.flip))),t.shift&&(typeof t.shift=="boolean"?l.push(E.shift()):l.push(E.shift(t.shift))),t.size){const y=({availableWidth:x,availableHeight:v})=>{c.value=`${x}px`,m.value=`${v}px`};typeof t.size=="boolean"?l.push(E.size({apply:y})):l.push(E.size({...t.size,apply:y}))}return t.offset&&(l.push(E.offset(Number(t.offset))),["string","number"].includes(typeof t.offset)?l.push(E.offset(Number(t.offset))):l.push(E.offset(t.offset))),t.arrow&&l.push(E.arrow({element:i})),l}),{x:w,y:P,strategy:j,middlewareData:A,placement:T}=E.useFloating(p,b,{whileElementsMounted:E.autoUpdate,placement:t.placement,middleware:k}),L=e.computed(()=>({position:j.value,top:`${P.value??0}px`,left:`${w.value??0}px`,maxWidth:c.value,maxHeight:m.value,width:t.triggerWidth&&p.value?`${p.value.offsetWidth}px`:void 0})),N=e.computed(()=>T.value.split("-")[0]),C=e.computed(()=>({top:"bottom",right:"left",bottom:"top",left:"right"})[N.value]??"bottom"),D=e.computed(()=>{var l,y,x,v;return["bottom","top"].includes(C.value)?{right:`${((l=A.value.arrow)==null?void 0:l.x)??0}px`,[C.value]:`${-(((y=i.value)==null?void 0:y.offsetWidth)??0)/2}px`}:{top:`${((x=A.value.arrow)==null?void 0:x.y)??0}px`,[C.value]:`${-(((v=i.value)==null?void 0:v.offsetWidth)??0)/2}px`}}),F=V.useVModel(t,"modelValue",n),z=e.ref(!1),g=e.computed({get:()=>F.value??z.value,set:l=>{if(F.value===void 0){z.value=l;return}F.value=l}}),R=()=>{g.value=!0},O=()=>{g.value=!1},q=()=>{g.value=!g.value},Q=l=>{p.value=l};e.watch(g,l=>{l&&t.autofocusFirst&&e.nextTick(()=>{const y=_(b.value);y.length>0&&y[0].focus()})}),V.onClickOutside(b,()=>{t.autoClose&&(g.value=!1)},{ignore:[p]});const X=e.computed(()=>{var l;return((l=p.value)==null?void 0:l.getAttribute("id"))??void 0}),H=e.computed(()=>({"aria-controls":r.value,"aria-haspopup":!0,"aria-expanded":g.value})),{component:U,bus:Z}=at({reference:p,id:r,expanded:g,aria:H});Z.on("click",q);const{role:J,modifiers:re}=e.toRefs(t),{itemRole:K}=st({role:J,expanded:g}),h=G("vv-dropdown",re,e.computed(()=>({arrow:t.arrow}))),{focused:$}=V.useFocusWithin(b);function _(l){return l?[...l.querySelectorAll('a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])')].filter(y=>!y.hasAttribute("disabled")&&!y.getAttribute("aria-hidden")):[]}const W=()=>{e.nextTick(()=>{if($.value){const l=_(b.value);if(l.length===0||!document.activeElement)return;const y=l.indexOf(document.activeElement);y<l.length-1?l[y+1].focus():l[0].focus()}})},fe=()=>{e.nextTick(()=>{if($.value){const l=_(b.value);if(l.length===0||!document.activeElement)return;const y=l.indexOf(document.activeElement);y>0?l[y-1].focus():l[l.length-1].focus()}})};return V.onKeyStroke("Escape",l=>{g.value&&(l.preventDefault(),O())}),V.onKeyStroke("ArrowDown",l=>{g.value&&$.value&&(l.preventDefault(),W())}),V.onKeyStroke("ArrowUp",l=>{g.value&&$.value&&(l.preventDefault(),fe())}),V.onKeyStroke([" ","Enter"],l=>{g.value&&$.value&&(l.preventDefault(),document.activeElement.click())}),(l,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(U),null,{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:Q,show:R,hide:O,toggle:q,expanded:e.unref(g),aria:e.unref(H)})))]),_:3}),e.createVNode(e.Transition,{name:l.transitionName},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:b,style:e.normalizeStyle(e.unref(L)),class:e.normalizeClass(e.unref(h))},[t.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:i,style:e.normalizeStyle(e.unref(D)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(g)}))),e.createElementVNode("ul",e.mergeProps(e.unref(f),{id:e.unref(r),ref_key:"listEl",ref:d,tabindex:e.unref(g)?void 0:-1,role:e.unref(J),"aria-labelledby":e.unref(X),class:"vv-dropdown__list"}),[e.renderSlot(l.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(K)})))],16,ct),e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(g)})))],6),[[e.vShow,e.unref(g)]])]),_:3},8,["name"])],64))}});function ft(){return e.inject(Ee,{})}const ut={name:"VvDropdownItem"},pt=e.defineComponent({...ut,setup(o){const{role:n,expanded:t}=ft(),a=e.ref(null);it({expanded:t});const r=V.useElementHover(a),{focused:f}=V.useFocus(a),{focused:c}=V.useFocusWithin(a);return e.watch(r,m=>{m&&(f.value=!0)}),(m,u)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({role:e.unref(n)},{ref_key:"element",ref:a,class:["vv-dropdown__item",{"focus-visible":e.unref(f)||e.unref(c)}]}),[e.renderSlot(m.$slots,"default")],16))}}),mt={class:"vv-dropdown-option__hint"},bt={name:"VvDropdownOption"},ae=e.defineComponent({...bt,props:{...le,...Ye,...be,...oe,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(o){const n=o,{modifiers:t}=e.toRefs(n),a=G("vv-dropdown-option",t,e.computed(()=>({disabled:n.disabled,selected:n.selected,unselectable:n.unselectable&&n.selected})));return(r,f)=>(e.openBlock(),e.createBlock(pt,{class:e.normalizeClass(e.unref(a)),tabindex:r.disabled?-1:0,"aria-selected":r.selected,"aria-disabled":r.disabled},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default"),e.createElementVNode("span",mt,[e.renderSlot(r.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:r.disabled,selected:r.selected,unselectable:r.unselectable})),()=>[r.selected?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.unselectable?o.deselectHintLabel:o.selectedHintLabel),1)],64)):r.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.selectHintLabel),1)],64))])])]),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}});function se(o,n,t){return t?ie(o,t)===ie(n,t):ye(o,n)}function ye(o,n){if(o===n)return!0;if(o&&n&&typeof o=="object"&&typeof n=="object"){const t=Array.isArray(o),a=Array.isArray(n);let r,f,c;if(t&&a){if(f=o.length,f!=n.length)return!1;for(r=f;r--!==0;)if(!ye(o[r],n[r]))return!1;return!0}if(t!=a)return!1;const m=o instanceof Date,u=n instanceof Date;if(m!=u)return!1;if(m&&u)return o.getTime()==n.getTime();const b=o instanceof RegExp,i=n instanceof RegExp;if(b!=i)return!1;if(b&&i)return o.toString()==n.toString();const d=Object.keys(o);if(f=d.length,f!==Object.keys(n).length)return!1;for(r=f;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,d[r]))return!1;for(r=f;r--!==0;)if(c=d[r],!ye(o[c],n[c]))return!1;return!0}return o!==o&&n!==n}function ie(o,n){if(o&&Object.keys(o).length&&n){if(n.indexOf(".")===-1)return o[n];{const t=n.split(".");let a=o;for(let r=0,f=t.length;r<f;++r){if(o==null)return null;a=a[t[r]]}return a}}else return null}function gt(o,n){let t=-1;if(n){for(let a=0;a<n.length;a++)if(se(n[a],o)){t=a;break}}return t}function ce(o,n){if(o!=null&&n&&n.length){for(const t of n)if(se(o,t))return!0}return!1}function ke(o){return(n=>n==null||n===""||Array.isArray(n)&&n.length===0||!(n instanceof Date)&&typeof n=="object"&&Object.keys(n).length===0)(e.unref(o))}function ht(o,n){const t=gt(o,n);return t>-1?n.filter((a,r)=>r!==t):n}function yt(o){return typeof o=="string"||o instanceof String}function de(o){return Array.isArray(o)?o.filter(n=>yt(n)).join(" "):o}function Re(o,n){const{invalid:t,valid:a,hint:r,loading:f}=n,{hintLabel:c,modelValue:m,valid:u,validLabel:b,invalid:i,invalidLabel:d,...p}=e.toRefs(o),k=ie(p,"loading"),w=ie(p,"loadingLabel"),P=e.computed(()=>i.value?!!(i.value&&t||d!=null&&d.value&&Array.isArray(d.value)&&d.value.length>0||d!=null&&d.value&&!ke(d)):!1),j=e.computed(()=>!!(c&&c.value||r)),A=e.computed(()=>!!(b&&b.value||a)),T=e.computed(()=>!!(k!=null&&k.value&&f||k!=null&&k.value&&(w!=null&&w.value))),L=e.computed(()=>j.value||A.value||P.value||T.value);return{hasInvalid:P,hasHint:j,hasValid:A,hasLoading:T,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(N){const C=e.computed(()=>{const D=V.toReactive({hintLabel:c,modelValue:m,valid:u,validLabel:b,invalid:i,invalidLabel:d,loading:k,loadingLabel:w,...N.params});return i!=null&&i.value?(t==null?void 0:t(D))||de(d==null?void 0:d.value)||(c==null?void 0:c.value):u!=null&&u.value?(a==null?void 0:a(D))||de(b==null?void 0:b.value)||(c==null?void 0:c.value):k!=null&&k.value?(f==null?void 0:f(D))||de(w==null?void 0:w.value)||(c==null?void 0:c.value):(r==null?void 0:r(D))||de(c==null?void 0:c.value)||(c==null?void 0:c.value)});return{isVisible:L,hasInvalid:P,hasValid:A,hintContent:C}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}const kt={...Le,...Xe,...Ze,...Ie,..._e,...Pe,...Oe,...Ce,...le,...Ne,...oe,...$e,...De,...Ae,...be,...me,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String},St=["update:modelValue","focus","blur"];function je(o,n){const{focused:t}=V.useFocus(o);return e.watch(t,a=>{n(a?"focus":"blur",e.unref(o))}),{focused:t}}function Te(o,n){const t=e.computed(()=>Boolean((o==null?void 0:o.value)&&n.value===ee.before)),a=e.computed(()=>Boolean((o==null?void 0:o.value)&&n.value===ee.after)),r=e.computed(()=>Boolean((o==null?void 0:o.value)&&n.value===M.left)),f=e.computed(()=>Boolean((o==null?void 0:o.value)&&n.value===M.right)),c=e.computed(()=>Boolean((o==null?void 0:o.value)&&n.value===M.top)),m=e.computed(()=>Boolean((o==null?void 0:o.value)&&n.value===M.bottom));return{hasIcon:e.computed(()=>typeof(o==null?void 0:o.value)=="string"?{name:o==null?void 0:o.value}:o==null?void 0:o.value),hasIconLeft:r,hasIconRight:f,hasIconTop:c,hasIconBottom:m,hasIconBefore:t,hasIconAfter:a}}function ze(o){const{options:n,labelKey:t,valueKey:a,disabledKey:r}=e.toRefs(o);return{options:n,getOptionLabel:u=>typeof u!="object"&&u!==null?u:typeof t.value=="function"?t.value(u):u[t.value],getOptionValue:u=>typeof u!="object"&&u!==null?u:typeof a.value=="function"?a.value(u):u[a.value],getOptionDisabled:u=>typeof u!="object"&&u!==null?!1:typeof r.value=="function"?r.value(u):u[r.value]}}const Bt=["for"],Vt={class:"vv-select__wrapper"},wt={key:0,class:"vv-select__input-before"},Et={class:"vv-select__inner"},_t=["id"],Pt=["disabled","hidden"],Ct=["disabled","value"],Nt={key:1,class:"vv-select__input-after"},Ot={name:"VvSelect"},$t=e.defineComponent({...Ot,props:kt,emits:St,setup(o,{emit:n}){const t=o,a=e.useSlots(),r=e.ref(),{HintSlot:f,hasHint:c,hasInvalid:m}=Re(t,a),{id:u,modifiers:b,disabled:i,readonly:d,loading:p,icon:k,iconPosition:w,invalid:P,valid:j,floating:A,multiple:T}=e.toRefs(t),L=he(u),N=e.computed(()=>`${L.value}-hint`),{focused:C}=je(r,n),D=V.useElementVisibility(r);e.watch(D,h=>{h&&t.autofocus&&(C.value=!0)});const{hasIcon:F,hasIconBefore:z,hasIconAfter:g}=Te(k,w),R=e.computed(()=>!ke(t.modelValue)),O=e.computed(()=>t.disabled||t.readonly),q=e.computed(()=>O.value?-1:t.tabindex),Q=e.computed(()=>{if(t.invalid===!0)return!0;if(t.valid===!0)return!1}),X=G("vv-select",b,e.computed(()=>({valid:j.value,invalid:P.value,loading:p.value,disabled:i.value,readonly:d.value,"icon-before":z.value,"icon-after":g.value,dirty:R.value,focus:C.value,floating:A.value,multiple:T.value}))),H=e.computed(()=>({name:t.name,tabindex:q.value,disabled:O.value,required:t.required,size:t.size,autocomplete:t.autocomplete,multiple:t.multiple,"aria-invalid":Q.value,"aria-describedby":!m.value&&c.value?N.value:void 0,"aria-errormessage":m.value?N.value:void 0})),U=e.computed(()=>({valid:t.valid,invalid:t.invalid,modelValue:t.modelValue})),{getOptionLabel:Z,getOptionValue:J,getOptionDisabled:re}=ze(t),K=e.computed({get:()=>t.modelValue,set:h=>{Array.isArray(h)&&(h=h.filter($=>$!==void 0)),n("update:modelValue",h)}});return(h,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(X))},[h.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(L)},e.toDisplayString(h.label),9,Bt)):e.createCommentVNode("",!0),e.createElementVNode("div",Vt,[h.$slots.before?(e.openBlock(),e.createElementBlock("div",wt,[e.renderSlot(h.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(U))))])):e.createCommentVNode("",!0),e.createElementVNode("div",Et,[e.unref(z)?(e.openBlock(),e.createBlock(ne,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(F)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(L),ref_key:"select",ref:r,"onUpdate:modelValue":$[0]||($[0]=_=>e.isRef(K)?K.value=_:null)},e.unref(H)),[h.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!h.unselectable,hidden:!h.unselectable},e.toDisplayString(h.placeholder),9,Pt)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.options,(_,W)=>(e.openBlock(),e.createElementBlock("option",{key:W,disabled:e.unref(re)(_),value:e.unref(J)(_)},e.toDisplayString(e.unref(Z)(_)),9,Ct))),128))],16,_t),[[e.vModelSelect,e.unref(K)]]),e.unref(g)?(e.openBlock(),e.createBlock(ne,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(F)),null,16)):e.createCommentVNode("",!0)]),h.$slots.after?(e.openBlock(),e.createElementBlock("div",Nt,[e.renderSlot(h.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(U))))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(f),{id:e.unref(N),class:"vv-select__hint"},null,8,["id"])],2))}}),Dt={...oe,value:[String,Number]},It={name:"VvBadge"},At=e.defineComponent({...It,props:Dt,setup(o){const n=o,{modifiers:t}=e.toRefs(n),a=G("vv-badge",t);return(r,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:"status"},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(r.value),1)])],2))}}),xt=["id"],Lt=["id","for"],Ft=["id","aria-controls","aria-labelledby","aria-describedby","placeholder"],Rt={key:0,class:"vv-select__input-before"},jt={class:"vv-select__inner"},Tt=["aria-labelledby","tabindex"],zt=["aria-label","onClick"],Ht={key:1,class:"vv-select__input-after"},Kt={name:"VvCombobox",components:{VvDropdown:Fe,VvDropdownOption:ae}};return e.defineComponent({...Kt,props:tt,emits:et,setup(o,{emit:n}){const t=o,a=e.useSlots(),{HintSlot:r}=Re(t,a),f=e.ref(null),c=e.ref(null),m=e.ref(null),{focused:u}=je(f,n),{focused:b}=V.useFocusWithin(m);e.watch(u,s=>{if(t.autoOpen){if(s&&!p.value){w();return}!s&&p.value&&!b.value&&P()}}),e.watch(b,s=>{!u.value&&!s&&p.value&&P()});const i=e.ref(""),d=V.refDebounced(i,Number(t.debounceSearch));e.watch(d,()=>n("change:search",d.value));const p=e.ref(!1),k=()=>{t.disabled||t.readonly||(p.value=!p.value)},w=()=>{t.disabled||t.readonly||p.value||(p.value=!0)},P=()=>{t.disabled||t.readonly||!p.value||(p.value=!1)};e.watch(p,s=>{R.value&&e.nextTick(()=>{if(s){c.value&&c.value.focus();return}i.value=""})});const{id:j,icon:A,iconPosition:T,modifiers:L,disabled:N,readonly:C,loading:D,valid:F,invalid:z,floating:g,searchable:R}=e.toRefs(t),O=he(j),q=e.computed(()=>`${O.value}-hint`),Q=e.computed(()=>`${O.value}-dropdown`),X=e.computed(()=>`${O.value}-search`),H=e.computed(()=>`${O.value}-label`),{hasIcon:U,hasIconBefore:Z,hasIconAfter:J}=Te(A,T),re=e.computed(()=>!ke(t.modelValue)),K=e.computed(()=>N.value||C.value?-1:t.tabindex),h=G("vv-select",L,e.computed(()=>({disabled:N.value,loading:D.value,readonly:C.value,"icon-before":Boolean(Z.value),"icon-after":Boolean(J.value),valid:F.value,invalid:z.value,dirty:re.value,focus:u.value,floating:g.value}))),$=e.computed(()=>t.searchable?l.value:t.options),{getOptionLabel:_,getOptionValue:W,getOptionDisabled:fe}=ze(t),l=e.computed(()=>{var s;return(s=t.options)==null?void 0:s.filter(B=>_(B).toLowerCase().includes(d.value.toLowerCase().trim()))});function y(s){return Array.isArray(t.modelValue)?ce(s,t.modelValue)||ce(W(s),t.modelValue):se(s,t.modelValue)||se(W(s),t.modelValue)}const x=e.computed(()=>{let s=[];return Array.isArray(t.modelValue)?s=t.modelValue:t.modelValue&&(s=[t.modelValue]),t.options.filter(B=>s.includes(W(B)))}),v=e.computed(()=>x.value.map(s=>_(s)).join(t.separator));e.watch(x,()=>{!t.multiple&&t.autoClose&&P()});const Wt=()=>{t.autoOpen?w():k()},Se=s=>{var Y;if(t.disabled||t.readonly)return;const B=W(s);let S=B;if(t.multiple)if(Array.isArray(t.modelValue)){if(t.maxValues!==void 0&&t.maxValues>=0&&((Y=t.modelValue)==null?void 0:Y.length)>=t.maxValues&&!ce(B,t.modelValue))return;S=ce(B,t.modelValue)?ht(B,t.modelValue):[...t.modelValue,B]}else S=[B];else t.unselectable&&B===t.modelValue&&(S=void 0);n("update:modelValue",S)},Mt=e.computed(()=>({id:O.value,name:t.name,tabindex:K.value,valid:F.value,validLabel:t.validLabel,invalid:z.value,invalidLabel:t.invalidLabel,hintLabel:t.hintLabel,loading:D.value,loadingLabel:t.loadingLabel,disabled:N.value,readonly:C.value,modifiers:t.modifiers,options:$.value,labelKey:t.labelKey,valueKey:t.valueKey,icon:t.icon,iconPosition:t.iconPosition,floating:t.floating,unselectable:t.unselectable,multiple:t.multiple,label:t.label,placeholder:t.placeholder,modelValue:t.modelValue})),qt=e.computed(()=>({id:Q.value,reference:m.value,placement:t.placement,transitionName:t.transitionName,offset:t.offset,shift:t.shift,flip:t.flip,autoPlacement:t.autoPlacement,arrow:t.arrow,autoClose:t.autoClose,autofocusFirst:R.value?!1:t.autofocusFirst,triggerWidth:t.triggerWidth,modifiers:t.dropdownModifiers})),He=e.computed(()=>({valid:t.valid,invalid:t.invalid,modelValue:t.modelValue}));return V.onKeyStroke([" ","Enter"],s=>{t.autoOpen||!p.value&&u.value&&(s.preventDefault(),s.stopImmediatePropagation(),k())}),(s,B)=>s.native?(e.openBlock(),e.createBlock($t,e.mergeProps({key:1},e.unref(Mt),{"onUpdate:modelValue":B[2]||(B[2]=S=>n("update:modelValue",S))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(O),class:e.normalizeClass(e.unref(h))},[s.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(H),for:e.unref(R)?e.unref(X):void 0},e.toDisplayString(s.label),9,Lt)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:m,class:"vv-select__wrapper"},[e.createVNode(Fe,e.mergeProps({modelValue:e.unref(p),"onUpdate:modelValue":B[1]||(B[1]=S=>e.isRef(p)?p.value=S:null)},e.unref(qt),{role:e.unref(te).listbox}),e.createSlots({default:e.withCtx(({aria:S})=>[s.$slots.before?(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(s.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(He))))])):e.createCommentVNode("",!0),e.createElementVNode("div",jt,[e.unref(Z)?(e.openBlock(),e.createBlock(ne,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(U)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:f},S,{"aria-labelledby":e.unref(H),class:"vv-select__input",role:"combobox",tabindex:e.unref(K),onClickPassive:Wt}),[e.renderSlot(s.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(x),onInput:Se})),()=>[e.unref(v)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.badges?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(x),(Y,Ke)=>(e.openBlock(),e.createBlock(At,{key:Ke,modifiers:s.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(_)(Y))+" ",1),s.unselectable&&!e.unref(C)&&!e.unref(N)?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":s.deselectActionLabel,onClick:e.withModifiers(Jt=>Se(Y),["stop"])},[e.createVNode(ne,{name:"close"})],8,zt)):e.createCommentVNode("",!0)]),_:2},1032,["modifiers"]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(v)),1)],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.placeholder),1)],64))])],16,Tt),e.unref(J)?(e.openBlock(),e.createBlock(ne,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(U)),null,16)):e.createCommentVNode("",!0)]),s.$slots.after?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(s.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(He))))])):e.createCommentVNode("",!0)]),items:e.withCtx(()=>[e.unref(l).length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(l),(S,Y)=>(e.openBlock(),e.createBlock(ae,e.mergeProps({disabled:e.unref(fe)(S),selected:y(S),unselectable:s.unselectable,deselectHintLabel:s.deselectHintLabel,selectHintLabel:s.selectHintLabel,selectedHintLabel:s.selectedHintLabel},{key:Y,class:"vv-dropdown-option",onClickPassive:Ke=>Se(S)}),{default:e.withCtx(()=>[e.renderSlot(s.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:S,selectedOptions:e.unref(x),selected:y(S),disabled:e.unref(fe)(S)})),()=>[e.createTextVNode(e.toDisplayString(e.unref(_)(S)),1)])]),_:2},1040,["onClickPassive"]))),128)):s.options.length?(e.openBlock(),e.createBlock(ae,{key:2,modifiers:"inert"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"no-results",{},()=>[e.createTextVNode(e.toDisplayString(s.noResultsLabel),1)])]),_:3})):(e.openBlock(),e.createBlock(ae,{key:1,modifiers:"inert"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"no-options",{},()=>[e.createTextVNode(e.toDisplayString(s.noOptionsLabel),1)])]),_:3}))]),_:2},[e.unref(R)||s.$slots["dropdown::before"]?{name:"before",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"dropdown::before"),e.unref(R)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(X),ref_key:"inputSearchEl",ref:c,"onUpdate:modelValue":B[0]||(B[0]=S=>e.isRef(i)?i.value=S:null),"aria-autocomplete":"list","aria-controls":e.unref(Q),"aria-labelledby":e.unref(H),"aria-describedby":e.unref(q),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:s.searchPlaceholder},null,8,Ft)),[[e.vShow,e.unref(p)],[e.vModelText,e.unref(i)]]):e.createCommentVNode("",!0)]),key:"0"}:void 0,s.$slots["dropdown::after"]?{name:"after",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"dropdown::after")]),key:"1"}:void 0]),1040,["modelValue","role"])],512),e.createVNode(e.unref(r),{id:e.unref(q),class:"vv-select__hint"},null,8,["id"])],10,xt))}})});
@@ -4,24 +4,27 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
4
  type: (StringConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | NumberConstructor)[];
5
5
  default: undefined;
6
6
  };
7
- label: StringConstructor;
8
7
  noResultsLabel: {
9
8
  type: StringConstructor;
10
9
  default: string;
11
10
  };
12
- selectedLabel: {
11
+ noOptionsLabel: {
13
12
  type: StringConstructor;
14
13
  default: string;
15
14
  };
16
- deselectLabel: {
15
+ selectedHintLabel: {
17
16
  type: StringConstructor;
18
17
  default: string;
19
18
  };
20
- pressToSelectLabel: {
19
+ deselectActionLabel: {
21
20
  type: StringConstructor;
22
21
  default: string;
23
22
  };
24
- pressToDeselectLabel: {
23
+ selectHintLabel: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ deselectHintLabel: {
25
28
  type: StringConstructor;
26
29
  default: string;
27
30
  };
@@ -56,9 +59,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
56
59
  };
57
60
  autoOpen: BooleanConstructor;
58
61
  autoClose: BooleanConstructor;
62
+ label: (StringConstructor | NumberConstructor)[];
59
63
  placement: {
60
- type: import("vue").PropType<import("../../constants.js").Side | import("../../constants.js").Placement>;
61
- default: import("../../constants.js").Side;
64
+ type: import("vue").PropType<import("@/constants").Side | import("@/constants").Placement>;
65
+ default: import("@/constants").Side;
62
66
  validator: (value: never) => boolean;
63
67
  };
64
68
  transitionName: {
@@ -92,7 +96,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
92
96
  boundary: import("@floating-ui/dom").Boundary;
93
97
  }> | undefined>;
94
98
  default: () => {
95
- padding: number;
99
+ padding: number; /**
100
+ * Function triggered on click on input
101
+ */
96
102
  };
97
103
  };
98
104
  autoPlacement: {
@@ -118,9 +124,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
118
124
  type: (StringConstructor | ObjectConstructor)[];
119
125
  };
120
126
  iconPosition: {
121
- type: import("vue").PropType<import("../../constants.js").Position>;
122
- default: import("../../constants.js").Position;
123
- validation: (value: import("../../constants.js").Position) => boolean;
127
+ type: import("vue").PropType<import("@/constants").Position>;
128
+ default: import("@/constants").Position;
129
+ validation: (value: import("@/constants").Position) => boolean;
124
130
  };
125
131
  options: {
126
132
  type: import("vue").PropType<(string | Option)[]>;
@@ -142,7 +148,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
142
148
  readonly: BooleanConstructor;
143
149
  disabled: BooleanConstructor;
144
150
  loading: BooleanConstructor;
145
- loadingLabel: StringConstructor;
151
+ loadingLabel: {
152
+ type: StringConstructor;
153
+ default: string;
154
+ };
146
155
  hintLabel: {
147
156
  type: StringConstructor;
148
157
  default: string;
@@ -165,24 +174,27 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
165
174
  type: (StringConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | NumberConstructor)[];
166
175
  default: undefined;
167
176
  };
168
- label: StringConstructor;
169
177
  noResultsLabel: {
170
178
  type: StringConstructor;
171
179
  default: string;
172
180
  };
173
- selectedLabel: {
181
+ noOptionsLabel: {
174
182
  type: StringConstructor;
175
183
  default: string;
176
184
  };
177
- deselectLabel: {
185
+ selectedHintLabel: {
178
186
  type: StringConstructor;
179
187
  default: string;
180
188
  };
181
- pressToSelectLabel: {
189
+ deselectActionLabel: {
182
190
  type: StringConstructor;
183
191
  default: string;
184
192
  };
185
- pressToDeselectLabel: {
193
+ selectHintLabel: {
194
+ type: StringConstructor;
195
+ default: string;
196
+ };
197
+ deselectHintLabel: {
186
198
  type: StringConstructor;
187
199
  default: string;
188
200
  };
@@ -217,9 +229,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
217
229
  };
218
230
  autoOpen: BooleanConstructor;
219
231
  autoClose: BooleanConstructor;
232
+ label: (StringConstructor | NumberConstructor)[];
220
233
  placement: {
221
- type: import("vue").PropType<import("../../constants.js").Side | import("../../constants.js").Placement>;
222
- default: import("../../constants.js").Side;
234
+ type: import("vue").PropType<import("@/constants").Side | import("@/constants").Placement>;
235
+ default: import("@/constants").Side;
223
236
  validator: (value: never) => boolean;
224
237
  };
225
238
  transitionName: {
@@ -253,7 +266,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
253
266
  boundary: import("@floating-ui/dom").Boundary;
254
267
  }> | undefined>;
255
268
  default: () => {
256
- padding: number;
269
+ padding: number; /**
270
+ * Function triggered on click on input
271
+ */
257
272
  };
258
273
  };
259
274
  autoPlacement: {
@@ -279,9 +294,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
279
294
  type: (StringConstructor | ObjectConstructor)[];
280
295
  };
281
296
  iconPosition: {
282
- type: import("vue").PropType<import("../../constants.js").Position>;
283
- default: import("../../constants.js").Position;
284
- validation: (value: import("../../constants.js").Position) => boolean;
297
+ type: import("vue").PropType<import("@/constants").Position>;
298
+ default: import("@/constants").Position;
299
+ validation: (value: import("@/constants").Position) => boolean;
285
300
  };
286
301
  options: {
287
302
  type: import("vue").PropType<(string | Option)[]>;
@@ -303,7 +318,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
303
318
  readonly: BooleanConstructor;
304
319
  disabled: BooleanConstructor;
305
320
  loading: BooleanConstructor;
306
- loadingLabel: StringConstructor;
321
+ loadingLabel: {
322
+ type: StringConstructor;
323
+ default: string;
324
+ };
307
325
  hintLabel: {
308
326
  type: StringConstructor;
309
327
  default: string;
@@ -333,8 +351,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
333
351
  flip: boolean | Partial<import("@floating-ui/core").FlipOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
334
352
  boundary: import("@floating-ui/dom").Boundary;
335
353
  }> | undefined;
336
- iconPosition: import("../../constants.js").Position;
354
+ iconPosition: import("@/constants").Position;
337
355
  loading: boolean;
356
+ loadingLabel: string;
338
357
  unselectable: boolean;
339
358
  multiple: boolean;
340
359
  readonly: boolean;
@@ -345,7 +364,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
345
364
  labelKey: string | Function;
346
365
  valueKey: string | Function;
347
366
  disabledKey: string | Function;
348
- placement: import("../../constants.js").Side | import("../../constants.js").Placement;
367
+ placement: import("@/constants").Side | import("@/constants").Placement;
349
368
  offset: string | import("@floating-ui/core").OffsetOptions | undefined;
350
369
  size: boolean | Partial<Omit<import("@floating-ui/core").SizeOptions, "apply"> & {
351
370
  apply(args: Omit<import("@floating-ui/core").MiddlewareArguments, "elements"> & {
@@ -365,11 +384,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
365
384
  autofocusFirst: boolean;
366
385
  triggerWidth: boolean;
367
386
  floating: boolean;
387
+ deselectHintLabel: string;
388
+ selectHintLabel: string;
389
+ selectedHintLabel: string;
368
390
  noResultsLabel: string;
369
- selectedLabel: string;
370
- deselectLabel: string;
371
- pressToSelectLabel: string;
372
- pressToDeselectLabel: string;
391
+ noOptionsLabel: string;
392
+ deselectActionLabel: string;
373
393
  searchable: boolean;
374
394
  searchPlaceholder: string;
375
395
  debounceSearch: string | number;
@@ -379,6 +399,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
379
399
  badgeModifiers: string | string[];
380
400
  autoOpen: boolean;
381
401
  }>, {
402
+ 'dropdown::before': (_: {}) => any;
382
403
  before: (_: {
383
404
  valid: boolean;
384
405
  invalid: boolean;
@@ -399,6 +420,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
399
420
  selected: boolean;
400
421
  disabled: any;
401
422
  }) => any;
423
+ 'no-options': (_: {}) => any;
424
+ 'no-results': (_: {}) => any;
425
+ 'dropdown::after': (_: {}) => any;
402
426
  }>;
403
427
  export default _default;
404
428
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -8,10 +8,6 @@ export declare const VvComboboxProps: {
8
8
  type: (StringConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | NumberConstructor)[];
9
9
  default: undefined;
10
10
  };
11
- /**
12
- * Select input label
13
- */
14
- label: StringConstructor;
15
11
  /**
16
12
  * Label for no search results
17
13
  */
@@ -19,31 +15,38 @@ export declare const VvComboboxProps: {
19
15
  type: StringConstructor;
20
16
  default: string;
21
17
  };
18
+ /**
19
+ * Label for no options available
20
+ */
21
+ noOptionsLabel: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
22
25
  /**
23
26
  * Label for selected option hint
24
27
  */
25
- selectedLabel: {
28
+ selectedHintLabel: {
26
29
  type: StringConstructor;
27
30
  default: string;
28
31
  };
29
32
  /**
30
- * Label for deselect button
33
+ * Label for deselect action button
31
34
  */
32
- deselectLabel: {
35
+ deselectActionLabel: {
33
36
  type: StringConstructor;
34
37
  default: string;
35
38
  };
36
39
  /**
37
40
  * Label for select option hint
38
41
  */
39
- pressToSelectLabel: {
42
+ selectHintLabel: {
40
43
  type: StringConstructor;
41
44
  default: string;
42
45
  };
43
46
  /**
44
47
  * Label for deselected option hint
45
48
  */
46
- pressToDeselectLabel: {
49
+ deselectHintLabel: {
47
50
  type: StringConstructor;
48
51
  default: string;
49
52
  };
@@ -120,6 +123,7 @@ export declare const VvComboboxProps: {
120
123
  * Close dropdown on select (not multiple)
121
124
  */
122
125
  autoClose: BooleanConstructor;
126
+ label: (StringConstructor | NumberConstructor)[];
123
127
  placement: {
124
128
  type: PropType<import("../../constants").Side | import("../../constants").Placement>;
125
129
  default: import("../../constants").Side;
@@ -192,9 +196,7 @@ export declare const VvComboboxProps: {
192
196
  };
193
197
  labelKey: {
194
198
  type: (StringConstructor | FunctionConstructor)[];
195
- default: string; /**
196
- * Label for select option hint
197
- */
199
+ default: string;
198
200
  };
199
201
  valueKey: {
200
202
  type: (StringConstructor | FunctionConstructor)[];
@@ -208,7 +210,10 @@ export declare const VvComboboxProps: {
208
210
  readonly: BooleanConstructor;
209
211
  disabled: BooleanConstructor;
210
212
  loading: BooleanConstructor;
211
- loadingLabel: StringConstructor;
213
+ loadingLabel: {
214
+ type: StringConstructor;
215
+ default: string;
216
+ };
212
217
  hintLabel: {
213
218
  type: StringConstructor;
214
219
  default: string;