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.66 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],s=e.createElementVNode("mask",{id:"8d661d08-f298-4c0d-a8bf-4982148c14fb"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),d={mask:"url(#8d661d08-f298-4c0d-a8bf-4982148c14fb)"},i={key:0},n=e.createStaticVNode('<path fill="#eee" d="M512 20.4V490L23.8 255.8z"></path><path fill="#a2001d" d="M445.2 246.5h-30.5c8-9.6 7.5-23.7-1.5-32.7a24.2 24.2 0 0 0 0-34.2l-.5.5a25 25 0 0 0 .5-34.8l-137 137a23.9 23.9 0 0 0 34 0l2.6-2.5 65.6-6v28.3h22.3v-30.2l33.4-3z"></path><path fill="#ffda44" d="M278.3 311.7 256 300.5l22.3-11.1H423v22.3z"></path><path fill="#0052b4" d="M0 0v512h512L28.7 256.2 512 0z"></path><path fill="#d80027" d="M512 0 0 256l512 256v-22L43.8 256 512 20.4z"></path>',5),f={fill:"none"},h=["r"],p=e.defineComponent({__name:"as",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(m,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=p;
//# sourceMappingURL=as-1d6ee2df.cjs.map