vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
3 lines (2 loc) • 1.6 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],n=e.createElementVNode("mask",{id:"df9bf0c2-a2fa-47df-a9c2-2234a1ad68f4"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),d={mask:"url(#df9bf0c2-a2fa-47df-a9c2-2234a1ad68f4)"},r={key:0},i=e.createElementVNode("path",{fill:"#d80027",d:"m0 167 253.8-19.3L512 167v178l-254.9 32.3L0 345z"},null,-1),f=e.createElementVNode("path",{fill:"#333",d:"M0 0h512v167H0z"},null,-1),m=e.createElementVNode("path",{fill:"#496e2d",d:"M0 345h512v167H0z"},null,-1),u=e.createElementVNode("path",{fill:"#d80027",d:"m332.5 122.4-31.2-14.7 16.6-30.3-34 6.5-4.3-34.3L256 75l-23.6-25.3L228 84l-34-6.5 16.7 30.3-31.3 14.7z"},null,-1),_={fill:"none"},h=["r"],p=e.defineComponent({__name:"mw",props:{flagName:{},strokeColor:{default:"#000"},strokeWidth:{default:0}},setup(c){const t=c,o=e.computed(()=>512+2*t.strokeWidth),l=e.computed(()=>-t.strokeWidth),a=e.computed(()=>256+t.strokeWidth/2);return(k,v)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-circle-flags",viewBox:`${l.value} ${l.value} ${o.value} ${o.value}`},[n,e.createElementVNode("g",d,[t.flagName?(e.openBlock(),e.createElementBlock("title",r,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),i,f,m,u]),e.createElementVNode("g",_,[e.createElementVNode("circle",{cx:"256",cy:"256",r:a.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,h)])],8,s))}});exports.default=p;
//# sourceMappingURL=mw-ce967bcc.cjs.map