UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

2 lines 1.85 kB
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`aebc1ef4-29d5-473a-8b0d-ff22abe23866`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#aebc1ef4-29d5-473a-8b0d-ff22abe23866)`},i={key:0},a=(0,e.createStaticVNode)(`<path fill="#6da544" d="M31.4 0H512v512H31.4z"></path><path fill="#ffda44" d="M57.8 73.3H512v73.3l-65.1 110 65.1 110v73.3H57.8z"></path><path fill="#d80027" d="M132 146.6h380v73.3l-27 36 27 37.3v73.3H132z"></path><path fill="#eee" d="M0 0v512l279.8-256z"></path><path fill="#d80027" d="m103 189.2 16.5 51h53.6l-43.4 31.6 16.6 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.6h53.6z"></path><path fill="#ffda44" d="m148.5 260.2-43.2-15.3-3.4-31a16.7 16.7 0 1 0-32.5 7.6l-12 12.1h21.5c0 22.4-16.7 22.4-16.7 44.7l9.2 22.2h55.7l9.3-22.2a22.2 22.2 0 0 0 1.7-6.6c8-3.2 10.4-11.5 10.4-11.5z"></path><path fill="#333" d="m31.4 0 220 220H512v73.2H250.2L31.4 512H0l256-256L0 0z"></path>`,7),o={fill:`none`},s=[`r`],c=(0,e.defineComponent)({__name:`zw`,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=zw-D9FaEq4Q.cjs.map