vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 1.64 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`c9f40bc7-7c39-495a-a35a-a21d828c9b66`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#c9f40bc7-7c39-495a-a35a-a21d828c9b66)`},i={key:0},a=(0,e.createStaticVNode)(`<path fill="#a2001d" d="M0 0h167l84.9 45L345 0h167v512H345l-87.7-48.1L167 512H0z"></path><path fill="#0052b4" d="M167 0h178v512H167z"></path><g fill="#ffda44"><path d="M122.4 256h22.3v89h-22.3zm-89 0h22.3v89H33.4z"></path><circle cx="89" cy="289.4" r="22.3"></circle><circle cx="89" cy="211.5" r="11.1"></circle><path d="M66.8 322.8h44.5V345H66.8zm0-89h44.5V256H66.8zM89 133.5l8 24.2h25.4l-20.6 15 7.9 24.3L89 182l-20.6 15 7.9-24.3-20.6-15h25.5z"></path></g>`,3),o={fill:`none`},s=[`r`],c=(0,e.defineComponent)({__name:`mn`,props:{flagName:{},strokeColor:{default:`#000`},strokeWidth:{default:0}},setup(c){let l=c,u=(0,e.computed)(()=>512+2*l.strokeWidth),d=(0,e.computed)(()=>-l.strokeWidth),f=(0,e.computed)(()=>256+l.strokeWidth/2);return(c,p)=>((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`svg-circle-flags`,viewBox:`${d.value} ${d.value} ${u.value} ${u.value}`},[n,(0,e.createElementVNode)(`g`,r,[l.flagName?((0,e.openBlock)(),(0,e.createElementBlock)(`title`,i,(0,e.toDisplayString)(l.flagName),1)):(0,e.createCommentVNode)(``,!0),a]),(0,e.createElementVNode)(`g`,o,[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:f.value,fill:`none`,style:(0,e.normalizeStyle)({stroke:l.strokeColor,strokeWidth:l.strokeWidth})},null,12,s)])],8,t))}});exports.default=c;
//# sourceMappingURL=mn-DElZm-iH.cjs.map