@volverjs/ui-vue 0.0.4 → 0.0.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +19 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +165 -106
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
- package/dist/components/VvAccordion/index.d.ts +8 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +264 -164
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
- package/dist/components/VvAccordionGroup/index.d.ts +8 -0
- package/dist/components/VvAction/VvAction.es.js +276 -98
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +12 -12
- package/dist/components/VvAction/index.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +213 -44
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +247 -75
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +646 -360
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +18 -18
- package/dist/components/VvButton/index.d.ts +13 -13
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +261 -79
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +57 -38
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +562 -274
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +5 -5
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +661 -340
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +1546 -983
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +138 -51
- package/dist/components/VvCombobox/index.d.ts +41 -10
- package/dist/components/VvDialog/VvDialog.es.js +387 -141
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
- package/dist/components/VvDialog/index.d.ts +4 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +452 -244
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +130 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +13 -13
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
- package/dist/components/VvDropdown/index.d.ts +40 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +373 -160
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +43 -28
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +285 -90
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +113 -65
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
- package/dist/components/VvIcon/index.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +986 -462
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +100 -20
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +66 -13
- package/dist/components/VvProgress/VvProgress.es.js +216 -45
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +499 -238
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +598 -304
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
- package/dist/components/VvRadioGroup/index.d.ts +3 -3
- package/dist/components/VvSelect/VvSelect.es.js +631 -324
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
- package/dist/components/VvSelect/index.d.ts +3 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +676 -355
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +20 -20
- package/dist/components/VvTextarea/index.d.ts +4 -4
- package/dist/components/VvTooltip/VvTooltip.es.js +215 -47
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
- package/dist/components/VvTooltip/index.d.ts +2 -2
- package/dist/components/index.es.js +3522 -2231
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
- package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcon.d.ts +7 -7
- package/dist/composables/useDebouncedInput.d.ts +4 -1
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useTextCount.d.ts +3 -3
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/index.es.js +264 -55
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.d.ts +3 -0
- package/dist/directives/v-contextmenu.es.js +42 -0
- package/dist/directives/v-contextmenu.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +222 -53
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.d.ts +3 -1
- package/dist/icons.es.js +40 -23
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +112 -3607
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +50 -18
- package/dist/resolvers/unplugin.d.ts +7 -1
- package/dist/resolvers/unplugin.es.js +77 -37
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +12 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +12 -0
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +13 -1
- package/package.json +126 -40
- package/src/Volver.ts +49 -22
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +19 -22
- package/src/components/VvAccordion/index.ts +12 -4
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
- package/src/components/VvAccordionGroup/index.ts +8 -0
- package/src/components/VvAction/VvAction.vue +7 -7
- package/src/components/VvAction/index.ts +1 -1
- package/src/components/VvBadge/VvBadge.vue +2 -2
- package/src/components/VvBadge/index.ts +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
- package/src/components/VvButton/VvButton.vue +11 -11
- package/src/components/VvButton/index.ts +10 -9
- package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
- package/src/components/VvButtonGroup/index.ts +1 -1
- package/src/components/VvCard/VvCard.vue +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
- package/src/components/VvCheckbox/index.ts +11 -7
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
- package/src/components/VvCheckboxGroup/index.ts +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +44 -26
- package/src/components/VvCombobox/index.ts +1 -1
- package/src/components/VvDialog/VvDialog.vue +28 -11
- package/src/components/VvDialog/index.ts +5 -2
- package/src/components/VvDropdown/VvDropdown.vue +7 -5
- package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
- package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
- package/src/components/VvDropdown/index.ts +3 -3
- package/src/components/VvIcon/VvIcon.vue +3 -3
- package/src/components/VvIcon/index.ts +3 -3
- package/src/components/VvInputText/VvInputClearAction.ts +2 -2
- package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
- package/src/components/VvInputText/VvInputStepAction.ts +3 -2
- package/src/components/VvInputText/VvInputText.vue +130 -37
- package/src/components/VvInputText/VvInputTextActions.ts +5 -8
- package/src/components/VvInputText/index.ts +62 -1
- package/src/components/VvProgress/VvProgress.vue +2 -2
- package/src/components/VvProgress/index.ts +1 -1
- package/src/components/VvRadio/VvRadio.vue +3 -7
- package/src/components/VvRadio/index.ts +11 -7
- package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
- package/src/components/VvRadioGroup/index.ts +1 -1
- package/src/components/VvSelect/VvSelect.vue +4 -4
- package/src/components/VvSelect/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -6
- package/src/components/VvTextarea/index.ts +1 -1
- package/src/components/VvTooltip/VvTooltip.vue +2 -2
- package/src/components/VvTooltip/index.ts +3 -3
- package/src/composables/dropdown/useInjectDropdown.ts +2 -2
- package/src/composables/dropdown/useProvideDropdown.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +1 -1
- package/src/composables/group/useProvideGroupState.ts +1 -1
- package/src/composables/useComponentIcon.ts +1 -1
- package/src/composables/useDebouncedInput.ts +10 -3
- package/src/composables/useDefaults.ts +89 -0
- package/src/composables/useModifiers.ts +4 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/directives/index.ts +3 -1
- package/src/directives/v-contextmenu.ts +40 -0
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +1 -1
- package/src/index.ts +0 -2
- package/src/props/index.ts +20 -10
- package/src/resolvers/unplugin.ts +15 -1
- package/src/stories/Accordion/Accordion.stories.mdx +8 -2
- package/src/stories/Accordion/Accordion.test.ts +21 -15
- package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +41 -0
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +40 -0
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +1 -1
- package/src/stories/argTypes.ts +12 -2
- package/src/types/group.d.ts +5 -0
|
@@ -1 +1 @@
|
|
|
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))}})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("@floating-ui/vue"),require("nanoid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@floating-ui/vue","nanoid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCombobox=t(e.vue,e.vue$1,e.vue$2,e.nanoid,e.core,e.mitt)}(this,(function(e,t,l,o,n,a){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),i=(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))(i||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(s||{}),c=(e=>(e.listbox="listbox",e.menu="menu",e))(c||{}),f=(e=>(e.option="option",e.presentation="presentation",e))(f||{});const p=Symbol.for("volver"),v=Symbol.for("dropdownTrigger"),m=Symbol.for("dropdownItem"),b=Symbol.for("dropdownAction"),g={valid:Boolean,validLabel:[String,Array]},y={invalid:Boolean,invalidLabel:[String,Array]},h={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},k={disabled:Boolean},S={selected:Boolean},B=(Boolean,Boolean,{label:[String,Number]}),V={readonly:Boolean},x={modifiers:[String,Array]},w={hintLabel:{type:String,default:""}},N={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},_={icon:{type:[String,Object]},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},E={tabindex:{type:[String,Number],default:0}},C={floating:Boolean},P={unselectable:{type:Boolean,default:!0}},L={id:[String,Number]},$={placement:{type:String,default:r.bottom,validator:e=>Object.values(r).includes(e)||Object.values(i).includes(e)},strategy:{type:String,default:"absolute",validator:e=>["fixed","absolute"].includes(e)},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}},O={...L,name:{type:String,required:!0}},A={autofocus:Boolean},D={autocomplete:{type:String,default:"off"}};d.button;const j={...O,...E,...g,...y,...w,...h,...k,...V,...x,...N,..._,...C,...P,...$,...B,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:{...$.triggerWidth,default:!0},dropdownModifiers:{type:[String,Array]},autoOpen:Boolean,autoClose:Boolean},R={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 z(){return e.inject(p)}function F(t,l,o){return e.computed((()=>{const n={[t]:!0},a="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{n[`${t}--${l}`]=e.unref(o.value[l])})),n}))}const H=e.defineComponent({name:"VvIcon",props:R,setup(l){const o=l,n=e.ref(!0),a=z(),{modifiers:r}=e.toRefs(o),i=F("vv-icon",r),u=e.computed((()=>o.provider||(null==a?void 0:a.iconsProvider))),d=e.computed((()=>{const e=o.name??"",l=`@${u.value}:${o.prefix}:${o.name}`;return t.iconExists(e)?e:t.iconExists(l)?l:(null==a?void 0:a.iconsCollections.find((l=>{const o=`@${u.value}:${l.prefix}:${e}`;if(t.iconExists(o))return o})))||e}));function s(e){const l=function(e){let t=null;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),n=(null==l?void 0:l.innerHTML.trim())||"";l&&n&&t.addIcon(`@${u.value}:${o.prefix}:${o.name}`,{body:n,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return a&&(o.src&&!t.iconExists(`@${u.value}:${o.prefix}:${o.name}`)?(n.value=!1,a.fetchIcon(o.src).then((e=>{e&&(s(e),n.value=!0)})).catch((e=>{throw new Error(`During fetch icon: ${null==e?void 0:e.message}`)}))):o.svg&&s(o.svg)),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(i)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:l.rotate,color:l.color,onLoad:l.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),I={...L,...x,...$,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:c.menu,validator:e=>Object.values(c).includes(e)}},T=t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid())));const K=["id","tabindex","role","aria-labelledby"],q=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:I,emits:["update:modelValue"],setup(t,{expose:o,emit:r}){const i=t,{id:u}=e.toRefs(i),d=T(u),s=e.useAttrs(),p=e.ref("auto"),b=e.ref("auto"),g=e.ref(null),y=e.ref(null),h=e.ref(null),k=e.ref(null),S=e.computed({get:()=>i.reference??g.value,set:e=>{g.value=e}}),B=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()):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`,b.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:h})),e})),{x:V,y:x,strategy:w,middlewareData:N,placement:_}=l.useFloating(S,y,{whileElementsMounted:l.autoUpdate,placement:e.computed((()=>i.placement)),strategy:e.computed((()=>i.strategy)),middleware:B}),E=e.computed((()=>({position:w.value,top:`${x.value??0}px`,left:`${V.value??0}px`,maxWidth:p.value,maxHeight:b.value,width:i.triggerWidth&&S.value?`${S.value.offsetWidth}px`:void 0}))),C=e.computed((()=>_.value.split("-")[0])),P=e.computed((()=>({top:"bottom",right:"left",bottom:"top",left:"right"}[C.value]??"bottom"))),L=e.computed((()=>{var e,t,l,o;return["bottom","top"].includes(P.value)?{right:`${(null==(e=N.value.arrow)?void 0:e.x)??0}px`,[P.value]:-((null==(t=h.value)?void 0:t.offsetWidth)??0)/2+"px"}:{top:`${(null==(l=N.value.arrow)?void 0:l.y)??0}px`,[P.value]:-((null==(o=h.value)?void 0:o.offsetWidth)??0)/2+"px"}})),$=n.useVModel(i,"modelValue",r),O=e.ref(!1),A=e.computed({get:()=>$.value??O.value,set:e=>{void 0!==$.value?$.value=e:O.value=e}}),D=()=>{A.value=!0},j=()=>{A.value=!1},R=()=>{A.value=!A.value},z=e=>{S.value=e};o({toggle:R,show:D,hide:j,init:z}),e.watch(A,(t=>{t&&i.autofocusFirst&&e.nextTick((()=>{const e=X(y.value);e.length>0&&e[0].focus()}))})),n.onClickOutside(y,(()=>{i.autoClose&&(A.value=!1)}),{ignore:[S]});const H=e.computed((()=>{var e,t;return(null==(t=null==(e=S.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),I=e.computed((()=>({"aria-controls":d.value,"aria-haspopup":!0,"aria-expanded":A.value}))),{component:q,bus:W}=function({reference:t,id:l,expanded:o,aria:n}){const r=a(),i=e.defineComponent({name:"VvDropdownTriggerProvider",provide:()=>({[v]:{reference:t,id:l,expanded:o,aria:n,bus:r}}),setup:()=>({}),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:S,id:d,expanded:A,aria:I});W.on("click",R);const{role:M,modifiers:U}=e.toRefs(i),{itemRole:J}=function({role:t,expanded:l}){const o=e.computed((()=>t.value===c.listbox?f.option:f.presentation));return e.provide(m,{role:o,expanded:l}),{itemRole:o}}({role:M,expanded:A}),G=F("vv-dropdown",U,e.computed((()=>({arrow:i.arrow})))),{focused:Q}=n.useFocusWithin(y);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"))):[]}return n.onKeyStroke("Escape",(e=>{A.value&&(e.preventDefault(),j())})),n.onKeyStroke("ArrowDown",(t=>{A.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus():e[0].focus()}})))})),n.onKeyStroke("ArrowUp",(t=>{A.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=X(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus():e[e.length-1].focus()}})))})),n.onKeyStroke([" ","Enter"],(e=>{if(A.value&&Q.value){e.preventDefault();document.activeElement.click()}})),(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:z,show:D,hide:j,toggle:R,expanded:e.unref(A),aria:e.unref(I)})))])),_:3}),e.createVNode(e.Transition,{name:t.transitionName},{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:y,style:e.normalizeStyle(e.unref(E)),class:e.normalizeClass(e.unref(G))},[i.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:h,style:e.normalizeStyle(e.unref(L)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(A)}))),e.createElementVNode("ul",e.mergeProps(e.unref(s),{id:e.unref(d),ref_key:"listEl",ref:k,tabindex:e.unref(A)?void 0:-1,role:e.unref(M),"aria-labelledby":e.unref(H),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(J)})))],16,K),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(A)})))],6),[[e.vShow,e.unref(A)]])])),_:3},8,["name"])],64))}});const W=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:l,expanded:o}=e.inject(m,{}),a=e.ref(null);!function({expanded:t}){e.provide(b,{role:s.menuitem,expanded:t})}({expanded:o});const r=n.useElementHover(a),{focused:i}=n.useFocus(a),{focused:u}=n.useFocusWithin(a);return e.watch(r,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({role:e.unref(l)},{ref_key:"element",ref:a,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(u)}]}),[e.renderSlot(t.$slots,"default")],16))}}),M=["title"],U=e.defineComponent({name:"VvDropdownOption",props:{...k,...S,...P,...x,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(t){const l=t,{modifiers:o}=e.toRefs(l),n=F("vv-dropdown-option",o,e.computed((()=>({disabled:l.disabled,selected:l.selected,unselectable:l.unselectable&&l.selected})))),a=e.computed((()=>l.selected?l.unselectable?l.deselectHintLabel:l.selectedHintLabel:l.disabled?void 0:l.selectHintLabel));return(t,l)=>(e.openBlock(),e.createBlock(W,{class:e.normalizeClass(e.unref(n)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(a)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)),1)]))],8,M)])),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}});function J(e,t,l){return l?Q(e,l)===Q(t,l):G(e,t)}function G(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 n,a,r;if(l&&o){if(a=e.length,a!=t.length)return!1;for(n=a;0!=n--;)if(!G(e[n],t[n]))return!1;return!0}if(l!=o)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!=u)return!1;if(i&&u)return e.getTime()==t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!=s)return!1;if(d&&s)return e.toString()==t.toString();const c=Object.keys(e);if(a=c.length,a!==Object.keys(t).length)return!1;for(n=a;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=a;0!=n--;)if(r=c[n],!G(e[r],t[r]))return!1;return!0}return e!=e&&t!=t}function Q(e,t){if(e&&Object.keys(e).length&&t){if(-1===t.indexOf("."))return e[t];{const l=t.split(".");let o=e;for(let t=0,n=l.length;t<n;++t){if(null==e)return null;o=o[l[t]]}return o}}return null}function X(e,t){if(null!=e&&t&&t.length)for(const l of t)if(J(e,l))return!0;return!1}function Y(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function Z(e,t){const l=function(e,t){let l=-1;if(t)for(let o=0;o<t.length;o++)if(J(t[o],e)){l=o;break}return l}(e,t);return l>-1?t.filter(((e,t)=>t!==l)):t}function ee(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function te(t,l){const{invalid:o,valid:a,hint:r,loading:i}=l,{hintLabel:u,modelValue:d,valid:s,validLabel:c,invalid:f,invalidLabel:p,...v}=e.toRefs(t),m=Q(v,"loading"),b=Q(v,"loadingLabel"),g=e.computed((()=>!!f.value&&(!(!f.value||!o)||(!!((null==p?void 0:p.value)&&Array.isArray(p.value)&&p.value.length>0)||!(!(null==p?void 0:p.value)||Y(p)))))),y=e.computed((()=>!!(u&&u.value||r))),h=e.computed((()=>!!(c&&c.value||a))),k=e.computed((()=>!!((null==m?void 0:m.value)&&i||(null==m?void 0:m.value)&&(null==b?void 0:b.value)))),S=e.computed((()=>y.value||h.value||g.value||k.value));return{hasInvalid:g,hasHint:y,hasValid:h,hasLoading:k,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(t){const l=e.computed((()=>{const e=n.toReactive({hintLabel:u,modelValue:d,valid:s,validLabel:c,invalid:f,invalidLabel:p,loading:m,loadingLabel:b,...t.params});return(null==f?void 0:f.value)?(null==o?void 0:o(e))||ee(null==p?void 0:p.value)||(null==u?void 0:u.value):(null==s?void 0:s.value)?(null==a?void 0:a(e))||ee(null==c?void 0:c.value)||(null==u?void 0:u.value):(null==m?void 0:m.value)?(null==i?void 0:i(e))||ee(null==b?void 0:b.value)||(null==u?void 0:u.value):(null==r?void 0:r(e))||ee(null==u?void 0:u.value)||(null==u?void 0:u.value)}));return{isVisible:S,hasInvalid:g,hasValid:h,hintContent:l}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}const le={...O,...A,...D,...E,...g,...y,...w,...h,...k,...V,...x,...N,..._,...C,...P,...B,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};function oe(t,l){const{focused:o}=n.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}function ne(t,l){const o=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.before))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.after))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.right))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:a,hasIconRight:i,hasIconTop:d,hasIconBottom:s,hasIconBefore:o,hasIconAfter:n}}function ae(t){const{options:l,labelKey:o,valueKey:n,disabledKey:a}=e.toRefs(t);return{options:l,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:"function"==typeof o.value?o.value(e):e[o.value],getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):e[n.value],getOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof a.value?a.value(e):e[a.value])}}const re=["for"],ie={class:"vv-select__wrapper"},ue={key:0,class:"vv-select__input-before"},de={class:"vv-select__inner"},se=["id"],ce=["disabled","hidden"],fe=["disabled","value"],pe={key:1,class:"vv-select__input-after"},ve=e.defineComponent({name:"VvSelect",props:le,emits:["update:modelValue","focus","blur"],setup(t,{emit:l}){const o=t,a=e.useSlots(),r=e.ref(),{HintSlot:i,hasHint:u,hasInvalid:d}=te(o,a),{id:s,modifiers:c,disabled:f,readonly:p,loading:v,icon:m,iconPosition:b,invalid:g,valid:y,floating:h,multiple:k}=e.toRefs(o),S=T(s),B=e.computed((()=>`${S.value}-hint`)),{focused:V}=oe(r,l),x=n.useElementVisibility(r);e.watch(x,(e=>{e&&o.autofocus&&(V.value=!0)}));const{hasIcon:w,hasIconBefore:N,hasIconAfter:_}=ne(m,b),E=e.computed((()=>!Y(o.modelValue))),C=e.computed((()=>o.disabled||o.readonly)),P=e.computed((()=>C.value?-1:o.tabindex)),L=e.computed((()=>!0===o.invalid||!0!==o.valid&&void 0)),$=F("vv-select",c,e.computed((()=>({valid:y.value,invalid:g.value,loading:v.value,disabled:f.value,readonly:p.value,"icon-before":N.value,"icon-after":_.value,dirty:E.value,focus:V.value,floating:h.value,multiple:k.value})))),O=e.computed((()=>({name:o.name,tabindex:P.value,disabled:C.value,required:o.required,size:o.size,autocomplete:o.autocomplete,multiple:o.multiple,"aria-invalid":L.value,"aria-describedby":!d.value&&u.value?B.value:void 0,"aria-errormessage":d.value?B.value:void 0}))),A=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue}))),{getOptionLabel:D,getOptionValue:j,getOptionDisabled:R}=ae(o),z=e.computed({get:()=>o.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),l("update:modelValue",e)}});return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref($))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(S)},e.toDisplayString(t.label),9,re)):e.createCommentVNode("",!0),e.createElementVNode("div",ie,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",ue,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])):e.createCommentVNode("",!0),e.createElementVNode("div",de,[e.unref(N)?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(w)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(S),ref_key:"select",ref:r,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(z)?z.value=t:null)},e.unref(O)),[t.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!t.unselectable,hidden:!t.unselectable},e.toDisplayString(t.placeholder),9,ce)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,((t,l)=>(e.openBlock(),e.createElementBlock("option",{key:l,disabled:e.unref(R)(t),value:e.unref(j)(t)},e.toDisplayString(e.unref(D)(t)),9,fe)))),128))],16,se),[[e.vModelSelect,e.unref(z)]]),e.unref(_)?(e.openBlock(),e.createBlock(H,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(w)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(i),{id:e.unref(B),class:"vv-select__hint"},null,8,["id"])],2))}}),me={...x,value:[String,Number]},be=e.defineComponent({name:"VvBadge",props:me,setup(t){const l=t,{modifiers:o}=e.toRefs(l),n=F("vv-badge",o);return(t,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(n)),role:"status"},[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.value),1)]))],2))}});const ge=["id"],ye=["id","for"],he=["id","aria-controls","aria-labelledby","aria-describedby","placeholder"],ke={key:0,class:"vv-select__input-before"},Se={class:"vv-select__inner"},Be=["aria-labelledby","tabindex"],Ve=["aria-label","onClick"],xe={key:1,class:"vv-select__input-after"},we={name:"VvCombobox",components:{VvDropdown:q,VvDropdownOption:U}};return e.defineComponent({...we,props:j,emits:["update:modelValue","change:search","focus","blur"],setup(t,{emit:l}){const o=t,a=e.useSlots(),r=function(t,l,o){const n=z(),a=e.computed((()=>{var e;if(n&&(null==(e=n.defaults.value)?void 0:e[t]))return n.defaults.value[t]}));return e.computed((()=>{if(void 0===a.value)return o;const e=a.value,t=l,n=o;return Object.keys(t).reduce(((l,o)=>{const a=n[o];if(l[o]=a,o in e){if(Array.isArray(t[o])){const n=t[o];n.length&&n[0]===a&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===a&&(l[o]=e[o]),"object"==typeof t[o]){let n=t[o].default;"function"==typeof n&&(n=n()),"object"==typeof n?JSON.stringify(n)===JSON.stringify(a)&&(l[o]=e[o]):n===a&&(l[o]=e[o])}}return l}),{})}))}("VvCombobox",j,o),{HintSlot:i}=te(o,a),u=e.ref(null),d=e.ref(null),s=e.ref(null),{focused:f}=oe(u,l),{focused:p}=n.useFocusWithin(s);e.watch(f,(e=>{o.autoOpen&&(!e||b.value?e||!b.value||p.value||h():y())})),e.watch(p,(e=>{f.value||e||!b.value||h()}));const v=e.ref(""),m=n.refDebounced(v,Number(o.debounceSearch));e.watch(m,(()=>l("change:search",m.value)));const b=e.ref(!1),g=()=>{o.disabled||o.readonly||(b.value=!b.value)},y=()=>{o.disabled||o.readonly||b.value||(b.value=!0)},h=()=>{o.disabled||o.readonly||!b.value||(b.value=!1)};e.watch(b,(t=>{P.value&&e.nextTick((()=>{t?d.value&&d.value.focus():v.value=""}))}));const{id:k,icon:S,iconPosition:B,modifiers:V,disabled:x,readonly:w,loading:N,valid:_,invalid:E,floating:C,searchable:P}=e.toRefs(o),L=T(k),$=e.computed((()=>`${L.value}-hint`)),O=e.computed((()=>`${L.value}-dropdown`)),A=e.computed((()=>`${L.value}-search`)),D=e.computed((()=>`${L.value}-label`)),{hasIcon:R,hasIconBefore:I,hasIconAfter:K}=ne(S,B),W=e.computed((()=>!Y(o.modelValue))),M=e.computed((()=>x.value||w.value?-1:o.tabindex)),G=F("vv-select",V,e.computed((()=>({disabled:x.value,loading:N.value,readonly:w.value,"icon-before":Boolean(I.value),"icon-after":Boolean(K.value),valid:_.value,invalid:E.value,dirty:W.value,focus:f.value,floating:C.value})))),Q=e.computed((()=>o.searchable?ie.value:o.options)),{getOptionLabel:ee,getOptionValue:le,getOptionDisabled:re}=ae(o),ie=e.computed((()=>{var e;return null==(e=o.options)?void 0:e.filter((e=>ee(e).toLowerCase().includes(m.value.toLowerCase().trim())))}));function ue(e){return Array.isArray(o.modelValue)?X(e,o.modelValue)||X(le(e),o.modelValue):J(e,o.modelValue)||J(le(e),o.modelValue)}const de=e.computed((()=>{let e=[];return Array.isArray(o.modelValue)?e=o.modelValue:o.modelValue&&(e=[o.modelValue]),o.options.filter((t=>e.includes(le(t))))})),se=e.computed((()=>de.value.map((e=>ee(e))).join(o.separator)));e.watch(de,(()=>{!o.multiple&&o.autoClose&&h()}));const ce=()=>{o.autoOpen?y():g()},fe=e=>{var t;if(o.disabled||o.readonly)return;const n=le(e);let a=n;if(o.multiple)if(Array.isArray(o.modelValue)){const e=Number(o.maxValues);if(void 0!==o.maxValues&&e>=0&&(null==(t=o.modelValue)?void 0:t.length)>=e&&!X(n,o.modelValue))return;a=X(n,o.modelValue)?Z(n,o.modelValue):[...o.modelValue,n]}else a=[n];else o.autoClose&&h(),o.unselectable&&n===o.modelValue&&(a=void 0);l("update:modelValue",a)},pe=e.computed((()=>({id:L.value,name:o.name,tabindex:M.value,valid:_.value,validLabel:r.value.validLabel,invalid:E.value,invalidLabel:r.value.invalidLabel,hintLabel:r.value.hintLabel,loading:N.value,loadingLabel:r.value.loadingLabel,disabled:x.value,readonly:w.value,modifiers:o.modifiers,options:Q.value,labelKey:o.labelKey,valueKey:o.valueKey,icon:o.icon,iconPosition:o.iconPosition,floating:o.floating,unselectable:o.unselectable,multiple:o.multiple,label:o.label,placeholder:o.placeholder,modelValue:o.modelValue}))),me=e.computed((()=>({id:O.value,reference:s.value,placement:o.placement,strategy:o.strategy,transitionName:o.transitionName,offset:o.offset,shift:o.shift,flip:o.flip,autoPlacement:o.autoPlacement,arrow:o.arrow,autoClose:o.autoClose,autofocusFirst:!P.value&&o.autofocusFirst,triggerWidth:o.triggerWidth,modifiers:o.dropdownModifiers}))),we=e.computed((()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue})));return n.onKeyStroke([" ","Enter"],(e=>{o.autoOpen||!b.value&&f.value&&(e.preventDefault(),e.stopImmediatePropagation(),g())})),(t,o)=>t.native?(e.openBlock(),e.createBlock(ve,e.mergeProps({key:1},e.unref(pe),{"onUpdate:modelValue":o[2]||(o[2]=e=>l("update:modelValue",e))}),null,16)):(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(L),class:e.normalizeClass(e.unref(G))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:e.unref(D),for:e.unref(P)?e.unref(A):void 0},e.toDisplayString(t.label),9,ye)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:s,class:"vv-select__wrapper"},[e.createVNode(q,e.mergeProps({modelValue:e.unref(b),"onUpdate:modelValue":o[1]||(o[1]=t=>e.isRef(b)?b.value=t:null)},e.unref(me),{role:e.unref(c).listbox}),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(we))))])):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[e.unref(I)?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0,class:"vv-select__icon"},e.unref(R)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({ref_key:"inputEl",ref:u},l,{"aria-labelledby":e.unref(D),class:"vv-select__input",role:"combobox",tabindex:e.unref(M),onClickPassive:ce}),[e.renderSlot(t.$slots,"value",e.normalizeProps(e.guardReactiveProps({selectedOptions:e.unref(de),onInput:fe})),(()=>[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(de),((l,o)=>(e.openBlock(),e.createBlock(be,{key:o,modifiers:t.badgeModifiers,class:"vv-select__badge"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(ee)(l))+" ",1),!t.unselectable||e.unref(w)||e.unref(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(r).deselectActionLabel,onClick:e.withModifiers((e=>fe(l)),["stop"])},[e.createVNode(H,{name:"close"})],8,Ve))])),_:2},1032,["modifiers"])))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(se)),1)],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.placeholder),1)],64))]))],16,Be),e.unref(K)?(e.openBlock(),e.createBlock(H,e.mergeProps({key:1,class:"vv-select__icon vv-select__icon-after"},e.unref(R)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(we))))])):e.createCommentVNode("",!0)])),items:e.withCtx((()=>[e.unref(ie).length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(ie),((l,o)=>(e.openBlock(),e.createBlock(U,e.mergeProps({disabled:e.unref(re)(l),selected:ue(l),unselectable:t.unselectable,deselectHintLabel:e.unref(r).deselectHintLabel,selectHintLabel:e.unref(r).selectHintLabel,selectedHintLabel:e.unref(r).selectedHintLabel},{key:o,class:"vv-dropdown-option",onClickPassive:e=>fe(l)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"option",e.normalizeProps(e.guardReactiveProps({option:l,selectedOptions:e.unref(de),selected:ue(l),disabled:e.unref(re)(l)})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ee)(l)),1)]))])),_:2},1040,["onClickPassive"])))),128)):t.options.length?(e.openBlock(),e.createBlock(U,{key:2,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-results",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).noResultsLabel),1)]))])),_:3})):(e.openBlock(),e.createBlock(U,{key:1,modifiers:"inert"},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"no-options",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(r).noOptionsLabel),1)]))])),_:3}))])),_:2},[e.unref(P)||t.$slots["dropdown::before"]?{name:"before",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::before"),e.unref(P)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,id:e.unref(A),ref_key:"inputSearchEl",ref:d,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(v)?v.value=t:null),"aria-autocomplete":"list","aria-controls":e.unref(O),"aria-labelledby":e.unref(D),"aria-describedby":e.unref($),autocomplete:"off",spellcheck:"false",type:"search",class:"vv-dropdown__search",placeholder:e.unref(r).searchPlaceholder},null,8,he)),[[e.vShow,e.unref(b)],[e.vModelText,e.unref(v)]]):e.createCommentVNode("",!0)])),key:"0"}:void 0,t.$slots["dropdown::after"]?{name:"after",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"dropdown::after")])),key:"1"}:void 0]),1040,["modelValue","role"])],512),e.createVNode(e.unref(i),{id:e.unref($),class:"vv-select__hint"},null,8,["id"])],10,ge))}})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Option } from '
|
|
1
|
+
import type { Option } from '../../types/generic';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
3
|
modelValue: {
|
|
4
4
|
type: (StringConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | NumberConstructor)[];
|
|
@@ -47,7 +47,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
47
47
|
native: BooleanConstructor;
|
|
48
48
|
badges: BooleanConstructor;
|
|
49
49
|
badgeModifiers: {
|
|
50
|
-
type:
|
|
50
|
+
type: globalThis.PropType<string | string[]>;
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
53
|
triggerWidth: {
|
|
@@ -55,54 +55,85 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
55
55
|
type: BooleanConstructor;
|
|
56
56
|
};
|
|
57
57
|
dropdownModifiers: {
|
|
58
|
-
type:
|
|
58
|
+
type: globalThis.PropType<string | string[]>;
|
|
59
59
|
};
|
|
60
60
|
autoOpen: BooleanConstructor;
|
|
61
61
|
autoClose: BooleanConstructor;
|
|
62
62
|
label: (StringConstructor | NumberConstructor)[];
|
|
63
63
|
placement: {
|
|
64
|
-
type:
|
|
65
|
-
default: import("
|
|
64
|
+
type: globalThis.PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
|
|
65
|
+
default: import("../../constants").Side;
|
|
66
66
|
validator: (value: never) => boolean;
|
|
67
67
|
};
|
|
68
|
+
strategy: {
|
|
69
|
+
type: globalThis.PropType<"fixed" | "absolute">;
|
|
70
|
+
default: string;
|
|
71
|
+
validator: (value: "fixed" | "absolute") => boolean;
|
|
72
|
+
};
|
|
68
73
|
transitionName: {
|
|
69
74
|
type: StringConstructor;
|
|
70
75
|
};
|
|
71
76
|
offset: {
|
|
72
|
-
type:
|
|
77
|
+
type: globalThis.PropType<string | import("@floating-ui/core").OffsetOptions | undefined>;
|
|
73
78
|
default: number;
|
|
74
79
|
};
|
|
75
80
|
shift: {
|
|
76
|
-
type:
|
|
81
|
+
type: globalThis.PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & {
|
|
82
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
83
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
84
|
+
altBoundary: boolean;
|
|
85
|
+
padding: import("@floating-ui/core").Padding;
|
|
77
86
|
boundary: import("@floating-ui/dom").Boundary;
|
|
78
87
|
}> | undefined>;
|
|
79
88
|
default: boolean;
|
|
80
89
|
};
|
|
81
90
|
flip: {
|
|
82
|
-
type:
|
|
91
|
+
type: globalThis.PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & {
|
|
92
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
93
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
94
|
+
altBoundary: boolean;
|
|
95
|
+
padding: import("@floating-ui/core").Padding;
|
|
83
96
|
boundary: import("@floating-ui/dom").Boundary;
|
|
84
97
|
}> | undefined>;
|
|
85
98
|
default: boolean;
|
|
86
99
|
};
|
|
87
100
|
size: {
|
|
88
|
-
type:
|
|
89
|
-
apply(args:
|
|
101
|
+
type: globalThis.PropType<boolean | Partial<{
|
|
102
|
+
apply: (args: {
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
placement: import("@floating-ui/core").Placement;
|
|
106
|
+
strategy: import("@floating-ui/core").Strategy;
|
|
107
|
+
initialPlacement: import("@floating-ui/core").Placement;
|
|
108
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
109
|
+
rects: import("@floating-ui/core").ElementRects;
|
|
110
|
+
platform: import("@floating-ui/core").Platform;
|
|
90
111
|
elements: import("@floating-ui/dom").Elements;
|
|
91
112
|
} & {
|
|
92
113
|
availableWidth: number;
|
|
93
114
|
availableHeight: number;
|
|
94
|
-
})
|
|
95
|
-
} &
|
|
115
|
+
}) => void | Promise<void>;
|
|
116
|
+
} & {
|
|
117
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
118
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
119
|
+
altBoundary: boolean;
|
|
120
|
+
padding: import("@floating-ui/core").Padding;
|
|
96
121
|
boundary: import("@floating-ui/dom").Boundary;
|
|
97
122
|
}> | undefined>;
|
|
98
123
|
default: () => {
|
|
99
|
-
padding: number;
|
|
100
|
-
* Function triggered on click on input
|
|
101
|
-
*/
|
|
124
|
+
padding: number;
|
|
102
125
|
};
|
|
103
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* Function triggered on input of checkbox or radio (multple or single mode)
|
|
129
|
+
* @param event on input event (checkbox or radio input)
|
|
130
|
+
*/
|
|
104
131
|
autoPlacement: {
|
|
105
|
-
type:
|
|
132
|
+
type: globalThis.PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & {
|
|
133
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
134
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
135
|
+
altBoundary: boolean;
|
|
136
|
+
padding: import("@floating-ui/core").Padding;
|
|
106
137
|
boundary: import("@floating-ui/dom").Boundary;
|
|
107
138
|
}> | undefined>;
|
|
108
139
|
default: boolean;
|
|
@@ -124,12 +155,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
124
155
|
type: (StringConstructor | ObjectConstructor)[];
|
|
125
156
|
};
|
|
126
157
|
iconPosition: {
|
|
127
|
-
type:
|
|
128
|
-
default: import("
|
|
129
|
-
validation: (value: import("
|
|
158
|
+
type: globalThis.PropType<"before" | "after">;
|
|
159
|
+
default: import("../../constants").Position;
|
|
160
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
130
161
|
};
|
|
131
162
|
options: {
|
|
132
|
-
type:
|
|
163
|
+
type: globalThis.PropType<(string | Option)[]>;
|
|
133
164
|
default: () => never[];
|
|
134
165
|
};
|
|
135
166
|
labelKey: {
|
|
@@ -144,7 +175,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
144
175
|
type: (StringConstructor | FunctionConstructor)[];
|
|
145
176
|
default: string;
|
|
146
177
|
};
|
|
147
|
-
modifiers:
|
|
178
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
148
179
|
readonly: BooleanConstructor;
|
|
149
180
|
disabled: BooleanConstructor;
|
|
150
181
|
loading: BooleanConstructor;
|
|
@@ -217,7 +248,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
217
248
|
native: BooleanConstructor;
|
|
218
249
|
badges: BooleanConstructor;
|
|
219
250
|
badgeModifiers: {
|
|
220
|
-
type:
|
|
251
|
+
type: globalThis.PropType<string | string[]>;
|
|
221
252
|
default: string;
|
|
222
253
|
};
|
|
223
254
|
triggerWidth: {
|
|
@@ -225,54 +256,85 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
225
256
|
type: BooleanConstructor;
|
|
226
257
|
};
|
|
227
258
|
dropdownModifiers: {
|
|
228
|
-
type:
|
|
259
|
+
type: globalThis.PropType<string | string[]>;
|
|
229
260
|
};
|
|
230
261
|
autoOpen: BooleanConstructor;
|
|
231
262
|
autoClose: BooleanConstructor;
|
|
232
263
|
label: (StringConstructor | NumberConstructor)[];
|
|
233
264
|
placement: {
|
|
234
|
-
type:
|
|
235
|
-
default: import("
|
|
265
|
+
type: globalThis.PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
|
|
266
|
+
default: import("../../constants").Side;
|
|
236
267
|
validator: (value: never) => boolean;
|
|
237
268
|
};
|
|
269
|
+
strategy: {
|
|
270
|
+
type: globalThis.PropType<"fixed" | "absolute">;
|
|
271
|
+
default: string;
|
|
272
|
+
validator: (value: "fixed" | "absolute") => boolean;
|
|
273
|
+
};
|
|
238
274
|
transitionName: {
|
|
239
275
|
type: StringConstructor;
|
|
240
276
|
};
|
|
241
277
|
offset: {
|
|
242
|
-
type:
|
|
278
|
+
type: globalThis.PropType<string | import("@floating-ui/core").OffsetOptions | undefined>;
|
|
243
279
|
default: number;
|
|
244
280
|
};
|
|
245
281
|
shift: {
|
|
246
|
-
type:
|
|
282
|
+
type: globalThis.PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & {
|
|
283
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
284
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
285
|
+
altBoundary: boolean;
|
|
286
|
+
padding: import("@floating-ui/core").Padding;
|
|
247
287
|
boundary: import("@floating-ui/dom").Boundary;
|
|
248
288
|
}> | undefined>;
|
|
249
289
|
default: boolean;
|
|
250
290
|
};
|
|
251
291
|
flip: {
|
|
252
|
-
type:
|
|
292
|
+
type: globalThis.PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & {
|
|
293
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
294
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
295
|
+
altBoundary: boolean;
|
|
296
|
+
padding: import("@floating-ui/core").Padding;
|
|
253
297
|
boundary: import("@floating-ui/dom").Boundary;
|
|
254
298
|
}> | undefined>;
|
|
255
299
|
default: boolean;
|
|
256
300
|
};
|
|
257
301
|
size: {
|
|
258
|
-
type:
|
|
259
|
-
apply(args:
|
|
302
|
+
type: globalThis.PropType<boolean | Partial<{
|
|
303
|
+
apply: (args: {
|
|
304
|
+
x: number;
|
|
305
|
+
y: number;
|
|
306
|
+
placement: import("@floating-ui/core").Placement;
|
|
307
|
+
strategy: import("@floating-ui/core").Strategy;
|
|
308
|
+
initialPlacement: import("@floating-ui/core").Placement;
|
|
309
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
310
|
+
rects: import("@floating-ui/core").ElementRects;
|
|
311
|
+
platform: import("@floating-ui/core").Platform;
|
|
260
312
|
elements: import("@floating-ui/dom").Elements;
|
|
261
313
|
} & {
|
|
262
314
|
availableWidth: number;
|
|
263
315
|
availableHeight: number;
|
|
264
|
-
})
|
|
265
|
-
} &
|
|
316
|
+
}) => void | Promise<void>;
|
|
317
|
+
} & {
|
|
318
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
319
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
320
|
+
altBoundary: boolean;
|
|
321
|
+
padding: import("@floating-ui/core").Padding;
|
|
266
322
|
boundary: import("@floating-ui/dom").Boundary;
|
|
267
323
|
}> | undefined>;
|
|
268
324
|
default: () => {
|
|
269
|
-
padding: number;
|
|
270
|
-
* Function triggered on click on input
|
|
271
|
-
*/
|
|
325
|
+
padding: number;
|
|
272
326
|
};
|
|
273
327
|
};
|
|
328
|
+
/**
|
|
329
|
+
* Function triggered on input of checkbox or radio (multple or single mode)
|
|
330
|
+
* @param event on input event (checkbox or radio input)
|
|
331
|
+
*/
|
|
274
332
|
autoPlacement: {
|
|
275
|
-
type:
|
|
333
|
+
type: globalThis.PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & {
|
|
334
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
335
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
336
|
+
altBoundary: boolean;
|
|
337
|
+
padding: import("@floating-ui/core").Padding;
|
|
276
338
|
boundary: import("@floating-ui/dom").Boundary;
|
|
277
339
|
}> | undefined>;
|
|
278
340
|
default: boolean;
|
|
@@ -294,12 +356,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
294
356
|
type: (StringConstructor | ObjectConstructor)[];
|
|
295
357
|
};
|
|
296
358
|
iconPosition: {
|
|
297
|
-
type:
|
|
298
|
-
default: import("
|
|
299
|
-
validation: (value: import("
|
|
359
|
+
type: globalThis.PropType<"before" | "after">;
|
|
360
|
+
default: import("../../constants").Position;
|
|
361
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
300
362
|
};
|
|
301
363
|
options: {
|
|
302
|
-
type:
|
|
364
|
+
type: globalThis.PropType<(string | Option)[]>;
|
|
303
365
|
default: () => never[];
|
|
304
366
|
};
|
|
305
367
|
labelKey: {
|
|
@@ -314,7 +376,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
314
376
|
type: (StringConstructor | FunctionConstructor)[];
|
|
315
377
|
default: string;
|
|
316
378
|
};
|
|
317
|
-
modifiers:
|
|
379
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
318
380
|
readonly: BooleanConstructor;
|
|
319
381
|
disabled: BooleanConstructor;
|
|
320
382
|
loading: BooleanConstructor;
|
|
@@ -344,14 +406,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
344
406
|
}, {
|
|
345
407
|
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
346
408
|
disabled: boolean;
|
|
347
|
-
shift: boolean | Partial<import("@floating-ui/core").ShiftOptions &
|
|
409
|
+
shift: boolean | Partial<import("@floating-ui/core").ShiftOptions & {
|
|
410
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
411
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
412
|
+
altBoundary: boolean;
|
|
413
|
+
padding: import("@floating-ui/core").Padding;
|
|
348
414
|
boundary: import("@floating-ui/dom").Boundary;
|
|
349
415
|
}> | undefined;
|
|
350
416
|
options: (string | Option)[];
|
|
351
|
-
|
|
417
|
+
floating: boolean;
|
|
418
|
+
flip: boolean | Partial<import("@floating-ui/core").FlipOptions & {
|
|
419
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
420
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
421
|
+
altBoundary: boolean;
|
|
422
|
+
padding: import("@floating-ui/core").Padding;
|
|
352
423
|
boundary: import("@floating-ui/dom").Boundary;
|
|
353
424
|
}> | undefined;
|
|
354
|
-
iconPosition:
|
|
425
|
+
iconPosition: "before" | "after";
|
|
355
426
|
loading: boolean;
|
|
356
427
|
loadingLabel: string;
|
|
357
428
|
unselectable: boolean;
|
|
@@ -364,26 +435,42 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
364
435
|
labelKey: string | Function;
|
|
365
436
|
valueKey: string | Function;
|
|
366
437
|
disabledKey: string | Function;
|
|
367
|
-
placement:
|
|
438
|
+
placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
|
|
439
|
+
strategy: "fixed" | "absolute";
|
|
368
440
|
offset: string | import("@floating-ui/core").OffsetOptions | undefined;
|
|
369
|
-
size: boolean | Partial<
|
|
370
|
-
apply(args:
|
|
441
|
+
size: boolean | Partial<{
|
|
442
|
+
apply: (args: {
|
|
443
|
+
x: number;
|
|
444
|
+
y: number;
|
|
445
|
+
placement: import("@floating-ui/core").Placement;
|
|
446
|
+
strategy: import("@floating-ui/core").Strategy;
|
|
447
|
+
initialPlacement: import("@floating-ui/core").Placement;
|
|
448
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
449
|
+
rects: import("@floating-ui/core").ElementRects;
|
|
450
|
+
platform: import("@floating-ui/core").Platform;
|
|
371
451
|
elements: import("@floating-ui/dom").Elements;
|
|
372
452
|
} & {
|
|
373
453
|
availableWidth: number;
|
|
374
454
|
availableHeight: number;
|
|
375
|
-
})
|
|
376
|
-
} &
|
|
455
|
+
}) => void | Promise<void>;
|
|
456
|
+
} & {
|
|
457
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
458
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
459
|
+
altBoundary: boolean;
|
|
460
|
+
padding: import("@floating-ui/core").Padding;
|
|
377
461
|
boundary: import("@floating-ui/dom").Boundary;
|
|
378
462
|
}> | undefined;
|
|
379
|
-
autoPlacement: boolean | Partial<import("@floating-ui/core").AutoPlacementOptions &
|
|
463
|
+
autoPlacement: boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & {
|
|
464
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
465
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
466
|
+
altBoundary: boolean;
|
|
467
|
+
padding: import("@floating-ui/core").Padding;
|
|
380
468
|
boundary: import("@floating-ui/dom").Boundary;
|
|
381
469
|
}> | undefined;
|
|
382
470
|
arrow: boolean;
|
|
383
471
|
autoClose: boolean;
|
|
384
472
|
autofocusFirst: boolean;
|
|
385
473
|
triggerWidth: boolean;
|
|
386
|
-
floating: boolean;
|
|
387
474
|
deselectHintLabel: string;
|
|
388
475
|
selectHintLabel: string;
|
|
389
476
|
selectedHintLabel: string;
|
|
@@ -125,10 +125,15 @@ export declare const VvComboboxProps: {
|
|
|
125
125
|
autoClose: BooleanConstructor;
|
|
126
126
|
label: (StringConstructor | NumberConstructor)[];
|
|
127
127
|
placement: {
|
|
128
|
-
type: PropType<
|
|
128
|
+
type: PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
|
|
129
129
|
default: import("../../constants").Side;
|
|
130
130
|
validator: (value: never) => boolean;
|
|
131
131
|
};
|
|
132
|
+
strategy: {
|
|
133
|
+
type: PropType<"fixed" | "absolute">;
|
|
134
|
+
default: string;
|
|
135
|
+
validator: (value: "fixed" | "absolute") => boolean;
|
|
136
|
+
};
|
|
132
137
|
transitionName: {
|
|
133
138
|
type: StringConstructor;
|
|
134
139
|
};
|
|
@@ -137,26 +142,46 @@ export declare const VvComboboxProps: {
|
|
|
137
142
|
default: number;
|
|
138
143
|
};
|
|
139
144
|
shift: {
|
|
140
|
-
type: PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions &
|
|
145
|
+
type: PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & {
|
|
146
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
147
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
148
|
+
altBoundary: boolean;
|
|
149
|
+
padding: import("@floating-ui/core").Padding;
|
|
141
150
|
boundary: import("@floating-ui/dom").Boundary;
|
|
142
151
|
}> | undefined>;
|
|
143
152
|
default: boolean;
|
|
144
153
|
};
|
|
145
154
|
flip: {
|
|
146
|
-
type: PropType<boolean | Partial<import("@floating-ui/core").FlipOptions &
|
|
155
|
+
type: PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & {
|
|
156
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
157
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
158
|
+
altBoundary: boolean;
|
|
159
|
+
padding: import("@floating-ui/core").Padding;
|
|
147
160
|
boundary: import("@floating-ui/dom").Boundary;
|
|
148
161
|
}> | undefined>;
|
|
149
162
|
default: boolean;
|
|
150
163
|
};
|
|
151
164
|
size: {
|
|
152
|
-
type: PropType<boolean | Partial<
|
|
153
|
-
apply(args:
|
|
165
|
+
type: PropType<boolean | Partial<{
|
|
166
|
+
apply: (args: {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
placement: import("@floating-ui/core").Placement;
|
|
170
|
+
strategy: import("@floating-ui/core").Strategy;
|
|
171
|
+
initialPlacement: import("@floating-ui/core").Placement;
|
|
172
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
173
|
+
rects: import("@floating-ui/core").ElementRects;
|
|
174
|
+
platform: import("@floating-ui/core").Platform;
|
|
154
175
|
elements: import("@floating-ui/dom").Elements;
|
|
155
176
|
} & {
|
|
156
177
|
availableWidth: number;
|
|
157
178
|
availableHeight: number;
|
|
158
|
-
})
|
|
159
|
-
} &
|
|
179
|
+
}) => void | Promise<void>;
|
|
180
|
+
} & {
|
|
181
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
182
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
183
|
+
altBoundary: boolean;
|
|
184
|
+
padding: import("@floating-ui/core").Padding;
|
|
160
185
|
boundary: import("@floating-ui/dom").Boundary;
|
|
161
186
|
}> | undefined>;
|
|
162
187
|
default: () => {
|
|
@@ -164,7 +189,11 @@ export declare const VvComboboxProps: {
|
|
|
164
189
|
};
|
|
165
190
|
};
|
|
166
191
|
autoPlacement: {
|
|
167
|
-
type: PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions &
|
|
192
|
+
type: PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & {
|
|
193
|
+
rootBoundary: import("@floating-ui/core").RootBoundary;
|
|
194
|
+
elementContext: import("@floating-ui/core").ElementContext;
|
|
195
|
+
altBoundary: boolean;
|
|
196
|
+
padding: import("@floating-ui/core").Padding;
|
|
168
197
|
boundary: import("@floating-ui/dom").Boundary;
|
|
169
198
|
}> | undefined>;
|
|
170
199
|
default: boolean;
|
|
@@ -186,7 +215,7 @@ export declare const VvComboboxProps: {
|
|
|
186
215
|
type: (StringConstructor | ObjectConstructor)[];
|
|
187
216
|
};
|
|
188
217
|
iconPosition: {
|
|
189
|
-
type: PropType<
|
|
218
|
+
type: PropType<"before" | "after">;
|
|
190
219
|
default: import("../../constants").Position;
|
|
191
220
|
validation: (value: import("../../constants").Position) => boolean;
|
|
192
221
|
};
|
|
@@ -207,7 +236,9 @@ export declare const VvComboboxProps: {
|
|
|
207
236
|
default: string;
|
|
208
237
|
};
|
|
209
238
|
modifiers: PropType<string | string[]>;
|
|
210
|
-
readonly: BooleanConstructor;
|
|
239
|
+
readonly: BooleanConstructor; /**
|
|
240
|
+
* Manage modelValue as string[] or object[]
|
|
241
|
+
*/
|
|
211
242
|
disabled: BooleanConstructor;
|
|
212
243
|
loading: BooleanConstructor;
|
|
213
244
|
loadingLabel: {
|