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.86 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],n=e.createElementVNode("mask",{id:"c74e6020-895d-46ea-bc6b-5737570f39a7"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#c74e6020-895d-46ea-bc6b-5737570f39a7)"},a={key:0},d=e.createElementVNode("path",{fill:"#ffda44",d:"M0 0h68.2l86 33.6L216.5 0h78.8l61.2 34.8L443.8 0H512v68.3l-31.4 88 31.4 60.2v78.8L477.4 356l34.6 87.8V512h-68.2l-77-37.3-71.3 37.3h-78.8l-61-39.7L68.2 512H0v-68l40.3-88.2L0 295.5v-78.8L40.3 157 0 68.2z"},null,-1),m=e.createElementVNode("path",{fill:"#d80027",d:"M295.5 512h148.3L256 256zm-79-512H68.2L256 256zm.2 512L256 256 68.2 512zM0 216.7 256 256 0 68.2zm0 227.2L256 256 0 295.5zM512 68.3 256 256l256-39.5zM443.8 0H295.3L256 256zM512 443.8V295.3L256 256z"},null,-1),f=e.createElementVNode("circle",{cx:"256",cy:"256",r:"89",fill:"#d80027"},null,-1),u=e.createElementVNode("circle",{cx:"256",cy:"256",r:"66.8",fill:"#ffda44"},null,-1),_={fill:"none"},h=["r"],k=e.defineComponent({__name:"mk",props:{flagName:{},strokeColor:{default:"#000"},strokeWidth:{default:0}},setup(c){const t=c,l=e.computed(()=>512+2*t.strokeWidth),o=e.computed(()=>-t.strokeWidth),r=e.computed(()=>256+t.strokeWidth/2);return(v,p)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-circle-flags",viewBox:`${o.value} ${o.value} ${l.value} ${l.value}`},[n,e.createElementVNode("g",i,[t.flagName?(e.openBlock(),e.createElementBlock("title",a,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),d,m,f,u]),e.createElementVNode("g",_,[e.createElementVNode("circle",{cx:"256",cy:"256",r:r.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,h)])],8,s))}});exports.default=k;
//# sourceMappingURL=mk-ca223d2c.cjs.map