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.92 kB
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`686d08f1-4309-4949-8c58-cecedb3a4c2c`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#686d08f1-4309-4949-8c58-cecedb3a4c2c)`},i={key:0},a=(0,e.createStaticVNode)(`<path fill="#eee" d="m228 0 32 211-32 211h-32l-32-211L196 0Z"></path><path fill="#496e2d" d="M196 0v450H0V0Z"></path><path fill="#eee" d="m178 87-31-14-49 112L49 73 18 87l62 138-62 138 31 14 49-112 49 112 31-14-62-138Z"></path><path fill="#eee" d="M98 80 81 96 65 224l16 130 17 16 17-16 15-131-15-127-17-16Z"></path><path fill="#333" d="m154 148-10 76 10 78a159 159 0 0 0 22-77c0-28-10-54-22-77zm-112 0 9 74-9 80a159 159 0 0 1-22-77c0-28 10-54 22-77z"></path><path fill="#a2001d" d="M42 148v154a269 269 0 0 0 39 52V96c-11 12-26 30-39 52zm112 0a269 269 0 0 0-39-52v258c11-12 26-30 39-52V148Z"></path><path fill="#d80027" d="M512 0v422H228V0Z"></path><path fill="#333" d="m0 450 86-17 75 8 55-51 41 18 106-56 149 70v90H0Z"></path>`,8),o={fill:`none`},s=[`r`],c=(0,e.defineComponent)({__name:`kikuyu`,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=kikuyu-BpzGYV5o.cjs.map