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.87 kB
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`ef8076f2-bccf-4b0d-8bcb-6dfc577a5cd1`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#ef8076f2-bccf-4b0d-8bcb-6dfc577a5cd1)`},i={key:0},a=(0,e.createStaticVNode)(`<path fill="#ff9811" d="M81.4 27.2h135.2v456.5H81.4z"></path><path fill="#6da544" d="m0 44.5 100.2-22v463L0 467.5z"></path><path fill="#a2001d" d="m218.6 26.5 293.4 18v93.2l-18.6 106.2 18.6 97.4v126.2l-293.4 18z"></path><path fill="#ffda44" d="M0 0v44.5h200.3v423H0V512h512v-44.5H233.7v-423H512V0z"></path><path fill="#ffda44" d="M300.5 94.6c-18.4 0-33.4 15-33.4 33.4v144.6a33 33 0 0 0 11.2 25v53h22.2v-27.8h100.2v44.5h-22.3v22.3H423V345l20.4-22.2h48.2a72.9 72.9 0 0 0 20.4 18.5V137.7a66 66 0 0 0-22.5 13.1 67.8 67.8 0 0 0-13.2 82.9c-21.3-.1-41 .2-53.3 0V167c0-11.2-16.7-22.3-16.7-22.3s-16.7 11.1-16.7 22.3h-66.8v66.7h33.4v33.4c0 7.1 1.4 14.1 4.1 20.7L345 300.6h-44.5v-206z"></path>`,5),o={fill:`none`},s=[`r`],c=(0,e.defineComponent)({__name:`lk`,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=lk-NxKIET7_.cjs.map