UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

2 lines 1.76 kB
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`a2135811-c982-4416-a8f1-c4acda7e2b1c`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#a2135811-c982-4416-a8f1-c4acda7e2b1c)`},i={key:0},a=(0,e.createElementVNode)(`path`,{fill:`#eee`,d:`M0 0h512v55.7l-25 32.7 25 34v267.2l-26 36 26 30.7V512H0v-55.7l24.8-34.1L0 389.6V122.4l27.2-33.2L0 55.7z`},null,-1),o=(0,e.createElementVNode)(`path`,{fill:`#0052b4`,d:`M0 55.7v66.7h512V55.7zm0 333.9v66.7h512v-66.7zm352.4-189.3H288l-32-55.6-32.1 55.6h-64.3l32.1 55.7-32 55.7h64.2l32.1 55.6 32.1-55.6h64.3L320.3 256l32-55.7zm-57 55.7-19.7 34.2h-39.4L216.5 256l19.8-34.2h39.4l19.8 34.2zM256 187.6l7.3 12.7h-14.6zm-59.2 34.2h14.7l-7.4 12.7zm0 68.4 7.3-12.7 7.4 12.7zm59.2 34.2-7.3-12.7h14.6zm59.2-34.2h-14.7l7.4-12.7zm-14.7-68.4h14.7l-7.3 12.7z`},null,-1),s={fill:`none`},c=[`r`],l=(0,e.defineComponent)({__name:`il`,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=il-BK4cRpfe.cjs.map