vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 1.78 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`9efe0c19-7ac3-43cc-8127-4b12347e78f0`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#9efe0c19-7ac3-43cc-8127-4b12347e78f0)`},i={key:0},a=(0,e.createElementVNode)(`path`,{fill:`#ffda44`,d:`M0 0h256l51.7 254.7L256 512H0z`},null,-1),o=(0,e.createElementVNode)(`path`,{fill:`#eee`,d:`M256 0h256v512H256z`},null,-1),s=(0,e.createElementVNode)(`path`,{fill:`#acabb1`,d:`m354 222.8 48.1 63.6A33.4 33.4 0 1 0 420 273l-75-99.2-17.7 13.4-26.7 20.2 26.9 35.5 26.6-20.1zm69.3 73.1a11.1 11.1 0 1 1 13.4 17.8 11.1 11.1 0 0 1-13.4-17.8z`},null,-1),c=(0,e.createElementVNode)(`path`,{fill:`#ffda44`,d:`m436.6 242.9 26.8-35.5-26.6-20.2-17.8-13.4-75 99.2a33.4 33.4 0 1 0 17.8 13.4l48-63.6 26.8 20zm-93.8 68.6a11.1 11.1 0 1 1-17.8-13.4 11.1 11.1 0 0 1 17.8 13.4z`},null,-1),l={fill:`none`},u=[`r`],d=(0,e.defineComponent)({__name:`va`,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=va-D--iYmNh.cjs.map