vue-instantsearch
Version:
👀 Lightning-fast Algolia search for Vue apps
2 lines (1 loc) • 2.17 kB
JavaScript
import{openBlock as t,createElementBlock as e,normalizeClass as s,renderSlot as a,createElementVNode as n,Fragment as i,renderList as l,withModifiers as u,createTextVNode as r,toDisplayString as c,createCommentVNode as o}from"vue";var d={style:{display:"none"}},f=[n("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[n("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"})],-1),n("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[n("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"})],-1)],h=["href","aria-label","onClick"],m=[n("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1)],y=[n("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1)];function p(p,v,R,b,g,k){return p.state?(t(),e("div",{key:0,class:s(p.suit())},[a(p.$slots,"default",{items:p.state.items,refine:p.state.refine,createURL:p.state.createURL,sendEvent:p.state.sendEvent,canRefine:p.state.canRefine},function(){return[(t(),e("svg",d,f)),n("ul",{class:s(p.suit("list"))},[(t(!0),e(i,null,l(p.state.items,function(o,d){return t(),e("li",{key:d,class:s([p.suit("item"),o.isRefined&&p.suit("item","selected")])},[n("div",null,[n("a",{href:p.state.createURL(o.value),"aria-label":"".concat(o.value," & up"),class:s(p.suit("link")),onClick:u(function(t){return p.state.refine(o.value)},["exact","left","prevent"])},[(t(!0),e(i,null,l(o.stars,function(a,n){return t(),e(i,null,[a?(t(),e("svg",{"aria-hidden":"true",width:"24",height:"24",class:s([p.suit("starIcon"),p.suit("starIcon--full")]),key:n+"-full"},m,2)):(t(),e("svg",{class:s([p.suit("starIcon"),p.suit("starIcon--empty")]),"aria-hidden":"true",width:"24",height:"24",key:n+"-empty"},y,2))],64)}),256)),n("span",{class:s(p.suit("label")),"aria-hidden":"true"},[a(p.$slots,"andUp",{},function(){return[r("& Up")]})],2),n("span",{class:s(p.suit("count"))},c(o.count),3)],10,h)])],2)}),128))],2)]})],2)):o("",!0)}export{p as render};