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.56 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],r=e.createElementVNode("mask",{id:"5caef9a5-1edc-40be-bb8a-5de3efac6dd2"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),d={mask:"url(#5caef9a5-1edc-40be-bb8a-5de3efac6dd2)"},n={key:0},i=e.createElementVNode("path",{fill:"#d80027",d:"m0 256 255.2-39.6L512 256v256H0z"},null,-1),m=e.createElementVNode("path",{fill:"#0052b4",d:"M0 0h512v256H0z"},null,-1),h=e.createElementVNode("path",{fill:"#ffda44",d:"M189.2 178a33.4 33.4 0 0 0-55.6-24.8v-19.6h11.1v-22.3h-11.1v-11.1h-22.3v11.1h-11.1v22.3h11.1v19.6A33.4 33.4 0 0 0 66.8 203v19.6H178V203c6.8-6.1 11.1-15 11.1-25z"},null,-1),f={fill:"none"},u=["r"],_=e.defineComponent({__name:"li",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(v,k)=>(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}`},[r,e.createElementVNode("g",d,[t.flagName?(e.openBlock(),e.createElementBlock("title",n,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),i,m,h]),e.createElementVNode("g",f,[e.createElementVNode("circle",{cx:"256",cy:"256",r:a.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,u)])],8,s))}});exports.default=_;
//# sourceMappingURL=li-0c4d30db.cjs.map