vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 2.18 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`d0417b1c-0e5a-4d93-894d-4f70edf8252b`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#d0417b1c-0e5a-4d93-894d-4f70edf8252b)`},i={key:0},a=(0,e.createStaticVNode)(`<path fill="#338af3" d="M160 0h352v512H160l-32-256z"></path><path fill="#eee" d="m0 160 80-32 80 32v192l-80 32-80-32z"></path><rect width="160" height="160" fill="#d80027" ry="0"></rect><path fill="#6da544" d="M160 21V0h-20L0 139v21h20z"></path><path fill="#6da544" d="M0 21V0h20l140 139v21h-20z"></path><path fill="#eee" d="M0 64h160v32H0z"></path><path fill="#eee" d="M64 0h32v160H64z"></path><path fill="#d80027" d="M0 512h160V352H0z"></path><path fill="#ffda44" d="M340 146v158h-40c-24 0-24-32-24-32h-96v32h20l147 32 145-32v-24h-80s0 24-24 24h-32V146z"></path><path fill="#ffda44" d="M356 138v32c-31-11-61 8-80-32 33 23 51-10 80 0zm-72 46s-24 24-16 72h-72s32-56 88-72zm16 104h95c-31-48 0-104 0-104h-95s-40 56 0 104zm101-24a96 96 0 0 1 4-64h63s-16 32-1 64zm-101 40h192s-8 0-16 24-16 48-56 48H276c-39 0-52-50-76-72z"></path><rect width="96" height="32" x="32" y="384" fill="#ffda44" rx="16" ry="16"></rect><rect width="96" height="32" x="32" y="448" fill="#ffda44" rx="16" ry="16"></rect>`,12),o={fill:`none`},s=[`r`],c=(0,e.defineComponent)({__name:`pm`,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=pm-DyFi4gyw.cjs.map