vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
3 lines (2 loc) • 1.61 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],s=e.createElementVNode("mask",{id:"5833add2-02f2-495a-9566-219faf1e9e1d"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),d={mask:"url(#5833add2-02f2-495a-9566-219faf1e9e1d)"},i={key:0},n=e.createStaticVNode('<path fill="#0052b4" d="M0 0h512v144.7l-40.5 112.6 40.5 110V512H0V367.3l42.2-114L0 144.7z"></path><path fill="#eee" d="M0 144.7h512v222.6H0z"></path><path fill="#ffda44" d="m204.6 267.1 51.4-89 51.4 89z"></path><path fill="#6da544" d="M322.8 296.5 256 330l-66.8-33.4V252h133.6z"></path><path fill="#ffda44" d="m319 182-23.6 23.5a55.5 55.5 0 0 1-39.4 95 55.7 55.7 0 0 1-39.3-95L193 182a89 89 0 1 0 126 0z"></path>',5),f={fill:"none"},h=["r"],m=e.defineComponent({__name:"sv",props:{flagName:{},strokeColor:{default:"#000"},strokeWidth:{default:0}},setup(a){const t=a,o=e.computed(()=>512+2*t.strokeWidth),l=e.computed(()=>-t.strokeWidth),c=e.computed(()=>256+t.strokeWidth/2);return(p,u)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-circle-flags",viewBox:`${l.value} ${l.value} ${o.value} ${o.value}`},[s,e.createElementVNode("g",d,[t.flagName?(e.openBlock(),e.createElementBlock("title",i,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),n]),e.createElementVNode("g",f,[e.createElementVNode("circle",{cx:"256",cy:"256",r:c.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,h)])],8,r))}});exports.default=m;
//# sourceMappingURL=sv-b495e302.cjs.map