@volverjs/ui-vue 0.0.10-beta.6 → 0.0.10-beta.8
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/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/Volver.d.ts +0 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +10 -2
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +52 -25
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -4
- package/dist/components/VvAction/VvAction.es.js +6 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
- package/dist/components/VvAlert/VvAlert.es.js +73 -43
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -4
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +113 -64
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +4 -4
- package/dist/components/VvAvatar/VvAvatar.es.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +56 -26
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +18 -8
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +61 -38
- package/dist/components/VvButton/VvButton.es.js +45 -17
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +15 -9
- package/dist/components/VvButton/index.d.ts +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +12 -6
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
- package/dist/components/VvCard/VvCard.es.js +26 -16
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +9 -2
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +78 -44
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +595 -372
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +7 -7
- package/dist/components/VvCombobox/index.d.ts +11 -6
- package/dist/components/VvDialog/VvDialog.es.js +44 -27
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +64 -44
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +18 -4
- package/dist/components/VvDropdown/index.d.ts +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +26 -9
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +19 -8
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +126 -97
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvNav/VvNav.es.js +50 -26
- package/dist/components/VvNav/VvNav.vue.d.ts +7 -7
- package/dist/components/VvNav/index.d.ts +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +19 -7
- package/dist/components/VvProgress/VvProgress.es.js +12 -6
- package/dist/components/VvRadio/VvRadio.es.js +9 -2
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +78 -44
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +133 -94
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +4 -4
- package/dist/components/VvSelect/index.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +98 -44
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +4 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +99 -74
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
- package/dist/components/VvTooltip/VvTooltip.es.js +19 -9
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +3 -3
- package/dist/components/VvTooltip/index.d.ts +1 -1
- package/dist/components/index.es.js +1363 -840
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +39 -23
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +37 -18
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/props/index.d.ts +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +46 -11
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +308 -59
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +2 -15
- package/dist/types/generic.d.ts +1 -1
- package/package.json +35 -35
- package/src/Volver.ts +0 -1
- 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/VvCombobox/VvCombobox.vue +7 -3
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvInputText/VvInputText.vue +2 -2
- package/src/directives/index.ts +1 -4
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Tab/Tab.settings.ts +2 -2
- package/src/types/generic.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","uid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.uid,e.core,e.mitt)}(this,(function(e,t,o,r,l){"use strict";var a=(e=>(e.absolute="absolute",e.fixed="fixed",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),u=(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))(u||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.listbox="listbox",e.menu="menu",e))(s||{}),f=(e=>(e.option="option",e.presentation="presentation",e))(f||{});const p=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),v=(Boolean,Boolean,Boolean,Boolean,{modifiers:[String,Array]});i.before;const m={id:[String,Number]},b={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(a).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},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}};d.button;const g={...m,...b,...v,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:s.menu,validator:e=>Object.values(s).includes(e)}};const h=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:g,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(u,{expose:i,emit:d}){const v=u,{id:m}=e.toRefs(v),b=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid()))))(m),g=e.useAttrs(),y=e.ref("auto"),x=e.ref("auto"),w=e.ref(null),S=e.ref(),E=e.ref(null),k=e.ref(null),P=e.computed({get:()=>v.reference??w.value,set:e=>{w.value=e}}),B=e.ref(!1);e.onMounted((()=>{r.useMutationObserver(S.value,(()=>{var e;B.value="true"===(null==(e=window.getComputedStyle(S.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const O=e.computed((()=>{const e=[];if(v.autoPlacement?"boolean"==typeof v.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(v.autoPlacement)):v.flip&&("boolean"==typeof v.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(v.flip))),v.shift&&("boolean"==typeof v.shift?e.push(t.shift()):e.push(t.shift(v.shift))),v.size){const o=({availableWidth:e,availableHeight:t})=>{y.value=`${e}px`,x.value=`${t}px`};"boolean"==typeof v.size?e.push(t.size({apply:o})):e.push(t.size({...v.size,apply:o}))}return v.offset&&(e.push(t.offset(Number(v.offset))),["string","number"].includes(typeof v.offset)?e.push(t.offset(Number(v.offset))):e.push(t.offset(v.offset))),v.arrow&&e.push(t.arrow({element:E})),e})),{x:$,y:z,middlewareData:V,placement:j,strategy:C}=t.useFloating(P,S,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:v.strategy===a.fixed}),placement:e.computed((()=>v.placement)),strategy:e.computed((()=>v.strategy)),middleware:O}),A=e.computed((()=>{var e;if(B.value)return;const t=v.triggerWidth&&P.value?`${null==(e=P.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${z.value??0}px`,left:`${$.value??0}px`,maxWidth:t?void 0:y.value,maxHeight:x.value,width:t}})),N=e.computed((()=>j.value.split("-")[0])),D=e.computed((()=>{var e,t,o,r,l;if(B.value)return;const a={[n.top]:n.bottom,[n.right]:n.left,[n.bottom]:n.top,[n.left]:n.right}[N.value];return{left:void 0!==(null==(e=V.value.arrow)?void 0:e.x)?`${null==(t=V.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=V.value.arrow)?void 0:o.y)?`${null==(r=V.value.arrow)?void 0:r.y}px`:void 0,[a]:-((null==(l=E.value)?void 0:l.offsetWidth)??0)/2+"px"}})),_=r.useVModel(v,"modelValue",d),F=e.ref(!1),R=e.computed({get:()=>_.value??F.value,set:e=>{void 0!==_.value?_.value=e:F.value=e}}),T=()=>{R.value=!0},W=()=>{R.value=!1},q=()=>{R.value=!R.value},K=e=>{P.value=e};i({toggle:q,show:T,hide:W,init:K,customPosition:B}),e.watch(R,(t=>{t&&v.autofocusFirst&&e.nextTick((()=>{const e=Y(S.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),r.onClickOutside(S,(()=>{!v.keepOpen&&R.value&&(R.value=!1)}),{ignore:[P]});const M=e.computed((()=>{var e,t;return(null==(t=null==(e=P.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),H=e.computed((()=>({"aria-controls":b.value,"aria-haspopup":!0,"aria-expanded":R.value}))),{component:U,bus:I}=function({reference:t,id:o,expanded:r,aria:a}){const n=l(),u=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(p,{reference:t,id:o,expanded:r,aria:a,bus:n})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:n,component:u}}({reference:P,id:b,expanded:R,aria:H});I.on("click",q);const{role:G,modifiers:J}=e.toRefs(v),{itemRole:L}=function({role:t,expanded:o}){const r=e.computed((()=>t.value===s.listbox?f.option:f.presentation));return e.provide(c,{role:r,expanded:o}),{itemRole:r}}({role:G,expanded:R}),Q=function(t,o,r){return e.computed((()=>{const l={[t]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{l[`${t}--${o}`]=e.unref(r.value[o])})),l}))}("vv-dropdown",J,e.computed((()=>({arrow:v.arrow})))),{focused:X}=r.useFocusWithin(S);function Y(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"))):[]}r.onKeyStroke("Escape",(e=>{R.value&&(e.preventDefault(),W())})),r.onKeyStroke("ArrowDown",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),r.onKeyStroke("ArrowUp",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),r.onKeyStroke([" ","Enter"],(e=>{const t=e.target;R.value&&X.value&&t&&(null==t||t.click())}));const Z={"before-enter":()=>{d(R.value?"beforeExpand":"beforeCollapse"),d("before-enter")},"after-leave":()=>{d(R.value?"afterExpand":"afterCollapse"),d("after-leave")},enter:()=>{d("enter")},"after-enter":()=>{d("after-enter")},"enter-cancelled":()=>{d("enter-cancelled")},"before-leave":()=>{d("before-leave")},leave:()=>{d("leave")},"leave-cancelled":()=>{d("leave-cancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(U),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:K,show:T,hide:W,toggle:q,expanded:e.unref(R),aria:e.unref(H)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(Z)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:S,style:e.normalizeStyle(e.unref(A)),class:e.normalizeClass(e.unref(Q))},[v.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:E,style:e.normalizeStyle(e.unref(D)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)}))),e.createElementVNode("div",e.mergeProps(e.unref(g),{id:e.unref(b),ref_key:"listEl",ref:k,tabindex:e.unref(R)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(M),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(L)})))],16,h),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)})))],6),[[e.vShow,e.unref(R)]])])),_:3},16,["name"])],64))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","uid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.uid,e.core,e.mitt)}(this,(function(e,t,o,r,l){"use strict";var a=(e=>(e.absolute="absolute",e.fixed="fixed",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),u=(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))(u||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.listbox="listbox",e.menu="menu",e))(s||{}),f=(e=>(e.option="option",e.presentation="presentation",e))(f||{});const p=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),v=(Boolean,Boolean,Boolean,Boolean,{modifiers:[String,Array]});i.before;const m={id:[String,Number]},b={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(a).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},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}};d.button;const g={...m,...b,...v,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:s.menu,validator:e=>Object.values(s).includes(e)}};const h=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:g,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(u,{expose:i,emit:d}){const v=u,{id:m}=e.toRefs(v),b=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid()))))(m),g=e.useAttrs(),y=e.ref("auto"),x=e.ref("auto"),w=e.ref(null),S=e.ref(),E=e.ref(null),k=e.ref(null),P=e.computed({get:()=>v.reference??w.value,set:e=>{w.value=e}}),B=e.ref(!1);e.onMounted((()=>{r.useMutationObserver(S.value,(()=>{var e;B.value="true"===(null==(e=window.getComputedStyle(S.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const O=e.computed((()=>{const e=[];if(v.autoPlacement?"boolean"==typeof v.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(v.autoPlacement)):v.flip&&("boolean"==typeof v.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(v.flip))),v.shift&&("boolean"==typeof v.shift?e.push(t.shift()):e.push(t.shift(v.shift))),v.size){const o=({availableWidth:e,availableHeight:t})=>{y.value=`${e}px`,x.value=`${t}px`};"boolean"==typeof v.size?e.push(t.size({apply:o})):e.push(t.size({...v.size,apply:o}))}return v.offset&&(e.push(t.offset(Number(v.offset))),["string","number"].includes(typeof v.offset)?e.push(t.offset(Number(v.offset))):e.push(t.offset(v.offset))),v.arrow&&e.push(t.arrow({element:E})),e})),{x:$,y:z,middlewareData:V,placement:j,strategy:C}=t.useFloating(P,S,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:v.strategy===a.fixed}),placement:e.computed((()=>v.placement)),strategy:e.computed((()=>v.strategy)),middleware:O}),A=e.computed((()=>{var e;if(B.value)return;const t=v.triggerWidth&&P.value?`${null==(e=P.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${z.value??0}px`,left:`${$.value??0}px`,maxWidth:t?void 0:y.value,maxHeight:x.value,width:t}})),N=e.computed((()=>j.value.split("-")[0])),D=e.computed((()=>{var e,t,o,r,l;if(B.value)return;const a={[n.top]:n.bottom,[n.right]:n.left,[n.bottom]:n.top,[n.left]:n.right}[N.value];return{left:void 0!==(null==(e=V.value.arrow)?void 0:e.x)?`${null==(t=V.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=V.value.arrow)?void 0:o.y)?`${null==(r=V.value.arrow)?void 0:r.y}px`:void 0,[a]:-((null==(l=E.value)?void 0:l.offsetWidth)??0)/2+"px"}})),_=r.useVModel(v,"modelValue",d),F=e.ref(!1),R=e.computed({get:()=>_.value??F.value,set:e=>{void 0!==_.value?_.value=e:F.value=e}}),T=()=>{R.value=!0},W=()=>{R.value=!1},q=()=>{R.value=!R.value},K=e=>{P.value=e};i({toggle:q,show:T,hide:W,init:K,customPosition:B}),e.watch(R,(t=>{t&&v.autofocusFirst&&e.nextTick((()=>{const e=Y(S.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),r.onClickOutside(S,(()=>{!v.keepOpen&&R.value&&(R.value=!1)}),{ignore:[P]});const M=e.computed((()=>{var e,t;return(null==(t=null==(e=P.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),H=e.computed((()=>({"aria-controls":b.value,"aria-haspopup":!0,"aria-expanded":R.value}))),{component:U,bus:I}=function({reference:t,id:o,expanded:r,aria:a}){const n=l(),u=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(p,{reference:t,id:o,expanded:r,aria:a,bus:n})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:n,component:u}}({reference:P,id:b,expanded:R,aria:H});I.on("click",q);const{role:G,modifiers:J}=e.toRefs(v),{itemRole:L}=function({role:t,expanded:o}){const r=e.computed((()=>t.value===s.listbox?f.option:f.presentation));return e.provide(c,{role:r,expanded:o}),{itemRole:r}}({role:G,expanded:R}),Q=function(t,o,r){return e.computed((()=>{const l={[t]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{l[`${t}--${o}`]=e.unref(r.value[o])})),l}))}("vv-dropdown",J,e.computed((()=>({arrow:v.arrow})))),{focused:X}=r.useFocusWithin(S);function Y(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"))):[]}r.onKeyStroke("Escape",(e=>{R.value&&(e.preventDefault(),W())})),r.onKeyStroke("ArrowDown",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),r.onKeyStroke("ArrowUp",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),r.onKeyStroke([" ","Enter"],(e=>{const t=e.target;R.value&&X.value&&t&&(null==t||t.click())}));const Z={"before-enter":()=>{d(R.value?"beforeExpand":"beforeCollapse"),d("before-enter")},"after-leave":()=>{d(R.value?"afterExpand":"afterCollapse"),d("after-leave")},enter:()=>{d("enter")},"after-enter":()=>{d("after-enter")},"enter-cancelled":()=>{d("enter-cancelled")},"before-leave":()=>{d("before-leave")},leave:()=>{d("leave")},"leave-cancelled":()=>{d("leave-cancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(U),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:K,show:T,hide:W,toggle:q,expanded:e.unref(R),aria:e.unref(H)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(Z),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:S,style:e.normalizeStyle(e.unref(A)),class:e.normalizeClass(e.unref(Q))},[v.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:E,style:e.normalizeStyle(e.unref(D)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)}))),e.createElementVNode("div",e.mergeProps(e.unref(g),{id:e.unref(b),ref_key:"listEl",ref:k,tabindex:e.unref(R)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(M),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(L)})))],16,h),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)})))],6),[[e.vShow,e.unref(R)]])])),_:3},16,["name"])],64))}})}));
|
|
@@ -16,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
16
16
|
};
|
|
17
17
|
modifiers: globalThis.PropType<string | string[]>;
|
|
18
18
|
placement: {
|
|
19
|
-
type: globalThis.PropType<"
|
|
19
|
+
type: globalThis.PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
|
|
20
20
|
default: Side;
|
|
21
21
|
validator: (value: never) => boolean;
|
|
22
22
|
};
|
|
@@ -180,7 +180,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
180
180
|
hide: () => void;
|
|
181
181
|
init: (el: HTMLElement) => void;
|
|
182
182
|
customPosition: Ref<boolean>;
|
|
183
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
183
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
184
|
+
"update:modelValue": (...args: any[]) => void;
|
|
185
|
+
"before-enter": (...args: any[]) => void;
|
|
186
|
+
"after-leave": (...args: any[]) => void;
|
|
187
|
+
enter: (...args: any[]) => void;
|
|
188
|
+
"after-enter": (...args: any[]) => void;
|
|
189
|
+
"enter-cancelled": (...args: any[]) => void;
|
|
190
|
+
"before-leave": (...args: any[]) => void;
|
|
191
|
+
leave: (...args: any[]) => void;
|
|
192
|
+
"leave-cancelled": (...args: any[]) => void;
|
|
193
|
+
beforeExpand: (...args: any[]) => void;
|
|
194
|
+
beforeCollapse: (...args: any[]) => void;
|
|
195
|
+
afterExpand: (...args: any[]) => void;
|
|
196
|
+
afterCollapse: (...args: any[]) => void;
|
|
197
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
184
198
|
modelValue: {
|
|
185
199
|
type: BooleanConstructor;
|
|
186
200
|
default: undefined;
|
|
@@ -196,7 +210,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
196
210
|
};
|
|
197
211
|
modifiers: globalThis.PropType<string | string[]>;
|
|
198
212
|
placement: {
|
|
199
|
-
type: globalThis.PropType<"
|
|
213
|
+
type: globalThis.PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
|
|
200
214
|
default: Side;
|
|
201
215
|
validator: (value: never) => boolean;
|
|
202
216
|
};
|
|
@@ -371,7 +385,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
371
385
|
}, {
|
|
372
386
|
modelValue: boolean;
|
|
373
387
|
reference: HTMLElement | null;
|
|
374
|
-
placement: "
|
|
388
|
+
placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
|
|
375
389
|
strategy: "absolute" | "fixed";
|
|
376
390
|
shift: boolean | {
|
|
377
391
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
@@ -25,7 +25,7 @@ export declare const VvDropdownProps: {
|
|
|
25
25
|
};
|
|
26
26
|
modifiers: PropType<string | string[]>;
|
|
27
27
|
placement: {
|
|
28
|
-
type: PropType<"
|
|
28
|
+
type: PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
|
|
29
29
|
default: import("../../constants").Side;
|
|
30
30
|
validator: (value: never) => boolean;
|
|
31
31
|
};
|
|
@@ -376,10 +376,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
376
376
|
}), {
|
|
377
377
|
default: withCtx(() => [
|
|
378
378
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
379
|
-
createTextVNode(
|
|
379
|
+
createTextVNode(
|
|
380
|
+
toDisplayString(_ctx.label),
|
|
381
|
+
1
|
|
382
|
+
/* TEXT */
|
|
383
|
+
)
|
|
380
384
|
])
|
|
381
385
|
]),
|
|
382
386
|
_: 3
|
|
387
|
+
/* FORWARDED */
|
|
383
388
|
}, 16, ["class"]);
|
|
384
389
|
};
|
|
385
390
|
}
|
|
@@ -410,13 +415,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
410
415
|
}
|
|
411
416
|
});
|
|
412
417
|
return (_ctx, _cache) => {
|
|
413
|
-
return openBlock(), createElementBlock(
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
return openBlock(), createElementBlock(
|
|
419
|
+
"div",
|
|
420
|
+
mergeProps({ role: unref(role) }, {
|
|
421
|
+
ref_key: "element",
|
|
422
|
+
ref: element,
|
|
423
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
424
|
+
}),
|
|
425
|
+
[
|
|
426
|
+
renderSlot(_ctx.$slots, "default")
|
|
427
|
+
],
|
|
428
|
+
16
|
|
429
|
+
/* FULL_PROPS */
|
|
430
|
+
);
|
|
420
431
|
};
|
|
421
432
|
}
|
|
422
433
|
});
|
|
@@ -471,13 +482,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
471
482
|
}, { class: unref(bemCssClasses) }), {
|
|
472
483
|
default: withCtx(() => [
|
|
473
484
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
474
|
-
createTextVNode(
|
|
485
|
+
createTextVNode(
|
|
486
|
+
toDisplayString(_ctx.label),
|
|
487
|
+
1
|
|
488
|
+
/* TEXT */
|
|
489
|
+
)
|
|
475
490
|
])
|
|
476
491
|
]),
|
|
477
492
|
_: 3
|
|
493
|
+
/* FORWARDED */
|
|
478
494
|
}, 16, ["class"])
|
|
479
495
|
]),
|
|
480
496
|
_: 3
|
|
497
|
+
/* FORWARDED */
|
|
481
498
|
});
|
|
482
499
|
};
|
|
483
500
|
}
|
|
@@ -42,13 +42,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
return (_ctx, _cache) => {
|
|
45
|
-
return openBlock(), createElementBlock(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
return openBlock(), createElementBlock(
|
|
46
|
+
"div",
|
|
47
|
+
mergeProps({ role: unref(role) }, {
|
|
48
|
+
ref_key: "element",
|
|
49
|
+
ref: element,
|
|
50
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
51
|
+
}),
|
|
52
|
+
[
|
|
53
|
+
renderSlot(_ctx.$slots, "default")
|
|
54
|
+
],
|
|
55
|
+
16
|
|
56
|
+
/* FULL_PROPS */
|
|
57
|
+
);
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
60
|
});
|
|
@@ -243,7 +243,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
243
243
|
setup(__props) {
|
|
244
244
|
const props = __props;
|
|
245
245
|
return (_ctx, _cache) => {
|
|
246
|
-
return openBlock(), createElementBlock(
|
|
246
|
+
return openBlock(), createElementBlock(
|
|
247
|
+
"li",
|
|
248
|
+
_hoisted_1,
|
|
249
|
+
toDisplayString(props.label),
|
|
250
|
+
1
|
|
251
|
+
/* TEXT */
|
|
252
|
+
);
|
|
247
253
|
};
|
|
248
254
|
}
|
|
249
255
|
});
|
|
@@ -83,13 +83,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
return (_ctx, _cache) => {
|
|
86
|
-
return openBlock(), createElementBlock(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
return openBlock(), createElementBlock(
|
|
87
|
+
"div",
|
|
88
|
+
mergeProps({ role: unref(role) }, {
|
|
89
|
+
ref_key: "element",
|
|
90
|
+
ref: element,
|
|
91
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
92
|
+
}),
|
|
93
|
+
[
|
|
94
|
+
renderSlot(_ctx.$slots, "default")
|
|
95
|
+
],
|
|
96
|
+
16
|
|
97
|
+
/* FULL_PROPS */
|
|
98
|
+
);
|
|
93
99
|
};
|
|
94
100
|
}
|
|
95
101
|
});
|
|
@@ -376,11 +382,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
376
382
|
title: unref(hintLabel)
|
|
377
383
|
}, [
|
|
378
384
|
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
|
|
379
|
-
createTextVNode(
|
|
385
|
+
createTextVNode(
|
|
386
|
+
toDisplayString(unref(hintLabel)),
|
|
387
|
+
1
|
|
388
|
+
/* TEXT */
|
|
389
|
+
)
|
|
380
390
|
])
|
|
381
391
|
], 8, _hoisted_1)
|
|
382
392
|
]),
|
|
383
393
|
_: 3
|
|
394
|
+
/* FORWARDED */
|
|
384
395
|
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
|
|
385
396
|
};
|
|
386
397
|
}
|
|
@@ -213,7 +213,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
213
213
|
color: _ctx.color,
|
|
214
214
|
onLoad: _ctx.onLoad,
|
|
215
215
|
icon: unref(icon)
|
|
216
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
216
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
219
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=n(e.vue,e.vue$1)}(this,(function(e,n){"use strict";const o={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]}},
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=n(e.vue,e.vue$1)}(this,(function(e,n){"use strict";const o={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]}},i=Symbol.for("volver");return e.defineComponent({name:"VvIcon",props:o,setup(o){const r=o,t=e.computed((()=>"string"==typeof r.rotate?parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i),{modifiers:c}=e.toRefs(r),a=function(n,o,i){return e.computed((()=>{const r={[n]:!0},t="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return t&&Array.isArray(t)&&t.forEach((e=>{e&&(r[`${n}--${e}`]=!0)})),i&&Object.keys(i.value).forEach((o=>{r[`${n}--${o}`]=e.unref(i.value[o])})),r}))}("vv-icon",c),s=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",o=`@${s.value}:${r.prefix}:${e}`;if(n.iconExists(o))return o;const i=null==u?void 0:u.iconsCollections.find((o=>{const i=`@${s.value}:${o.prefix}:${e}`;return n.iconExists(i)}));return i?`@${s.value}:${i.prefix}:${e}`:e}));function d(e){const o=function(e){let n;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");n=(new e).window}return(n?new n.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==o?void 0:o.innerHTML.trim())||"";o&&i&&n.addIcon(`@${s.value}:${r.prefix}:${r.name}`,{body:i,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return u&&r.src&&!n.iconExists(`@${s.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(d(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&d(r.svg),(o,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(n.Icon),e.mergeProps({key:0,class:e.unref(a)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:e.unref(t),color:o.color,onLoad:o.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}})}));
|
|
@@ -381,7 +381,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
381
381
|
color: _ctx.color,
|
|
382
382
|
onLoad: _ctx.onLoad,
|
|
383
383
|
icon: unref(icon)
|
|
384
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
384
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
387
|
});
|
|
@@ -1489,7 +1489,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1489
1489
|
return;
|
|
1490
1490
|
}
|
|
1491
1491
|
inputEl.value.stepUp();
|
|
1492
|
-
localModelValue.value = unref(inputEl).value;
|
|
1492
|
+
localModelValue.value = Number(unref(inputEl).value);
|
|
1493
1493
|
}
|
|
1494
1494
|
};
|
|
1495
1495
|
const onStepDown = () => {
|
|
@@ -1499,7 +1499,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1499
1499
|
return;
|
|
1500
1500
|
}
|
|
1501
1501
|
inputEl.value.stepDown();
|
|
1502
|
-
localModelValue.value = unref(inputEl).value;
|
|
1502
|
+
localModelValue.value = Number(unref(inputEl).value);
|
|
1503
1503
|
}
|
|
1504
1504
|
};
|
|
1505
1505
|
const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
|
|
@@ -1663,101 +1663,130 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1663
1663
|
emit("keydown", event);
|
|
1664
1664
|
};
|
|
1665
1665
|
return (_ctx, _cache) => {
|
|
1666
|
-
return openBlock(), createElementBlock(
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1666
|
+
return openBlock(), createElementBlock(
|
|
1667
|
+
"div",
|
|
1668
|
+
{
|
|
1669
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1670
|
+
},
|
|
1671
|
+
[
|
|
1672
|
+
unref(label) ? (openBlock(), createElementBlock("label", {
|
|
1673
|
+
key: 0,
|
|
1674
|
+
for: unref(hasId),
|
|
1675
|
+
class: "vv-input-text__label"
|
|
1676
|
+
}, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
1677
|
+
createElementVNode("div", _hoisted_2, [
|
|
1678
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
1679
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1680
|
+
])) : createCommentVNode("v-if", true),
|
|
1681
|
+
createElementVNode("div", {
|
|
1682
|
+
ref_key: "innerEl",
|
|
1683
|
+
ref: innerEl,
|
|
1684
|
+
class: "vv-input-text__inner",
|
|
1685
|
+
onClick: withModifiers(onClickInner, ["stop"])
|
|
1686
|
+
}, [
|
|
1687
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
1688
|
+
_sfc_main$1,
|
|
1689
|
+
mergeProps({
|
|
1690
|
+
key: 0,
|
|
1691
|
+
class: "vv-input-text__icon"
|
|
1692
|
+
}, unref(hasIcon)),
|
|
1693
|
+
null,
|
|
1694
|
+
16
|
|
1695
|
+
/* FULL_PROPS */
|
|
1696
|
+
)) : createCommentVNode("v-if", true),
|
|
1697
|
+
createElementVNode("input", mergeProps({
|
|
1698
|
+
id: unref(hasId),
|
|
1699
|
+
ref_key: "inputEl",
|
|
1700
|
+
ref: inputEl
|
|
1701
|
+
}, unref(hasAttrs), {
|
|
1702
|
+
style: unref(hasStyle),
|
|
1703
|
+
onKeyup: _cache[0] || (_cache[0] = ($event) => emit("keyup", $event)),
|
|
1704
|
+
onKeydown: onKeyDown,
|
|
1705
|
+
onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
|
|
1706
|
+
}), null, 16, _hoisted_5),
|
|
1707
|
+
(_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
1708
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
1709
|
+
createTextVNode(
|
|
1710
|
+
toDisplayString(_ctx.unit),
|
|
1711
|
+
1
|
|
1712
|
+
/* TEXT */
|
|
1713
|
+
)
|
|
1714
|
+
])
|
|
1715
|
+
])) : createCommentVNode("v-if", true)
|
|
1716
|
+
], 8, _hoisted_4),
|
|
1717
|
+
unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(
|
|
1718
|
+
_sfc_main$1,
|
|
1719
|
+
mergeProps({
|
|
1720
|
+
key: 1,
|
|
1721
|
+
class: "vv-input-text__icon vv-input-text__icon-after"
|
|
1722
|
+
}, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)),
|
|
1723
|
+
null,
|
|
1724
|
+
16
|
|
1725
|
+
/* FULL_PROPS */
|
|
1726
|
+
)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
|
|
1727
|
+
key: 2,
|
|
1728
|
+
onTogglePassword
|
|
1729
|
+
})) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
|
|
1730
|
+
key: 3,
|
|
1731
|
+
onStepUp,
|
|
1732
|
+
onStepDown
|
|
1733
|
+
})) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
|
|
1734
|
+
key: 4,
|
|
1735
|
+
onClear
|
|
1736
|
+
})) : createCommentVNode("v-if", true),
|
|
1737
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
1738
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1739
|
+
])) : createCommentVNode("v-if", true),
|
|
1740
|
+
unref(count) ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
|
1741
|
+
renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
1742
|
+
createTextVNode(
|
|
1743
|
+
toDisplayString(unref(countFormatted)),
|
|
1744
|
+
1
|
|
1745
|
+
/* TEXT */
|
|
1746
|
+
)
|
|
1701
1747
|
])
|
|
1702
|
-
])) : createCommentVNode("", true)
|
|
1703
|
-
]
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
class: "vv-input-
|
|
1707
|
-
},
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
} : void 0,
|
|
1745
|
-
_ctx.$slots.valid ? {
|
|
1746
|
-
name: "valid",
|
|
1747
|
-
fn: withCtx(() => [
|
|
1748
|
-
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1749
|
-
]),
|
|
1750
|
-
key: "2"
|
|
1751
|
-
} : void 0,
|
|
1752
|
-
_ctx.$slots.invalid ? {
|
|
1753
|
-
name: "invalid",
|
|
1754
|
-
fn: withCtx(() => [
|
|
1755
|
-
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1756
|
-
]),
|
|
1757
|
-
key: "3"
|
|
1758
|
-
} : void 0
|
|
1759
|
-
]), 1032, ["id"])
|
|
1760
|
-
], 2);
|
|
1748
|
+
])) : createCommentVNode("v-if", true)
|
|
1749
|
+
]),
|
|
1750
|
+
createVNode(unref(HintSlot), {
|
|
1751
|
+
id: unref(hasHintId),
|
|
1752
|
+
class: "vv-input-text__hint"
|
|
1753
|
+
}, createSlots({
|
|
1754
|
+
_: 2
|
|
1755
|
+
/* DYNAMIC */
|
|
1756
|
+
}, [
|
|
1757
|
+
_ctx.$slots.hint ? {
|
|
1758
|
+
name: "hint",
|
|
1759
|
+
fn: withCtx(() => [
|
|
1760
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1761
|
+
]),
|
|
1762
|
+
key: "0"
|
|
1763
|
+
} : void 0,
|
|
1764
|
+
_ctx.$slots.loading ? {
|
|
1765
|
+
name: "loading",
|
|
1766
|
+
fn: withCtx(() => [
|
|
1767
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1768
|
+
]),
|
|
1769
|
+
key: "1"
|
|
1770
|
+
} : void 0,
|
|
1771
|
+
_ctx.$slots.valid ? {
|
|
1772
|
+
name: "valid",
|
|
1773
|
+
fn: withCtx(() => [
|
|
1774
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1775
|
+
]),
|
|
1776
|
+
key: "2"
|
|
1777
|
+
} : void 0,
|
|
1778
|
+
_ctx.$slots.invalid ? {
|
|
1779
|
+
name: "invalid",
|
|
1780
|
+
fn: withCtx(() => [
|
|
1781
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1782
|
+
]),
|
|
1783
|
+
key: "3"
|
|
1784
|
+
} : void 0
|
|
1785
|
+
]), 1032, ["id"])
|
|
1786
|
+
],
|
|
1787
|
+
2
|
|
1788
|
+
/* CLASS */
|
|
1789
|
+
);
|
|
1761
1790
|
};
|
|
1762
1791
|
}
|
|
1763
1792
|
});
|