vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 1.6 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`892348e1-fabb-4f40-b76a-6433e7237680`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#892348e1-fabb-4f40-b76a-6433e7237680)`},i={key:0},a=(0,e.createElementVNode)(`path`,{fill:`#0052b4`,d:`M64 0 0 64v160l32 32-32 32v224l256-32 256 32V288l-32-32 32-32V64L448 0H288l-32 32-32-32H64z`},null,-1),o=(0,e.createElementVNode)(`path`,{fill:`#d80027`,d:`M256 256 0 512h512z`},null,-1),s=(0,e.createElementVNode)(`path`,{fill:`#ffda44`,d:`M0 224v64l512-64v64z`},null,-1),c=(0,e.createElementVNode)(`path`,{fill:`#ffda44`,d:`M256 256 0 64V0h64zm0 0L448 0h64v64zm0 0L224 0h64z`},null,-1),l={fill:`none`},u=[`r`],d=(0,e.defineComponent)({__name:`re`,props:{flagName:{},strokeColor:{default:`#000`},strokeWidth:{default:0}},setup(d){let f=d,p=(0,e.computed)(()=>512+2*f.strokeWidth),m=(0,e.computed)(()=>-f.strokeWidth),h=(0,e.computed)(()=>256+f.strokeWidth/2);return(d,g)=>((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`svg-circle-flags`,viewBox:`${m.value} ${m.value} ${p.value} ${p.value}`},[n,(0,e.createElementVNode)(`g`,r,[f.flagName?((0,e.openBlock)(),(0,e.createElementBlock)(`title`,i,(0,e.toDisplayString)(f.flagName),1)):(0,e.createCommentVNode)(``,!0),a,o,s,c]),(0,e.createElementVNode)(`g`,l,[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:h.value,fill:`none`,style:(0,e.normalizeStyle)({stroke:f.strokeColor,strokeWidth:f.strokeWidth})},null,12,u)])],8,t))}});exports.default=d;
//# sourceMappingURL=re-ZXqb475C.cjs.map