vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 1.75 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`c0419994-ffef-4d80-b470-67feebe7b472`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#c0419994-ffef-4d80-b470-67feebe7b472)`},i={key:0},a=(0,e.createElementVNode)(`path`,{fill:`#d80027`,d:`M0 0h512v512H0z`},null,-1),o=(0,e.createElementVNode)(`path`,{fill:`#ffda44`,d:`m140.1 155.8 22.1 68h71.5l-57.8 42.1 22.1 68-57.9-42-57.9 42 22.2-68-57.9-42.1H118zm163.4 240.7-16.9-20.8-25 9.7 14.5-22.5-16.9-20.9 25.9 6.9 14.6-22.5 1.4 26.8 26 6.9-25.1 9.6zm33.6-61 8-25.6-21.9-15.5 26.8-.4 7.9-25.6 8.7 25.4 26.8-.3-21.5 16 8.6 25.4-21.9-15.5zm45.3-147.6L370.6 212l19.2 18.7-26.5-3.8-11.8 24-4.6-26.4-26.6-3.8 23.8-12.5-4.6-26.5 19.2 18.7zm-78.2-73-2 26.7 24.9 10.1-26.1 6.4-1.9 26.8-14.1-22.8-26.1 6.4 17.3-20.5-14.2-22.7 24.9 10.1z`},null,-1),s={fill:`none`},c=[`r`],l=(0,e.defineComponent)({__name:`cn`,props:{flagName:{},strokeColor:{default:`#000`},strokeWidth:{default:0}},setup(l){let u=l,d=(0,e.computed)(()=>512+2*u.strokeWidth),f=(0,e.computed)(()=>-u.strokeWidth),p=(0,e.computed)(()=>256+u.strokeWidth/2);return(l,m)=>((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`svg-circle-flags`,viewBox:`${f.value} ${f.value} ${d.value} ${d.value}`},[n,(0,e.createElementVNode)(`g`,r,[u.flagName?((0,e.openBlock)(),(0,e.createElementBlock)(`title`,i,(0,e.toDisplayString)(u.flagName),1)):(0,e.createCommentVNode)(``,!0),a,o]),(0,e.createElementVNode)(`g`,s,[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:p.value,fill:`none`,style:(0,e.normalizeStyle)({stroke:u.strokeColor,strokeWidth:u.strokeWidth})},null,12,c)])],8,t))}});exports.default=l;
//# sourceMappingURL=cn-DC3nuMpk.cjs.map