vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 1.91 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`22883313-07a8-494f-b278-4dc6c16e1680`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#22883313-07a8-494f-b278-4dc6c16e1680)`},i={key:0},a=(0,e.createElementVNode)(`path`,{fill:`#eee`,d:`m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z`},null,-1),o=(0,e.createElementVNode)(`path`,{fill:`#0052b4`,d:`M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z`},null,-1),s=(0,e.createElementVNode)(`path`,{fill:`#d80027`,d:`M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z`},null,-1),c={fill:`none`},l=[`r`],u=(0,e.defineComponent)({__name:`gb`,props:{flagName:{},strokeColor:{default:`#000`},strokeWidth:{default:0}},setup(u){let d=u,f=(0,e.computed)(()=>512+2*d.strokeWidth),p=(0,e.computed)(()=>-d.strokeWidth),m=(0,e.computed)(()=>256+d.strokeWidth/2);return(u,h)=>((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`svg-circle-flags`,viewBox:`${p.value} ${p.value} ${f.value} ${f.value}`},[n,(0,e.createElementVNode)(`g`,r,[d.flagName?((0,e.openBlock)(),(0,e.createElementBlock)(`title`,i,(0,e.toDisplayString)(d.flagName),1)):(0,e.createCommentVNode)(``,!0),a,o,s]),(0,e.createElementVNode)(`g`,c,[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:m.value,fill:`none`,style:(0,e.normalizeStyle)({stroke:d.strokeColor,strokeWidth:d.strokeWidth})},null,12,l)])],8,t))}});exports.default=u;
//# sourceMappingURL=gb-Dj6Ah0bP.cjs.map