UNPKG

vue-instantsearch

Version:

👀 Lightning-fast Algolia search for Vue apps

2 lines (1 loc) • 3.36 kB
import{_ as t}from"@swc/helpers/_/_to_consumable_array";import{openBlock as e,createElementBlock as o,normalizeClass as n,withModifiers as i,createElementVNode as r,renderSlot as a,createCommentVNode as l,createStaticVNode as u}from"vue";var s=["placeholder","autofocus","value"],c=["title","hidden"],d=[r("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"},null,-1)],h=["title","hidden"],f=[r("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"},null,-1)],m=["hidden"],p=["aria-hidden"],g=[u('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"></animateTransform></path></g></g>',1)];function v(u,v,w,b,I,L){var y,S;return e(),o("form",{action:"",role:"search",novalidate:"",class:n(u.suit("form")),onSubmit:v[4]||(v[4]=i(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return L.onFormSubmit&&(y=L).onFormSubmit.apply(y,t(o))},["prevent"])),onReset:v[5]||(v[5]=i(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return L.onFormReset&&(S=L).onFormReset.apply(S,t(o))},["prevent"]))},[r("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:w.placeholder,autofocus:w.autofocus,class:n(u.suit("input")),value:w.value||w.modelValue,onFocus:v[0]||(v[0]=function(t){return u.$emit("focus",t)}),onBlur:v[1]||(v[1]=function(t){return u.$emit("blur",t)}),onInput:v[2]||(v[2]=function(t){return L.onInput(t)}),onCompositionend:v[3]||(v[3]=function(t){return L.onInput(t)}),ref:"input"},null,42,s),r("button",{type:"submit",title:w.submitTitle,class:n(u.suit("submit")),hidden:w.showLoadingIndicator&&w.shouldShowLoadingIndicator},[a(u.$slots,"submit-icon",{},function(){return[(e(),o("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:n(u.suit("submitIcon"))},d,2))]})],10,c),r("button",{type:"reset",title:w.resetTitle,class:n(u.suit("reset")),hidden:!w.value&&!w.modelValue||w.showLoadingIndicator&&w.shouldShowLoadingIndicator},[a(u.$slots,"reset-icon",{},function(){return[(e(),o("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:n(u.suit("resetIcon")),width:"10"},f,2))]})],10,h),w.showLoadingIndicator?(e(),o("span",{key:0,hidden:!w.shouldShowLoadingIndicator,class:n(u.suit("loadingIndicator"))},[a(u.$slots,"loading-indicator",{},function(){return[(e(),o("svg",{"aria-hidden":!w.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:n(u.suit("loadingIcon"))},g,10,p))]})],10,m)):l("",!0)],34)}export{v as render};