vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
2 lines • 1.99 kB
JavaScript
let e=require("vue");var t=[`viewBox`],n=(0,e.createElementVNode)(`mask`,{id:`d104ca52-b829-4a6a-be94-18103f1fd858`},[(0,e.createElementVNode)(`circle`,{cx:`256`,cy:`256`,r:`256`,fill:`#fff`})],-1),r={mask:`url(#d104ca52-b829-4a6a-be94-18103f1fd858)`},i={key:0},a=(0,e.createStaticVNode)(`<path fill="#ffda44" d="m0 144.7 256-20.5 256 20.5V178l-37.4 79 37.4 77v33.3l-256 24.1L0 367.3V334l37.7-77.3L0 178z"></path><path fill="#333" d="M0 0h512v144.7H0z"></path><path fill="#0052b4" d="M0 367.3h512V512H0z"></path><path fill="#a2001d" d="M0 178h512v156H0z"></path><path fill="#ffda44" d="M89.2 244.9h334V267h-334zm44.6-44.6h244.8v22.3H133.8z"></path><path fill="#eee" d="m256.2 189.2-18 65.2 18 68.4c66.8 0 124-66.8 124-66.8s-57.2-66.8-124-66.8z"></path><path fill="#333" d="M256.2 322.8c-66.8 0-124-66.8-124-66.8s57.2-66.8 124-66.8"></path><path fill="#eee" d="M211.7 233.7h22.2v44.6h-22.2z"></path><path fill="#333" d="M278.5 233.7h22.2v44.6h-22.2z"></path><g fill="#0052b4" transform="translate(.2)"><circle cx="89" cy="256" r="22.3"></circle><circle cx="423" cy="256" r="22.3"></circle></g>`,10),o={fill:`none`},s=[`r`],c=(0,e.defineComponent)({__name:`sz`,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=sz-CqySJ-RB.cjs.map